mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 11:41:17 +02:00
feat: Improve tag pages and article tag display
This commit is contained in:
parent
b5bf2883cf
commit
f96af1b102
18 changed files with 422 additions and 315 deletions
|
@ -25,6 +25,8 @@ const { Content, remarkPluginFrontmatter } = await post.render()
|
|||
postImage={post.data.image}
|
||||
>
|
||||
<article class="heti">
|
||||
<!-- after:(absolute h-0.25 w-3 origin-left rotate-30 bg-secondary content-empty) before:(absolute h-0.25 w-3 origin-left rotate-330 bg-secondary content-empty) -->
|
||||
<div class="relative h-0.25 w-10 bg-secondary opacity-25"></div>
|
||||
<h1 class="post-title">
|
||||
<span
|
||||
transition:name={`post-${post.data.slug || post.slug}`}
|
||||
|
@ -35,7 +37,7 @@ const { Content, remarkPluginFrontmatter } = await post.render()
|
|||
</h1>
|
||||
|
||||
<div
|
||||
class="mb-14.625 block c-primary font-time"
|
||||
class="mb-16.375 block c-primary font-time"
|
||||
transition:name={`time-${post.data.slug || post.slug}`}
|
||||
data-disable-transition-on-theme
|
||||
>
|
||||
|
@ -47,5 +49,32 @@ const { Content, remarkPluginFrontmatter } = await post.render()
|
|||
</span>
|
||||
</div>
|
||||
<Content />
|
||||
|
||||
{post.data.tags && post.data.tags.length > 0 && (
|
||||
<div class="mt-12">
|
||||
<div class="h-0.125 w-10 bg-secondary opacity-25"></div>
|
||||
<div class="mt-4.375 w-95% flex flex-wrap gap-x-3 gap-y-3.6 font-medium font-serif">
|
||||
{post.data.tags.map(tag => (
|
||||
<a
|
||||
href={`/tags/${tag}/`}
|
||||
class="inline-block whitespace-nowrap border border-secondary/25 rounded-full px-3.2 py-0.7 c-secondary transition-colors hover:(border-secondary text-primary)"
|
||||
>
|
||||
{tag}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</article>
|
||||
</Layout>
|
||||
|
||||
<!-- <script is:inline>
|
||||
function _handleBack(e) {
|
||||
if (window.history.length > 2) {
|
||||
e.preventDefault()
|
||||
window.history.back()
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
</script> -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue