mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 12:01:33 +02:00
feat: add heading anchor links
This commit is contained in:
parent
328104ed1a
commit
e5ecbe1341
8 changed files with 117 additions and 29 deletions
|
@ -17,7 +17,7 @@ const SubtitleTag = isPost ? 'div' : 'h2'
|
|||
<header
|
||||
class:list={[
|
||||
isPost ? 'mb-10.8' : 'mb-10.5',
|
||||
'cjk:tracking-0.02em lg:(uno-desktop-column top-20)',
|
||||
'lg:(uno-desktop-column top-20) cjk:tracking-0.02em',
|
||||
]}
|
||||
>
|
||||
<TitleTag
|
||||
|
|
|
@ -37,7 +37,7 @@ const navItems = [
|
|||
class:list={[
|
||||
isPost ? 'hidden lg:block' : '',
|
||||
'mb-10.5 text-3.6 font-semibold leading-8.75 font-navbar',
|
||||
'cjk:tracking-0.02em lg:(uno-desktop-column text-4 leading-9.72 bottom-50)',
|
||||
'lg:(uno-desktop-column text-4 leading-9.72 bottom-50) cjk:tracking-0.02em',
|
||||
]}
|
||||
>
|
||||
<ul>
|
||||
|
|
|
@ -40,7 +40,7 @@ function getPostPath(post: Post) {
|
|||
{/* post title */}
|
||||
<h3 class="inline">
|
||||
<a
|
||||
class="cjk:tracking-0.02em hover:c-primary"
|
||||
class="hover:c-primary cjk:tracking-0.02em"
|
||||
lg={isHome ? 'font-medium text-4.5' : ''}
|
||||
href={getPostPath(post)}
|
||||
transition:name={`post-${post.data.abbrlink || post.id}-${lang}`}
|
||||
|
@ -54,12 +54,12 @@ function getPostPath(post: Post) {
|
|||
<>
|
||||
<PinIcon
|
||||
aria-hidden="true"
|
||||
class="ml-0.25em inline-block aspect-square w-3.7 translate-y--0.45 lg:hidden"
|
||||
class="ml-0.25em inline-block aspect-square w-0.92em translate-y--0.1em lg:hidden"
|
||||
fill="currentColor"
|
||||
/>
|
||||
<PinIconBold
|
||||
aria-hidden="true"
|
||||
class="hidden lg:(ml-0.25em inline-block aspect-square w-4.1 translate-y--0.45)"
|
||||
class="hidden lg:(ml-0.25em inline-block aspect-square w-1.05em translate-y--0.14em)"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue