Skip to content

Commit 0c5924b

Browse files
committed
Removing LLM Data center from analytics
1 parent 1cb4aee commit 0c5924b

6 files changed

Lines changed: 66 additions & 12 deletions

File tree

assets/css/modern-dark-theme.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,10 @@
818818
color: rgb(52 211 153) !important;
819819
}
820820

821+
[data-theme="dark"] body.home-page .home-why__perk-text {
822+
color: rgb(203 213 225) !important;
823+
}
824+
821825
/* —— Breadcrumbs —— */
822826
[data-theme="dark"] body.home-page nav[aria-label="Breadcrumb"] a {
823827
color: rgb(148 163 184);
@@ -877,7 +881,7 @@
877881
}
878882

879883
[data-theme="dark"] body.home-page .site-footer__stat {
880-
color: rgb(100 116 139);
884+
color: rgb(148 163 184);
881885
}
882886

883887
[data-theme="dark"] body.home-page .site-footer__cta {
@@ -932,7 +936,7 @@
932936
}
933937

934938
[data-theme="dark"] body.home-page .site-footer__copy {
935-
color: rgb(100 116 139);
939+
color: rgb(148 163 184);
936940
}
937941

938942
[data-theme="dark"] body.home-page .site-footer__legal li:not(:last-child)::after {

assets/css/modern-glass-theme.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@
712712
[data-theme="glass"] body .site-footer__tagline,
713713
[data-theme="glass"] body .site-footer__copy,
714714
[data-theme="glass"] body .site-footer__stat {
715-
color: #64748b !important;
715+
color: #475569 !important;
716716
}
717717

718718
[data-theme="glass"] body .site-footer__links a,
@@ -731,11 +731,14 @@
731731

732732
/* Home sections */
733733
[data-theme="glass"] body .home-why__intro,
734-
[data-theme="glass"] body .home-why__card-text,
735-
[data-theme="glass"] body .home-why__perk-text {
734+
[data-theme="glass"] body .home-why__card-text {
736735
color: #475569 !important;
737736
}
738737

738+
[data-theme="glass"] body .home-why__perk-text {
739+
color: #334155 !important;
740+
}
741+
739742
[data-theme="glass"] body .home-testimonial-card p {
740743
color: #475569 !important;
741744
}

assets/css/tailwind-input.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@
12571257
}
12581258

12591259
.site-footer__stat {
1260-
@apply text-xs text-slate-400;
1260+
@apply text-xs text-slate-600;
12611261
}
12621262

12631263
.site-footer__nav {
@@ -1337,7 +1337,7 @@
13371337
}
13381338

13391339
.site-footer__copy {
1340-
@apply m-0 text-xs text-slate-400;
1340+
@apply m-0 text-xs text-slate-600;
13411341
}
13421342

13431343
.site-footer__legal {

layouts/index.html

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
{{ partial "header.html" . }}
55
{{ partial "home/head.html" . }}
66
<link rel="preload" as="image" href="/images/hero/slide-1.jpg" fetchpriority="high">
7-
<link rel="stylesheet" href="/css/ladybug.css">
87
</head>
98
<body class="home-page bg-gray-50/50 text-slate-800 font-sans antialiased">
109
{{ partial "icons-sprite.html" . }}
@@ -37,5 +36,26 @@
3736
{{ partial "home/search-palette.html" . }}
3837
<script src="/js/site.min.js" defer></script>
3938
<script src="/js/home.min.js" defer></script>
39+
<script>
40+
(function () {
41+
if (!document.getElementById('ladybug-container')) return;
42+
var fired = false;
43+
function loadLadybug() {
44+
if (fired) return;
45+
fired = true;
46+
var link = document.createElement('link');
47+
link.rel = 'stylesheet';
48+
link.href = '/css/ladybug.css';
49+
document.head.appendChild(link);
50+
var s = document.createElement('script');
51+
s.src = '/js/ladybug.min.js';
52+
s.defer = true;
53+
document.body.appendChild(s);
54+
}
55+
['scroll', 'click', 'keydown', 'touchstart'].forEach(function (ev) {
56+
window.addEventListener(ev, loadLadybug, { once: true, passive: true });
57+
});
58+
})();
59+
</script>
4060
</body>
4161
</html>

scripts/bundle-site-js.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
*
44
* Outputs:
55
* site.min.js — theme, a11y, nav, cookie consent, analytics, footer
6-
* home.min.js — hero carousel, scroll, ladybug (homepage only)
6+
* home.min.js — hero carousel, scroll (homepage only)
7+
* ladybug.min.js — ladybug easter egg (homepage only, lazy-loaded)
78
* search-palette.min.js — search palette (after inline window.CFD_SEARCH)
89
* cfddc.min.js — CFDDC year pages only
910
*
@@ -32,7 +33,11 @@ const BUNDLES = [
3233
},
3334
{
3435
out: 'home.min.js',
35-
files: ['home-hero.js', 'home-scroll.js', 'ladybug.js'],
36+
files: ['home-hero.js', 'home-scroll.js'],
37+
},
38+
{
39+
out: 'ladybug.min.js',
40+
files: ['ladybug.js'],
3641
},
3742
{
3843
out: 'search-palette.min.js',

static/js/cookie-consent.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,22 @@
8686
}
8787
}
8888

89+
// Arm listeners and call fn on the first user interaction
90+
function onFirstInteraction(fn) {
91+
var fired = false;
92+
function go() {
93+
if (fired) return;
94+
fired = true;
95+
['scroll', 'click', 'keydown', 'touchstart'].forEach(function (ev) {
96+
window.removeEventListener(ev, go, { passive: true });
97+
});
98+
fn();
99+
}
100+
['scroll', 'click', 'keydown', 'touchstart'].forEach(function (ev) {
101+
window.addEventListener(ev, go, { once: true, passive: true });
102+
});
103+
}
104+
89105
// Load Google Analytics (GA4 + Consent Mode v2)
90106
function loadGoogleAnalytics() {
91107
const gaMeasurementId = getGAMeasurementId();
@@ -144,11 +160,17 @@
144160
loadMicrosoftClarity();
145161
}
146162

163+
// Ensure Consent Mode defaults are set, then load GA on first interaction
164+
function scheduleGoogleAnalytics() {
165+
initConsentDefaults();
166+
onFirstInteraction(loadGoogleAnalytics);
167+
}
168+
147169
// Handle accept button click
148170
function handleAccept() {
149171
setConsentStatus(COOKIE_CONSENT_ACCEPTED);
150172
hideCookieBanner();
151-
loadGoogleAnalytics();
173+
scheduleGoogleAnalytics();
152174
}
153175

154176
// Handle decline button click
@@ -189,7 +211,7 @@
189211
// No consent given yet, show banner
190212
showCookieBanner();
191213
} else if (consentStatus === COOKIE_CONSENT_ACCEPTED) {
192-
loadGoogleAnalytics();
214+
scheduleGoogleAnalytics();
193215
}
194216
// If declined, do nothing
195217

0 commit comments

Comments
 (0)