7 Commits

Author SHA1 Message Date
typist
006f3d4dbb 0.0.28
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m26s
2025-10-29 21:37:14 +08:00
typist
ff8d497f97 refactor: simplify SidebarFooter component
- Removed the 'need more tools?' link from the SidebarFooter.
- Updated the layout of SidebarFooter to use a flex column for better alignment.
2025-10-29 21:36:44 +08:00
typist
9c2799f7d5 0.0.27
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m14s
2025-10-29 14:49:15 +08:00
typist
dd70f9d886 feat: enhance caching strategies for Google Fonts
- Added caching configurations for Google Fonts stylesheets and webfonts.
- Implemented 'StaleWhileRevalidate' for stylesheets and 'CacheFirst' for font files to optimize loading and improve performance.
2025-10-29 14:49:06 +08:00
typist
35cccf6a8f 0.0.26
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m29s
2025-10-29 14:45:03 +08:00
c5616600fa Merge pull request 'feat: add Google Fonts for improved typography' (#11) from feat/update-fonts into main
Reviewed-on: #11
2025-10-29 14:43:59 +08:00
typist
986708fbb4 feat: add Google Fonts for improved typography
- Included preconnect links for Google Fonts to optimize loading.
- Added 'Roboto Mono' and 'Noto Sans SC' font families to enhance text presentation in the application.
2025-10-29 14:44:30 +08:00
5 changed files with 38 additions and 6 deletions

View File

@@ -18,6 +18,11 @@
<link rel="dns-prefetch" href="https://ipinfo.io"> <link rel="dns-prefetch" href="https://ipinfo.io">
<link rel="preconnect" href="https://ipinfo.io" crossorigin> <link rel="preconnect" href="https://ipinfo.io" crossorigin>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500&display=swap" rel="stylesheet">
<!-- Open Graph / Facebook --> <!-- Open Graph / Facebook -->
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:url" content="https://litek.typist.cc/" /> <meta property="og:url" content="https://litek.typist.cc/" />

View File

@@ -1,7 +1,7 @@
{ {
"name": "litek", "name": "litek",
"private": true, "private": true,
"version": "0.0.25", "version": "0.0.28",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@@ -114,11 +114,7 @@ export const AppSidebar = () => {
</SidebarGroupContent> </SidebarGroupContent>
</SidebarGroup> </SidebarGroup>
</SidebarContent> </SidebarContent>
<SidebarFooter className="flex flex-row justify-between items-center gap-2"> <SidebarFooter className="flex flex-col gap-2" />
<SidebarMenuButton variant="outline" asChild>
<a href="mailto:litek@mail.typist.cc">need more tools?</a>
</SidebarMenuButton>
</SidebarFooter>
</Sidebar> </Sidebar>
); );
}; };

View File

@@ -116,6 +116,7 @@
} }
body { body {
@apply bg-background text-foreground; @apply bg-background text-foreground;
font-family: 'Roboto Mono', 'Noto Sans SC', 'SF Mono', Consolas, monospace;
} }
} }

View File

@@ -43,6 +43,36 @@ export default defineConfig({
statuses: [0, 200] statuses: [0, 200]
} }
} }
},
{
// Google Fonts 样式表缓存
urlPattern: /^https:\/\/fonts\.googleapis\.com\/.*/i,
handler: 'StaleWhileRevalidate',
options: {
cacheName: 'google-fonts-stylesheets',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365 // 1 年
},
cacheableResponse: {
statuses: [0, 200]
}
}
},
{
// Google Fonts 字体文件缓存
urlPattern: /^https:\/\/fonts\.gstatic\.com\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'google-fonts-webfonts',
expiration: {
maxEntries: 30,
maxAgeSeconds: 60 * 60 * 24 * 365 // 1 年
},
cacheableResponse: {
statuses: [0, 200]
}
}
} }
], ],
cleanupOutdatedCaches: true, cleanupOutdatedCaches: true,