Skip to content

Commit

Permalink
sponsor: update to new api
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhan005 committed Aug 10, 2024
1 parent b6b6e81 commit c97a38a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
8 changes: 0 additions & 8 deletions .deepsource.toml

This file was deleted.

20 changes: 4 additions & 16 deletions templates/sponsor.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}

.sponsor ul.platform li.icon-alipay {
background: url(https://cdn.github.red/wp-content/plugins/you-shang/image/alipay.svg) no-repeat center center;
background: url(https://img10.360buyimg.com/ceco/jfs/t1/188386/33/41420/3658/66b6ecf9F03bfd7eb/781b0e5e0a6db211.png) no-repeat center center;
width: 24px;
height: 24px;
background-size: cover;
Expand All @@ -72,8 +72,8 @@ <h2>给 NekoBox 打钱</h2>
<div class="head">谢谢老板 Thanks♪(・ω・)ノ</div>
<div class="qrcode">
<div class="qrcode-li alipay"><img
src="https://unpkg.com/@e99p1ant/[email protected]/images/alipay_qrcode.jpg">
<noscript><img src="https://unpkg.com/@e99p1ant/[email protected]/images/alipay_qrcode.jpg"/></noscript>
src="https://img13.360buyimg.com/ceco/jfs/t1/2848/30/22668/22212/66b6ee87F15f75426/9f8969181dd1f244.png" referrerpolicy="no-referrer">
<noscript><img src="https://img13.360buyimg.com/ceco/jfs/t1/2848/30/22668/22212/66b6ee87F15f75426/9f8969181dd1f244.png" referrerpolicy="no-referrer"/></noscript>
</div>
</div>
<ul class="platform">
Expand All @@ -85,21 +85,9 @@ <h2>给 NekoBox 打钱</h2>
</div>
<div uk-alert class="uk-text-small">感谢以下小伙伴对 NekoBox 的支持!</div>
<table class="uk-table uk-table-small uk-table-divider">
<thead>
<tr>
<th>日期</th>
<th>附言</th>
<th>金额</th>
</tr>
</thead>
<tbody x-data="{ s: '' }" x-init="
s = await (async () => {
let html = '';
let items = (await(await fetch('https://pb.n3ko.cc/api/collections/nekobox_sponsors/records?perPage=500&sort=-date')).json()).items;
items.forEach(item => {
html += `<tr class=uk-text-meta><td>${item.date.slice(0,10)}</td><td>${item.desc}</td><td>¥ ${item.price.toFixed(2)}</td></tr>`;
})
return html;
return (await(await fetch('https://json.n3ko.cc/nekobox-sponsor/index.json')).json()).data[0].content;
})()
" x-html="s">
</tbody>
Expand Down

0 comments on commit c97a38a

Please sign in to comment.