fix: replace Tailwind CDN with local CSS in docs templates

- Remove Tailwind CDN dependency from documentation pages
- Load local /static/style.css instead (includes typography plugin)
- Remove inline tailwind.config script (no longer needed)
- Code blocks now use proper dark colors from input.css overrides
- Consistent with other templates (admin, dashboard, analytics)
- Faster loading (no external CDN request)
- Local build includes all needed CSS (typography + custom overrides)
- Add Zed editor configuration for CSS at-rule warnings
This commit is contained in:
2026-02-03 09:40:02 -05:00
parent 9d775511d3
commit 4d2069abdb
3 changed files with 36 additions and 77 deletions
+3 -45
View File
@@ -11,32 +11,11 @@ templ DocsLayout(nav Navigation, doc Document, user User) {
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{ doc.Title } - Bookhoard Documentation</title>
<script src="https://cdn.tailwindcss.com?plugins=typography"></script>
<link href="/static/style.css" rel="stylesheet">
<link rel="stylesheet" href="/static/highlight-dark.min.css">
<script src="/static/highlight.min.js"></script>
<script src="/static/lunr.min.js"></script>
<script src="/static/lunr-flex.min.js"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
background: {
primary: '#1a1b26',
secondary: '#16161e',
},
text: {
primary: '#c0caf5',
secondary: '#9aa5ce',
},
border: '#414868',
accent: '#7aa2f7',
},
},
}
}
</script>
</head>
<body class="bg-background-primary text-text-primary font-sans antialiased">
<!-- Mobile Menu Button -->
@@ -354,39 +333,18 @@ templ DocsLayout(nav Navigation, doc Document, user User) {
</html>
}
templ DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer APIExplorerData) {
templ DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer APIExplorerData) {
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{ doc.Title } - Bookhoard Documentation</title>
<script src="https://cdn.tailwindcss.com?plugins=typography"></script>
<link href="/static/style.css" rel="stylesheet">
<link rel="stylesheet" href="/static/highlight-dark.min.css">
<script src="/static/highlight.min.js"></script>
<script src="/static/lunr.min.js"></script>
<script src="/static/lunr-flex.min.js"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
background: {
primary: '#1a1b26',
secondary: '#16161e',
},
text: {
primary: '#c0caf5',
secondary: '#9aa5ce',
},
border: '#414868',
accent: '#7aa2f7',
},
},
}
}
</script>
</head>
<body class="bg-background-primary text-text-primary font-sans antialiased">
<!-- Mobile Menu Button -->