removed theme switcher, always uses dark theme
This commit is contained in:
@@ -341,9 +341,6 @@
|
|||||||
.mt-1 {
|
.mt-1 {
|
||||||
margin-top: calc(var(--spacing) * 1);
|
margin-top: calc(var(--spacing) * 1);
|
||||||
}
|
}
|
||||||
.mt-1\.5 {
|
|
||||||
margin-top: calc(var(--spacing) * 1.5);
|
|
||||||
}
|
|
||||||
.mt-2 {
|
.mt-2 {
|
||||||
margin-top: calc(var(--spacing) * 2);
|
margin-top: calc(var(--spacing) * 2);
|
||||||
}
|
}
|
||||||
@@ -570,9 +567,6 @@
|
|||||||
.w-80 {
|
.w-80 {
|
||||||
width: calc(var(--spacing) * 80);
|
width: calc(var(--spacing) * 80);
|
||||||
}
|
}
|
||||||
.w-fit {
|
|
||||||
width: fit-content;
|
|
||||||
}
|
|
||||||
.w-full {
|
.w-full {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
@@ -2322,11 +2316,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.lg\:inline {
|
|
||||||
@media (width >= 64rem) {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.lg\:grid-cols-2 {
|
.lg\:grid-cols-2 {
|
||||||
@media (width >= 64rem) {
|
@media (width >= 64rem) {
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ func getFooterItems() []FooterItem {
|
|||||||
// Returns the template fragment for the Footer
|
// Returns the template fragment for the Footer
|
||||||
templ Footer() {
|
templ Footer() {
|
||||||
<footer class="bg-mantle mt-10">
|
<footer class="bg-mantle mt-10">
|
||||||
<div class="relative mx-auto max-w-screen-xl px-4 py-8 sm:px-6 lg:px-8">
|
<div class="relative mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8">
|
||||||
@backToTopButton()
|
@backToTopButton()
|
||||||
<div class="lg:flex lg:items-end lg:justify-between">
|
<div class="lg:flex lg:items-end lg:justify-between">
|
||||||
@footerBranding()
|
@footerBranding()
|
||||||
@@ -23,7 +23,6 @@ templ Footer() {
|
|||||||
</div>
|
</div>
|
||||||
<div class="lg:flex lg:items-end lg:justify-between">
|
<div class="lg:flex lg:items-end lg:justify-between">
|
||||||
@footerCopyright()
|
@footerCopyright()
|
||||||
@themeSelector()
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
@@ -91,38 +90,3 @@ templ footerCopyright() {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ themeSelector() {
|
|
||||||
<div>
|
|
||||||
<div class="mt-2 text-center">
|
|
||||||
<label for="theme-select" class="hidden lg:inline">Theme</label>
|
|
||||||
<select
|
|
||||||
name="ThemeSelect"
|
|
||||||
id="theme-select"
|
|
||||||
class="mt-1.5 inline rounded-lg bg-surface0 p-2 w-fit"
|
|
||||||
x-model="theme"
|
|
||||||
>
|
|
||||||
<template
|
|
||||||
x-for="themeopt in [
|
|
||||||
'dark',
|
|
||||||
'light',
|
|
||||||
'system',
|
|
||||||
]"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
x-text="displayThemeName(themeopt)"
|
|
||||||
:value="themeopt"
|
|
||||||
:selected="theme === themeopt"
|
|
||||||
></option>
|
|
||||||
</template>
|
|
||||||
</select>
|
|
||||||
<script>
|
|
||||||
const displayThemeName = (value) => {
|
|
||||||
if (value === "dark") return "Dark (Mocha)";
|
|
||||||
if (value === "light") return "Light (Latte)";
|
|
||||||
if (value === "system") return "System";
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -11,13 +11,8 @@ templ Layout(title string) {
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html
|
<html
|
||||||
lang="en"
|
lang="en"
|
||||||
x-data="{ theme: localStorage.getItem('theme') || 'system'}"
|
|
||||||
x-init="$watch('theme', (val) => localStorage.setItem('theme', val))"
|
|
||||||
x-bind:class="{'dark': theme === 'dark' || (theme === 'system' &&
|
|
||||||
window.matchMedia('(prefers-color-scheme: dark)').matches)}"
|
|
||||||
>
|
>
|
||||||
<head>
|
<head>
|
||||||
<script src="/static/js/theme.js"></script>
|
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
<title>{ title }</title>
|
<title>{ title }</title>
|
||||||
@@ -34,7 +29,7 @@ templ Layout(title string) {
|
|||||||
}
|
}
|
||||||
</head>
|
</head>
|
||||||
<body
|
<body
|
||||||
class="bg-base text-text ubuntu-mono-regular overflow-x-hidden"
|
class="bg-base dark text-text ubuntu-mono-regular overflow-x-hidden"
|
||||||
hx-ext="ws"
|
hx-ext="ws"
|
||||||
ws-connect={ devInfo.WebsocketBase + "/ws/notifications" }
|
ws-connect={ devInfo.WebsocketBase + "/ws/notifications" }
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user