starters: migrate Link-In-Bio to Tailwind 4

This commit is contained in:
George Cushen committed 2025-09-06 22:42:46 +01:00
1 parent 03718628e4
commit 1d2248be50
11 files changed
+161 -42

No files matched your search

+8 -5
View File
@@ -2,8 +2,14 @@
export function initTheme() {
const root = document.documentElement;
const defaultTheme = root.dataset.wcThemeDefault;
const setDark = () => { root.classList.add('dark'); root.style.colorScheme = 'dark'; };
const setLight = () => { root.classList.remove('dark'); root.style.colorScheme = 'light'; };
const setDark = () => {
root.classList.add('dark');
root.style.colorScheme = 'dark';
};
const setLight = () => {
root.classList.remove('dark');
root.style.colorScheme = 'light';
};
if ('wc-color-theme' in localStorage) {
localStorage.getItem('wc-color-theme') === 'dark' ? setDark() : setLight();
@@ -39,6 +45,3 @@ export function applyHugoStyleFixes() {
});
});
}
@@ -1,6 +1,6 @@
<div class="absolute right-0 top-0 m-3 bg-primary-100 dark:bg-primary-700 rounded-full p-2 z-10">
<div class="h-[24px] w-[24px]">
<button class="theme-toggle" accesskey="t" title="" aria-label="{{ i18n "theme_selector" }}">
<button class="theme-toggle h-[24px] w-[24px] flex items-center justify-center" accesskey="t" title="" aria-label="{{ i18n "theme_selector" }}">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="block dark:hidden">
@@ -81,7 +81,7 @@
{{- if hugo.IsProduction -}}
{{- $hb_head = $hb_head | fingerprint "sha256" -}}
{{- end -}}
<script defer src="{{ $hb_head.RelPermalink }}"{{ if hugo.IsProduction }} integrity="{{ $hb_head.Data.Integrity }}" crossorigin="anonymous"{{ end }}></script>
<script src="{{ $hb_head.RelPermalink }}"{{ if hugo.IsProduction }} integrity="{{ $hb_head.Data.Integrity }}" crossorigin="anonymous"{{ end }}></script>
{{/* Analytics & Verification */}}
{{/* !CACHED! All analytics and verification code is at site level */}}