Skip to content

Commit 9384ed4

Browse files
committed
So Many Issue in Seo
1 parent dab946d commit 9384ed4

28 files changed

Lines changed: 721 additions & 82 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ hugo_stats.json
1111
# Generated CSS (built by npm run build:css before hugo)
1212
static/css/home-tailwind.css
1313
static/css/site.min.css
14+
15+
# Generated JS bundles (built by npm run build:js before hugo)
16+
static/js/*.min.js

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,12 @@ When [`data/history.yaml`](data/history.yaml) includes dates for a new year:
111111
- Edit glass-mode overrides in [`assets/css/modern-glass-theme.css`](assets/css/modern-glass-theme.css).
112112
- All six global CSS sources are bundled and minified into `static/css/site.min.css` by [`scripts/bundle-site-css.mjs`](scripts/bundle-site-css.mjs). Every page loads only this one file for global styles.
113113
- Page-specific CSS (`search.css`, `ladybug.css`, `history.css`, `cfddc.css`, `cookie-consent.css`) is still loaded individually where needed.
114-
- Always run `npm run build:css` before committing CSS-related changes (CI runs this on deploy).
114+
- Run `npm run build` (CSS + JS bundles) before deploy (CI runs this on deploy).
115+
- Edit JS sources in `static/js/*.js` (not `*.min.js`). Bundles are built by [`scripts/bundle-site-js.mjs`](scripts/bundle-site-js.mjs):
116+
- `site.min.js` — shared on all modern-layout pages (theme, nav, cookies, analytics, footer)
117+
- `home.min.js` — homepage only (hero, scroll, ladybug)
118+
- `search-palette.min.js` — loaded after inline `window.CFD_SEARCH` config
119+
- `cfddc.min.js` — CFDDC pages only
115120

116121
## Deployment
117122

assets/css/modern-dark-theme.css

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,16 @@
191191
}
192192

193193
[data-theme="dark"] body.home-page .site-beta-tag {
194-
color: rgb(186 230 253) !important;
195-
background-color: rgb(12 74 110 / 0.45) !important;
196-
--tw-ring-color: rgb(56 189 248 / 0.35) !important;
194+
color: rgb(125 211 252) !important;
197195
}
198196

199197
[data-theme="dark"] body.home-page .site-beta-tag:hover {
200-
color: rgb(224 242 254) !important;
201-
background-color: rgb(12 74 110 / 0.65) !important;
198+
color: rgb(186 230 253) !important;
202199
}
203200

201+
[data-theme="dark"] body.home-page .site-beta-tag--static,
204202
[data-theme="dark"] body.home-page .site-beta-tag--static:hover {
205-
color: rgb(186 230 253) !important;
206-
background-color: rgb(12 74 110 / 0.45) !important;
203+
color: rgb(148 163 184) !important;
207204
}
208205

209206
[data-theme="dark"] body.home-page .hover\:text-brand:hover,
@@ -291,11 +288,11 @@
291288
color: rgb(248 250 252) !important;
292289
}
293290

294-
[data-theme="dark"] body.home-page .home-hero__dot {
291+
[data-theme="dark"] body.home-page .home-hero__dot::after {
295292
background-color: rgb(100 116 139) !important;
296293
}
297294

298-
[data-theme="dark"] body.home-page .home-hero__dot--active {
295+
[data-theme="dark"] body.home-page .home-hero__dot--active::after {
299296
background-color: rgb(226 232 240) !important;
300297
}
301298

assets/css/modern-glass-theme.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,15 @@
419419

420420
/* ── Site beta tag ── */
421421
[data-theme="glass"] body .site-beta-tag {
422-
color: #0369a1 !important;
423-
background-color: rgba(224, 242, 254, 0.85) !important;
424-
--tw-ring-color: rgba(14, 165, 233, 0.35) !important;
422+
color: #0284c7 !important;
425423
}
426424

427425
[data-theme="glass"] body .site-beta-tag:hover {
428-
color: #0c4a6e !important;
429-
background-color: rgba(186, 230, 253, 0.95) !important;
426+
color: #0369a1 !important;
427+
}
428+
429+
[data-theme="glass"] body .site-beta-tag--static {
430+
color: #64748b !important;
430431
}
431432

432433
/* ── Buttons ── */

assets/css/modern-light-theme.css

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,15 @@
123123
}
124124

125125
[data-theme="light"] body .site-beta-tag {
126-
color: #0369a1 !important;
127-
background-color: #f0f9ff !important;
128-
--tw-ring-color: #bae6fd !important;
126+
color: #0284c7 !important;
129127
}
130128

131129
[data-theme="light"] body .site-beta-tag:hover {
132-
background-color: #e0f2fe !important;
130+
color: #0369a1 !important;
131+
}
132+
133+
[data-theme="light"] body .site-beta-tag--static {
134+
color: #64748b !important;
133135
}
134136

135137
/* ── Section bands (keep visible — unlike glass) ── */
@@ -202,7 +204,7 @@
202204
box-shadow: var(--light-shadow-card) !important;
203205
}
204206

205-
[data-theme="light"] body .home-hero__dot--active {
207+
[data-theme="light"] body .home-hero__dot--active::after {
206208
background-color: #0f172a !important;
207209
}
208210

assets/css/tailwind-input.css

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,26 @@
4040
}
4141

4242
.site-beta-tag {
43-
@apply inline-flex items-center px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider rounded-full border-0 cursor-pointer;
44-
@apply text-sky-700 bg-sky-50 ring-1 ring-sky-200/80 transition-colors;
43+
@apply relative ml-0.5 border-0 bg-transparent p-0 text-[0.5em] font-bold uppercase tracking-wide text-sky-600 cursor-pointer transition-colors leading-none;
44+
vertical-align: super;
45+
}
46+
47+
.site-beta-tag::before {
48+
content: '';
49+
position: absolute;
50+
inset: -8px -6px;
4551
}
4652

4753
.site-beta-tag:hover {
48-
@apply bg-sky-100 text-sky-800;
54+
@apply text-sky-700;
4955
}
5056

5157
.site-beta-tag--static {
52-
@apply cursor-default;
58+
@apply cursor-default text-slate-500;
5359
}
5460

5561
.site-beta-tag--static:hover {
56-
@apply bg-sky-50 text-sky-700;
62+
@apply text-slate-500;
5763
}
5864

5965
.home-hero {
@@ -107,15 +113,28 @@
107113
}
108114

109115
.home-hero__dot {
110-
@apply h-2 w-2 rounded-full bg-slate-300 transition-all duration-300 hover:bg-slate-400;
116+
@apply relative inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-full border-0 bg-transparent p-0 cursor-pointer transition-colors;
117+
}
118+
119+
.home-hero__dot::after {
120+
content: '';
121+
@apply block h-2 w-2 rounded-full bg-slate-400 transition-all duration-300;
122+
}
123+
124+
.home-hero__dot:hover::after {
125+
@apply bg-slate-500;
126+
}
127+
128+
.home-hero__dot--active::after {
129+
@apply h-2 w-6 bg-slate-800;
111130
}
112131

113-
.home-hero__dot--active {
114-
@apply w-6 bg-slate-800 hover:bg-slate-800;
132+
.home-hero__dot--active:hover::after {
133+
@apply bg-slate-800;
115134
}
116135

117136
.home-hero__nav-btn {
118-
@apply flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-slate-200/90 bg-white/90 text-slate-600 shadow-sm transition-colors;
137+
@apply flex h-11 w-11 shrink-0 items-center justify-center rounded-full border border-slate-200/90 bg-white/90 text-slate-600 shadow-sm transition-colors;
119138
@apply hover:border-slate-300 hover:bg-white hover:text-slate-900 focus:outline-none focus:ring-2 focus:ring-brand/20;
120139
}
121140

@@ -168,6 +187,21 @@
168187
@apply inline;
169188
}
170189

190+
/* Phosphor SVG sprite icons */
191+
.ph-icon {
192+
display: inline-block;
193+
width: 1.25em;
194+
height: 1.25em;
195+
flex-shrink: 0;
196+
fill: currentColor;
197+
vertical-align: -0.125em;
198+
}
199+
200+
.search-palette__result-icon .ph-icon {
201+
width: 1.25rem;
202+
height: 1.25rem;
203+
}
204+
171205
/* —— Search command palette (⌘K) —— */
172206
.search-trigger {
173207
@apply relative z-10 w-full max-w-lg mx-auto flex items-center gap-3 px-4 py-3.5 md:py-4 bg-white/90 border border-gray-200/90 rounded-2xl shadow-md shadow-slate-200/50 text-left cursor-pointer transition-all;

layouts/cfddc/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ partial "home/modern-page-start.html" (dict "page" . "navActive" "" "mainClass" "min-h-screen" "headExtra" `<link rel="stylesheet" href="/css/cfddc.css"><script src="/js/cfddc.js" defer></script>`) }}
1+
{{ partial "home/modern-page-start.html" (dict "page" . "navActive" "" "mainClass" "min-h-screen" "headExtra" `<link rel="stylesheet" href="/css/cfddc.css"><script src="/js/cfddc.min.js" defer></script>`) }}
22
{{- if eq .RelPermalink "/cfddc/" -}}
33
{{- .Scratch.Set "breadcrumbLabel" "CFDDC" -}}
44
{{ partial "cfddc/hub.html" . }}

layouts/index.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<link rel="stylesheet" href="/css/ladybug.css">
88
</head>
99
<body class="home-page bg-gray-50/50 text-slate-800 font-sans antialiased">
10+
{{ partial "icons-sprite.html" . }}
1011
{{ partial "skip-link.html" . }}
1112
{{ partial "home/nav.html" . }}
1213
<script>
@@ -34,11 +35,7 @@
3435
{{ partial "ladybug.html" . }}
3536
{{ partial "cookie-consent.html" . }}
3637
{{ partial "home/search-palette.html" . }}
37-
<script src="/js/a11y.js" defer></script>
38-
<script src="/js/home-hero.js" defer></script>
39-
<script src="/js/home-nav.js" defer></script>
40-
<script src="/js/home-scroll.js" defer></script>
41-
<script src="/js/theme.js" defer></script>
42-
<script src="/js/ladybug.js" defer></script>
38+
<script src="/js/site.min.js" defer></script>
39+
<script src="/js/home.min.js" defer></script>
4340
</body>
4441
</html>

layouts/partials/cookie-consent.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,3 @@ <h2 id="cookie-consent-title" class="cookie-consent-title">Cookie Consent</h2>
2525
</div>
2626
</div>
2727
<link rel="stylesheet" href="/css/cookie-consent.css">
28-
<script src="/js/cookie-consent.js" defer></script>
29-
<script src="/js/analytics.js" defer></script>

layouts/partials/home/faq.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ <h2 id="faq-heading" class="text-3xl md:text-4xl font-bold text-[#0B162C] tracki
88
<div class="home-faq-scroll flex-1 min-h-0 overflow-y-auto pr-1 -mr-1 flex flex-col gap-3 pb-4">
99
{{- range hugo.Data.faq.faqs -}}
1010
<details class="bg-white rounded-2xl border border-gray-100 shadow-sm px-6 py-4 group shrink-0">
11-
<summary class="text-[15px] font-semibold text-slate-900 cursor-pointer list-none flex justify-between items-center gap-4">
12-
{{ .question }}
13-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="16" height="16" class="shrink-0 text-slate-400 group-open:rotate-180 transition-transform" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>
11+
<summary class="cursor-pointer list-none flex justify-between items-center gap-4">
12+
<h3 class="text-[15px] font-semibold text-slate-900 m-0 flex-1 text-left">{{ .question }}</h3>
13+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="16" height="16" class="shrink-0 text-slate-500 group-open:rotate-180 transition-transform" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>
1414
</summary>
15-
<p class="text-slate-500 text-[14px] leading-relaxed mt-4 mb-0">{{ .answer }}</p>
15+
<p class="text-slate-600 text-[14px] leading-relaxed mt-4 mb-0">{{ .answer }}</p>
1616
</details>
1717
{{- end -}}
1818
</div>

0 commit comments

Comments
 (0)