Skip to content

Commit

Permalink
templates: update log base url
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhan005 committed Jul 30, 2024
1 parent d0e669d commit d3e6a7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions templates/change-logs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ <h2>NekoBox 开发日记</h2>
<p>这里记录了 NekoBox 的功能迭代历史以及我的一些碎碎念。</p>
</div>
<dl class="uk-description-list uk-description-list-divider" x-data="{ list: [] }"
x-init="list = (await(await fetch('https://pb.n3ko.cc/api/collections/changelogs/records?sort=-published_at')).json())">
<template x-for="log in list.items">
<div x-html="`<br><hr><dt>${new Date(log.published_at).toLocaleDateString()}</dt><dd class=uk-text-small>${log.content}</dd>`"></div>
x-init="list = (await(await fetch('https://json.n3ko.cc/nekobox-updatehistory/index.json')).json())">
<template x-for="log in list.data">
<div x-html="`<br><hr><dt>${new Date(log.date).toLocaleDateString()}</dt><br><dd class=uk-text-small>${log.content}</dd>`"></div>
</template>
</dl>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ <h1 class="uk-heading-small">NekoBox</h1>
<br>
<hr>
<div x-data="{ c: '' }" x-init="c = await (async () => {
let log = (await(await fetch('https://pb.n3ko.cc/api/collections/changelogs/records?sort=-published_at&perPage=1')).json()).items[0];
return `<p class=uk-article-meta>开发日记 - ${new Date(log.published_at).toLocaleDateString()}</p><span class=uk-text-small>${log.content}</span>`;
let log = (await(await fetch('https://json.n3ko.cc/nekobox-updatehistory/latest.json')).json())[0];
return `<p class=uk-article-meta>开发日记 - ${new Date(log.date).toLocaleDateString()}</p><span class=uk-text-small>${log.content}</span>`;
})()" x-html="c">
</div>
<p class="uk-text-right uk-text-small"><a class="uk-link-text" href="/change-logs">查看更多...</a></p>
Expand Down

0 comments on commit d3e6a7a

Please sign in to comment.