{
{links.map((link, index) => (
<>
-
+
{link.name}
{index < links.length - 1 && ' / '}
@@ -39,7 +39,7 @@ const links = socialLinks.map((link) => {
- Powered by Astro and Retypeset
+ Powered by Astro and Retypeset
diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro
index ade34a6..9b8667b 100644
--- a/src/components/Navbar.astro
+++ b/src/components/Navbar.astro
@@ -10,7 +10,7 @@ const isTagActive = isTag
const isAboutActive = isAbout
function getNavItemClass(isActive: boolean) {
- return isActive ? 'font-bold c-primary' : 'hover:(c-primary font-bold) transition-all'
+ return isActive ? 'font-bold c-primary highlight-static' : 'hover:(c-primary font-bold) transition-all highlight-hover'
}
const navItems = [
diff --git a/src/components/Widgets/BackToTop.astro b/src/components/Widgets/BackToTop.astro
index 721cfe3..c07d758 100644
--- a/src/components/Widgets/BackToTop.astro
+++ b/src/components/Widgets/BackToTop.astro
@@ -61,5 +61,5 @@ function initBackToTop() {
}
// Handle page transitions
-document.addEventListener('astro:page-load', initBackToTop)
+document.addEventListener('astro:after-swap', initBackToTop)
diff --git a/src/components/Widgets/TOC.astro b/src/components/Widgets/TOC.astro
index a657a22..fb8110d 100644
--- a/src/components/Widgets/TOC.astro
+++ b/src/components/Widgets/TOC.astro
@@ -217,6 +217,6 @@ function setupTOCHighlight() {
}
setupTOCHighlight()
-document.addEventListener('astro:page-load', setupTOCHighlight)
+document.addEventListener('astro:after-swap', setupTOCHighlight)
diff --git a/src/layouts/Head.astro b/src/layouts/Head.astro
index b7f6396..83338f1 100644
--- a/src/layouts/Head.astro
+++ b/src/layouts/Head.astro
@@ -1,9 +1,9 @@
---
+import { ClientRouter } from 'astro:transitions'
+import katexCSS from 'katex/dist/katex.min.css?url'
import { allLocales, defaultLocale, themeConfig } from '@/config'
import { ui } from '@/i18n/ui'
import { getPageInfo } from '@/utils/page'
-import { ClientRouter } from 'astro:transitions'
-import katexCSS from 'katex/dist/katex.min.css?url'
interface Props {
postTitle?: string
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index 9d5cfe8..2b0dfe3 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -22,7 +22,7 @@ interface Props {
}
const { postTitle, postDescription, postSlug, supportedLangs = [] } = Astro.props
-const { isPost, isAbout } = getPageInfo(Astro.url.pathname)
+const { isPost } = getPageInfo(Astro.url.pathname)
const fontStyle = themeConfig.global.fontStyle === 'serif' ? 'font-serif' : 'font-sans'
const MarginBottom = isPost && themeConfig.comment?.enabled
? 'mb-10' // Post page with comment system
@@ -51,7 +51,7 @@ const MarginBottom = isPost && themeConfig.comment?.enabled
- {(isPost || isAbout) && }
- {(isPost || isAbout) && }
+
+