From 6d350500f1bdadc9604ece5980dafa02150dd849 Mon Sep 17 00:00:00 2001
From: Anton Bulakh <him@necauq.ua>
Date: Thu, 27 Feb 2025 21:35:19 +0000
Subject: [PATCH] fix(goatcounter): properly count SPA page hits (#1718)
---
quartz/util/theme.ts | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/quartz/util/theme.ts b/quartz/util/theme.ts
index 47951c4..0c90306 100644
--- a/quartz/util/theme.ts
+++ b/quartz/util/theme.ts
@@ -7,6 +7,12 @@
secondary: string
tertiary: string
highlight: string
+ textHighlight: string
+}
+
+interface Colors {
+ lightMode: ColorScheme
+ darkMode: ColorScheme
}
export interface Theme {
@@ -15,14 +21,15 @@
body: string
code: string
}
- colors: {
- lightMode: ColorScheme
- darkMode: ColorScheme
- }
+ cdnCaching: boolean
+ colors: Colors
+ fontOrigin: "googleFonts" | "local"
}
+export type ThemeKey = keyof Colors
+
const DEFAULT_SANS_SERIF =
- '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'
+ 'system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
const DEFAULT_MONO = "ui-monospace, SFMono-Regular, SF Mono, Menlo, monospace"
export function googleFontHref(theme: Theme) {
@@ -43,6 +50,7 @@
--secondary: ${theme.colors.lightMode.secondary};
--tertiary: ${theme.colors.lightMode.tertiary};
--highlight: ${theme.colors.lightMode.highlight};
+ --textHighlight: ${theme.colors.lightMode.textHighlight};
--headerFont: "${theme.typography.header}", ${DEFAULT_SANS_SERIF};
--bodyFont: "${theme.typography.body}", ${DEFAULT_SANS_SERIF};
@@ -58,6 +66,7 @@
--secondary: ${theme.colors.darkMode.secondary};
--tertiary: ${theme.colors.darkMode.tertiary};
--highlight: ${theme.colors.darkMode.highlight};
+ --textHighlight: ${theme.colors.darkMode.textHighlight};
}
`
}
--
Gitblit v1.10.0