mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 19:51:07 +02:00
refactor: optimize website performance and layout
- Replace ScrollButton with BackToTop component - Improve theme toggle and scrollbar event handling - Update layout and index page styling - Optimize client:load and client:idle directives - Remove deprecated Heti addon plugin
This commit is contained in:
parent
14f53a979a
commit
47951152d1
13 changed files with 164 additions and 559 deletions
|
@ -36,7 +36,7 @@ const postsByYear = await getPostsByYear()
|
|||
{posts.map(post => (
|
||||
// Single Post
|
||||
<li class="mt-7">
|
||||
{/* Post Title */}
|
||||
|
||||
<a
|
||||
class="hover:c-primary"
|
||||
href={`/posts/${post.data.slug || post.slug}`}
|
||||
|
@ -45,9 +45,9 @@ const postsByYear = await getPostsByYear()
|
|||
>
|
||||
{post.data.title}
|
||||
</a>
|
||||
{/* Post Date */}
|
||||
|
||||
<div
|
||||
class="mb-9 block text-5.6 leading-11 font-time lg:ml-4 lg:inline"
|
||||
class="mb-9 text-5.6 leading-11 font-time lg:(hidden)"
|
||||
transition:name={`time-${post.data.slug || post.slug}`}
|
||||
data-disable-transition-on-theme
|
||||
>
|
||||
|
@ -58,6 +58,16 @@ const postsByYear = await getPostsByYear()
|
|||
{post.remarkPluginFrontmatter?.minutes} min
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-9 hidden text-5.6 leading-11 font-time lg:(ml-4 inline)">
|
||||
<time>
|
||||
{post.data.published.toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '-')}
|
||||
</time>
|
||||
<span class="ml-2">
|
||||
{post.remarkPluginFrontmatter?.minutes} min
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue