Sitemap, page nav and burger

This commit is contained in:
Alicia Sykes committed 2025-09-14 22:59:09 +01:00
1 parent a6d265aaf0
commit 531815f226
3 files changed
+14 -18

No files matched your search

@@ -346,7 +346,7 @@
position: fixed;
top: 0;
right: -100%;
width: 100vw;
width: min(90vw, 400px);
height: 100vh;
background-color: var(--bg-primary);
border-left: 1px solid var(--border-primary);
@@ -355,17 +355,15 @@
overflow-y: auto;
transition: right var(--transition-medium) cubic-bezier(0.4, 0, 0.2, 1);
@media (min-width: 480px) {
width: min(90vw, 400px);
@media (max-width: 480px) {
&.open { width: 100%;}
}
&.open {
right: 0;
.menu-item {
animation: slideInFromRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.menu-section:nth-child(1) .menu-item { animation-delay: 0.1s; }
.menu-section:nth-child(2) .menu-item { animation-delay: 0.15s; }
.menu-section:nth-child(3) .menu-item { animation-delay: 0.2s; }
+4
View File
@@ -13,6 +13,10 @@ export type NavGroup = {
items: NavItem[];
};
export const aboutPages: NavItem[] = [
{ href: '/about', label: 'About', description: `About and its mission` },
];
// Individual standalone pages
export const STANDALONE_PAGES: NavItem[] = [];
+7 -13
View File
@@ -1,17 +1,11 @@
import { ALL_PAGES, TOP_NAV, footerLinks } from '$lib/constants/nav.ts';
import { site } from '$lib/constants/site.ts';
import { ALL_PAGES, TOP_NAV, footerLinks } from '$lib/constants/nav';
import { site } from '$lib/constants/site';
/**
* Dynamic sitemap.xml endpoint
*
* Generates a sitemap from the navigation structure in nav.ts, ensuring all
* pages are discoverable by search engines. Includes:
*
* - All pages from the navigation structure (123+ URLs)
* - Appropriate priority based on page hierarchy (1.0 for homepage, 0.9 for top nav, etc.)
* - Change frequency based on content type (monthly for reference, weekly for tools)
* - Current timestamp for lastmod
* - Proper caching headers
* Generates a sitemap from the page structure in nav.ts, for search engines
* With a priority, change frequency, lastmod date and caching headers
*/
export async function GET() {
// Collect all unique URLs
@@ -72,9 +66,9 @@ ${sortedUrls.map(url => {
} else if (url === '/about') {
changefreq = 'monthly';
} else if (url.startsWith('/reference/')) {
changefreq = 'monthly'; // Reference pages change less frequently
changefreq = 'weekly';
} else {
changefreq = 'weekly'; // Tool pages may get updates
changefreq = 'monthly';
}
return ` <url>
@@ -92,4 +86,4 @@ ${sortedUrls.map(url => {
'Cache-Control': 'max-age=3600, s-maxage=86400' // Cache for 1 hour, CDN for 1 day
}
});
}
}