Commit 8c1fce2

HPCesia <me@hpcesia.com>
2025-01-24 05:37:13
perf: footer position
add flex style to the GlobalLayout to make the footer stick to the bottom of the page
1 parent 7ee18fb
Changed files (2)
src/components/PageFooter.astro
@@ -4,7 +4,7 @@ import { footerConfig, profileConfig } from '@/config';
 const currentYear = new Date().getFullYear();
 ---
 
-<footer id="footer" class="relative mt-auto">
+<footer id="footer" class="relative mt-auto w-full flex-shrink-0">
   <div id="footer-links"></div>
   <div
     id="footer-bar-wrapper"
src/layouts/GlobalLayout.astro
@@ -12,7 +12,7 @@ let { title, lang, description } = Astro.props;
 
 let pageTitle: string;
 if (title) pageTitle = `${title} - ${siteConfig.title}`;
-else pageTitle = `${siteConfig.title}`;
+else pageTitle = `${siteConfig.title} - ${siteConfig.subtitle}`;
 
 if (!lang) lang = `${siteConfig.lang}`;
 const siteLang = lang.replace('_', '-');
@@ -45,7 +45,7 @@ const siteLang = lang.replace('_', '-');
 
     <slot name="head" />
   </head>
-  <body class="theme-bg theme-text">
+  <body class="theme-bg theme-text flex min-h-screen flex-col">
     <slot />
   </body>
 </html>