Skip to content

Commit

Permalink
Fix .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
mmdjiji committed Jul 7, 2022
1 parent 4e0e427 commit ca4712e
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules/
.history/
dist/
44 changes: 44 additions & 0 deletions dist/templates/bangumi.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<% if (quote) { %>
<blockquote>
<p><%- quote; %></p>
</blockquote>
<% } %>
<style>
<%- include('index.css') %>
</style>
<div class="bangumi-tabs">
<a class="bangumi-tab" id="bangumi-tab1" href="javascript:;" rel="external" target="_self" onclick="return false">
<%= __('wantWatch') %>
(<%= wantWatch.length %>)</a>
<a class="bangumi-tab" id="bangumi-tab2" href="javascript:;" rel="external" target="_self" onclick="return false">
<%= __('watching') %>
(<%= watching.length %>)</a>
<a class="bangumi-tab" id="bangumi-tab3" href="javascript:;" rel="external" target="_self" onclick="return false">
<%= __('watched') %>
(<%= watched.length %>)</a>
</div>
<div>
<div id="bangumi-item1">
<% wantWatch.forEach(function(item){ %>
<%- include('bgm-template.ejs', { item, loading, color_meta }) %>
<% }); %>
<%- include('pagination.ejs', {__: __}) %>
</div>
<div id="bangumi-item2">
<% watching.forEach(function(item){ %>
<%- include('bgm-template.ejs', { item, loading, color_meta }) %>
<% }); %>
<%- include('pagination.ejs', {__: __}) %>
</div>
<div id="bangumi-item3">
<% watched.forEach(function(item){ %>
<%- include('bgm-template.ejs', { item, loading, color_meta }) %>
<% }); %>
<%- include('pagination.ejs', {__: __}) %>
</div>
</div>
<script>
<%- include('index.js') %>
document.getElementsByClassName('bangumi-tab')[<%- show %>].click();
<%- include('pagination.js', {__: __}) %>
</script>
36 changes: 36 additions & 0 deletions dist/templates/bgm-template.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<div class="bangumi-item">
<div class="bangumi-picture">
<img src="<%= lazyload ? (loading || "https://cdn.jsdelivr.net/npm/[email protected]/lib/img/loading.gif") : `https://lain.bgm.tv/pic/cover/c/${item.image}` %>" <%- lazyload ? ` data-src="https://lain.bgm.tv/pic/cover/c/${item.image}"` : '' %> referrerPolicy="no-referrer" width="110" style="width:110px;margin:20px auto;" />
</div>
<div class="bangumi-info">
<div class="bangumi-title">
<a target="_blank" href="https://bangumi.tv/subject/<%= item.id %>"><%= item.name_cn || item.name || 'Unknown' %></a>
</div>
<div class="bangumi-meta">
<span class="bangumi-info-items" <%- color_meta %>>
<span class="bangumi-info-item" <%- color_meta %>>
<% if(item.eps){ %>
<span class="bangumi-info-total"><%= item.eps %></span><em
class="bangumi-info-label-em">0</em>
</span>
<% } %>
<span class="bangumi-info-item bangumi-type">
<span class="bangumi-info-label">类型</span> <em><%= item.type %></em>
</span>
<span class="bangumi-info-item bangumi-wish">
<span class="bangumi-info-label">想看</span> <em><%= item.collection.wish || '-' %></em>
</span>
<span class="bangumi-info-item bangumi-doing">
<span class="bangumi-info-label">在看</span> <em><%= item.collection.doing || '-' %></em>
</span>
<span class="bangumi-info-item bangumi-collect">
<span class="bangumi-info-label">已看</span> <em><%= item.collection.collect || '-' %></em>
</span>
<span class="bangumi-info-item bangumi-info-item-score">
<span class="bangumi-info-label">评分</span> <em><%= item.rating.score || '-' %></em>
</span>
</span>
</div>
<div class="bangumi-comments" <%- color %>><p>简介:<%= item.summary || "暂无简介" %></p> </div>
</div>
</div>
7 changes: 7 additions & 0 deletions dist/templates/pagination.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="bangumi-pagination">
<a class="bangumi-button bangumi-firstpage" href="javascript:;" target="_self" onclick="return false"> <%= __('top') %></a>
<a class="bangumi-button bangumi-previouspage" href="javascript:;" target="_self" onclick="return false"><%= __('prev') %></a>
<span class="bangumi-pagenum">2 / 3</span>
<a class="bangumi-button bangumi-nextpage" href="javascript:;" target="_self" onclick="return false"><%= __('next') %></a>
<a class="bangumi-button bangumi-lastpage" href="javascript:;" target="_self" onclick="return false"><%= __('end') %></a>
</div>

0 comments on commit ca4712e

Please sign in to comment.