summaryrefslogtreecommitdiff
diff options
from:
to:
context:
space:
mode:
authorGravatar Saya Andy <145215889+SayaAndy@users.noreply.github.com> 2025-10-21 10:15:44 +0700
committerGravatar GitHub <noreply@github.com> 2025-10-21 10:15:44 +0700
commit69b868a7655a25c82ce4a2bd444812be69c8b998 (patch)
tree201d21e0bd732c42941a9408390eba0573a99f18
parentdf20c871060ad88254f18d4a04f714edf59156f0 (diff)
parent695889f42896c1e3f1290a588ac1c5483d0124f0 (diff)
downloadweb-0.10.1.tar.gz
web-0.10.1.zip
v0.10.1 (#16)v0.10.1
- [feat: lilac theme](https://github.com/SayaAndy/saya-today-web/commit/1e2763ae476e99caa7ba4be22aa06dfa2f7c8bb8) (made default) - feat: center content even if toolbar is on the side - [fix: minimize chance of masonry getting broken](https://github.com/SayaAndy/saya-today-web/pull/16/commits/695889f42896c1e3f1290a588ac1c5483d0124f0)
-rw-r--r--internal/glightbox/html_renderer.go4
-rw-r--r--static/input.css72
-rw-r--r--views/index.html141
-rw-r--r--views/layouts/general-page.html152
-rw-r--r--views/pages/global-map.html6
5 files changed, 153 insertions, 222 deletions
diff --git a/internal/glightbox/html_renderer.go b/internal/glightbox/html_renderer.go
index deafb4d..7022793 100644
--- a/internal/glightbox/html_renderer.go
+++ b/internal/glightbox/html_renderer.go
@@ -133,7 +133,7 @@ func (r *GLightboxHTMLRenderer) renderGLightbox(w util.BufWriter, source []byte,
}
w.WriteString(fmt.Sprintf(`
-<div class="justify-content-center display-block m-1">
+<div class="justify-content-center display-block">
<hr class="border-t-3 border-dotted border-main-hard mt-1 mb-2 w-[80%%] ml-auto mr-auto">
<div class="grid masonry-grid-%s mx-auto">
<div class="grid-sizer grid-sizer-%s"></div>
@@ -156,7 +156,7 @@ func (r *GLightboxHTMLRenderer) renderGLightbox(w util.BufWriter, source []byte,
function initMasonryLayout_%s(tm) {
clearTimeout(imgLoad_%s_timer);
- imgLoad_%s_timer = setTimeout(() => msnry_%s.layout(), 300);
+ imgLoad_%s_timer = setTimeout(() => msnry_%s.layout(), 100);
}
imgLoad_%s.on('progress', initMasonryLayout_%s);
diff --git a/static/input.css b/static/input.css
index eae6620..4fcadd1 100644
--- a/static/input.css
+++ b/static/input.css
@@ -10,6 +10,14 @@
html {
font-size: 12px;
--noise-image: url(data:image/png;base64,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);
+ --split-left-background: unset;
+ --split-left-repeat: no-repeat;
+ --split-left-size: cover;
+ --split-left-position: left;
+ --split-right-background: unset;
+ --split-right-repeat: no-repeat;
+ --split-right-size: cover;
+ --split-right-position: left;
}
@media screen and (min-width: 640px) and (min-height: 640px) {
@@ -124,6 +132,30 @@ html {
--squares-and-triangles-background-height-coef: 15;
}
+[data-theme="lilac"] {
+ --main-hard-color: #343b58;
+ --main-medium-color: #414868;
+ --main-soft-color: #6c6e75;
+ --background-dark-color: #c3caff;
+ --background-medium-color: #d1d6ff;
+ --background-light-color: #e3e6ff;
+ --sidebar-text-color: var(--main-hard-color);
+ --sidebar-stroke-color: var(--background-light-color);
+ --secondary-color: var(--main-medium-color);
+ --leaflet-text-color: var(--main-hard-color);
+ --leaflet-link-color: var(--main-medium-color);
+ --leaflet-link-hover-color: var(--main-soft-color);
+ --interlocked-hexagons-background: url("data:image/svg+xml,<svg width='160' height='160' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='40' height='80' patternTransform='scale(2) rotate(0)'><rect x='0' y='0' width='100%' height='100%' fill='%23e3e6ffff'/><path d='M-10 7.5l20 5 20-5 20 5' stroke-linejoin='round' stroke-linecap='round' stroke-width='4' stroke='%238c4351ff' fill='none'/><path d='M-10 27.5l20 5 20-5 20 5' stroke-linejoin='round' stroke-linecap='round' stroke-width='4' stroke='%23385f0dff' fill='none'/><path d='M-10 47.5l20 5 20-5 20 5' stroke-linejoin='round' stroke-linecap='round' stroke-width='4' stroke='%23006c86ff' fill='none'/><path d='M-10 67.5l20 5 20-5 20 5' stroke-linejoin='round' stroke-linecap='round' stroke-width='4' stroke='%235a3e8eff' fill='none'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
+ --interlocked-hexagons-background-repeat: repeat;
+ --interlocked-hexagons-background-size: auto;
+ --squares-and-triangles-background: url("data:image/svg+xml,<svg width='160' height='160' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='40' height='80' patternTransform='scale(2) rotate(0)'><rect x='0' y='0' width='100%' height='100%' fill='%23e3e6ffff'/><path d='M-10 7.5l20 5 20-5 20 5' stroke-linejoin='round' stroke-linecap='round' stroke-width='4' stroke='%238c4351ff' fill='none'/><path d='M-10 27.5l20 5 20-5 20 5' stroke-linejoin='round' stroke-linecap='round' stroke-width='4' stroke='%23385f0dff' fill='none'/><path d='M-10 47.5l20 5 20-5 20 5' stroke-linejoin='round' stroke-linecap='round' stroke-width='4' stroke='%23006c86ff' fill='none'/><path d='M-10 67.5l20 5 20-5 20 5' stroke-linejoin='round' stroke-linecap='round' stroke-width='4' stroke='%235a3e8eff' fill='none'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
+ --squares-and-triangles-background-repeat: repeat;
+ --squares-and-triangles-background-width-coef: 5;
+ --squares-and-triangles-background-height-coef: 5;
+ --split-left-background: url('https://f003.backblazeb2.com/file/sayana-static/themes/lilac/split-left.webp');
+ --split-right-background: url('https://f003.backblazeb2.com/file/sayana-static/themes/lilac/split-right.webp');
+}
+
a, .linklike {
color: var(--main-medium-color) !important;
text-decoration: underline;
@@ -158,6 +190,20 @@ a:hover, .linklike:hover {
background-repeat: var(--squares-and-triangles-background-repeat);
}
+.bg-split-left {
+ background-image: var(--split-left-background);
+ background-repeat: var(--split-left-repeat);
+ background-size: var(--split-left-size);
+ background-position: var(--split-left-position);
+}
+
+.bg-split-right {
+ background-image: var(--split-right-background);
+ background-repeat: var(--split-right-repeat);
+ background-size: var(--split-right-size);
+ background-position: var(--split-right-position);
+}
+
.text-sidebar {
color: var(--sidebar-text-color);
}
@@ -399,12 +445,18 @@ a:hover, .linklike:hover {
border-color: transparent transparent var(--background-dark-color) transparent;
}
-.grid-item, .grid-sizer {
+.grid-item {
position: relative;
display: inline-block;
width: 10rem;
}
+.grid-sizer {
+ position: relative;
+ display: inline-block;
+ width: 10.1rem;
+}
+
.grid-item-index {
visibility: visible;
opacity: 1;
@@ -429,30 +481,42 @@ a:hover, .linklike:hover {
}
@container main (width >= 40rem) {
- .grid-item, .grid-sizer {
+ .grid-item {
width: 12rem;
}
+ .grid-sizer {
+ width: 12.1rem;
+ }
+
.grid-item-2x {
width: 24rem;
}
}
@container main (width >= 76rem) {
- .grid-item, .grid-sizer {
+ .grid-item {
width: 18rem;
}
+ .grid-sizer {
+ width: 18.1rem;
+ }
+
.grid-item-2x {
width: 36rem;
}
}
@container main (width >= 128rem) {
- .grid-item, .grid-sizer {
+ .grid-item {
width: 24rem;
}
+ .grid-sizer {
+ width: 24.1rem;
+ }
+
.grid-item-2x {
width: 48rem;
}
diff --git a/views/index.html b/views/index.html
deleted file mode 100644
index cbb4c57..0000000
--- a/views/index.html
+++ /dev/null
@@ -1,141 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Choose Language // SAYA TODAY</title>
- <link href="/output.css" rel="stylesheet">
- <style>
- .menu-outer-body {
- border-radius: 10%;
- width: 40dvh;
- height: 30dvh;
- }
-
- .menu-inner-body {
- width: 85%;
- }
-
- .flex-adaptive {
- flex-direction: row;
- }
-
- .language-icon {
- max-width: calc(80% / {{ .AvailableLanguages | len }});
- max-height: 80%;
- }
-
- @media (max-aspect-ratio: 0.8/1) {
- .menu-outer-body {
- border-radius: 5%;
- }
-
- .menu-outer-body {
- width: min(40dvh, 100dvw);
- height: 40dvh;
- border-radius: 0;
- }
-
- .language-icon {
- max-width: 40%;
- max-height: calc(80% / {{ .AvailableLanguages | len }});
- }
-
- .menu-inner-body {
- width: 92.5%;
- }
-
- .flex-adaptive {
- flex-direction: column;
- }
- }
- </style>
-</head>
-
-<body data-theme="night" class="font-andika text-main-hard text-2xl overflow-hidden bg-interlocked-hexagons h-[100dvh] flex flex-col">
-
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
- <div class="absolute star z-0">*</div>
-
- <script>
- function switchTheme(theme) {
- if (theme == "" || typeof theme == "undefined") {
- const currentTheme = document.body.getAttribute('data-theme');
- switch (currentTheme) {
- case "olive": theme = "lettuce"; break;
- case "lettuce": theme = "night"; break;
- case "night": theme = "olive"; break;
- }
- }
- // localStorage.setItem('theme', theme);
- document.body.setAttribute('data-theme', theme);
- }
-
- const savedTheme = 'night';
- switchTheme(savedTheme);
- </script>
-
- <div class="menu-outer-body p-2 z-1 bg-background-dark flex flex-col mx-auto my-auto opacity-70">
- <p class="font-andika mx-auto text-4xl mt-1 mb-2">saya.today</p>
- <div class="menu-inner-body grow bg-background-light flex flex-adaptive mx-auto opacity-100">
- {{- range .AvailableLanguages }}
- <img onclick="location.href='/{{ .Name }}';" class="object-scale-down cursor-pointer flex-1 rounded-[20%] language-icon mx-auto my-auto relative" src="{{ .Flag }}" alt="{{ .Alt }}">
- {{- end }}
- </div>
- <p class="font-andika mx-auto text-2xl text-secondary mt-1 mb-2">Choose your language</p>
- </div>
-
- <script>
- function generateStars() {
- var clWidth = document.documentElement.clientWidth;
- var clHeight = document.documentElement.clientHeight;
-
- stars = document.getElementsByClassName("star");
- for (let starIndex = 0; starIndex < stars.length; starIndex++) {
- const star = stars[starIndex];
- const x = Math.floor(Math.random() * clWidth);
- const y = Math.floor(Math.random() * clHeight * 0.8);
- const rot = Math.random() * 90;
- const animDuration = (Math.random() * 10) + 3;
- const sz = Math.floor(Math.random() * 8) + 12;
- star.style.transform = `translateX(${x}px) translateY(${y}px) rotate(${rot}deg)`;
- star.style.animationDuration = `${animDuration}s`;
- star.style.fontSize = `${sz}px`;
- }
- }
-
- document.addEventListener('DOMContentLoaded', generateStars);
-
- let generateStarsTimer;
- window.addEventListener("resize", () => {
- clearTimeout(generateStarsTimer);
- generateStarsTimer = setTimeout(() => {
- generateStars();
- }, 1000);
- });
- </script>
-</body>
-</html>
diff --git a/views/layouts/general-page.html b/views/layouts/general-page.html
index 49c0fae..5760b88 100644
--- a/views/layouts/general-page.html
+++ b/views/layouts/general-page.html
@@ -9,7 +9,7 @@
<link href="/output.css" rel="stylesheet">
</head>
-<body data-theme="ram" class="font-andika text-main-hard overflow-hidden bg-interlocked-hexagons h-[100dvh] flex flex-col [@media(max-height:32rem)]:flex-row">
+<body data-theme="ram" class="font-andika text-main-hard overflow-hidden bg-interlocked-hexagons h-[100dvh] flex flex-row">
<script>
let map = null;
@@ -147,7 +147,8 @@
case "olive": theme = "lettuce"; break;
case "lettuce": theme = "night"; break;
case "night": theme = "ram"; break;
- case "ram": theme = "olive"; break;
+ case "ram": theme = "lilac"; break;
+ case "lilac": theme = "olive"; break;
}
}
localStorage.setItem('theme', theme);
@@ -155,7 +156,7 @@
switchThemeDecor(theme);
}
- const savedTheme = localStorage.getItem('theme') || 'ram';
+ const savedTheme = localStorage.getItem('theme') || 'lilac';
switchTheme(savedTheme);
</script>
@@ -168,88 +169,93 @@
const clientTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
</script>
- <div id="sidebar" class="bg-sidebar flex sticky flex-col z-20 w-[100dvw] xs:w-[90dvw] sm:w-[80dvw] md:w-[75dvw] lg:w-[70dvw] xl:w-[65dvw] 2xl:w-[60dvw] [@media(max-height:32rem)]:w-[5rem] h-[5rem] [@media(max-height:32rem)]:h-[100dvh] mx-auto [@media(max-height:32rem)]:mx-0
- shadow-[0_0_1rem_black]">
- <div class="text-[3rem] text-stroke-(--sidebar-stroke-color) text-stroke-[0.1dvw] flex flex-row [@media(max-height:32rem)]:flex-col gap-0 relative z-20">
- <a href="/{{ .Lang }}" id="sidebar-home-button" class="w-[5rem] h-[5rem]">
- <i onclick="return changeUrl('/{{ .Lang }}');" class="fas fa-home flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i>
- </a>
- <a href="/{{ .Lang }}/blog" id="sidebar-blog-button" class="w-[5rem] h-[5rem]">
- <i onclick="return changeUrl('/{{ .Lang }}/blog');" class="fas fa-search flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i>
- </a>
- <a href="/{{ .Lang }}/map" id="sidebar-map-button" class="w-[5rem] h-[5rem]">
- <i class="fas fa-map flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i>
- </a>
- <i onclick="toggleThemeWheel();" id="sidebar-theme-button" class="fas fa-swatchbook flex w-[5rem] h-[5rem] content-center text-center text-sidebar hover:bg-background-dark cursor-pointer transition-colors duration-300 rounded-lg"></i>
- <a href="./" id="sidebar-back-button" class="w-[5rem] h-[5rem]">
- <i onclick="return changeUrl('/../', true);" class="fas fa-circle-left flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i>
- </a>
- </div>
- <div class="theme-wheel" id="theme-wheel">
- <div class="theme-icon" data-theme="olive"></div>
- <div class="theme-icon" data-theme="lettuce"></div>
- <div class="theme-icon" data-theme="night"></div>
- <div class="theme-icon" data-theme="ram"></div>
- <div class="theme-pin"></div>
- </div>
- <script>
- sidebarHomeButton = document.getElementById("sidebar-home-button");
- sidebarMapButton = document.getElementById("sidebar-map-button");
- sidebarBlogButton = document.getElementById("sidebar-blog-button");
- sidebarBackButton = document.getElementById("sidebar-back-button");
+ <div class="grow bg-split-left"></div>
- function updateSidebar() {
- if (location.pathname == "" || location.pathname == "/") {
- sidebarHomeButton.classList.add('hidden');
- sidebarMapButton.classList.add('hidden');
- sidebarBlogButton.classList.add('hidden');
- sidebarBackButton.classList.add('hidden');
- } else {
- sidebarHomeButton.classList.remove('hidden');
- sidebarMapButton.classList.remove('hidden');
- sidebarBlogButton.classList.remove('hidden');
- sidebarBackButton.classList.remove('hidden');
- lang = location.pathname.split("/")[1];
- sidebarHomeButton.setAttribute('href', `/${lang}`);
- sidebarHomeButton.firstElementChild.setAttribute('onclick', `return changeUrl('/${lang}', false);`);
- sidebarMapButton.setAttribute('href', `/${lang}/map`);
- sidebarBlogButton.setAttribute('href', `/${lang}/blog`);
- sidebarBlogButton.firstElementChild.setAttribute('onclick', `return changeUrl('/${lang}/blog', false);`);
+ <div class="flex flex-col [@media(max-height:32rem)]:flex-row">
+ <div id="sidebar" class="bg-sidebar flex sticky flex-col z-20 w-[100dvw] xs:w-[90dvw] sm:w-[80dvw] md:w-[75dvw] lg:w-[70dvw] xl:w-[65dvw] 2xl:w-[60dvw] [@media(max-height:32rem)]:w-[5rem] h-[5rem] [@media(max-height:32rem)]:h-[100dvh] shadow-[0_0_1rem_black]">
+ <div class="text-[3rem] text-stroke-(--sidebar-stroke-color) text-stroke-[0.1dvw] flex flex-row [@media(max-height:32rem)]:flex-col gap-0 relative z-20">
+ <a href="/{{ .Lang }}" id="sidebar-home-button" class="w-[5rem] h-[5rem]">
+ <i onclick="return changeUrl('/{{ .Lang }}');" class="fas fa-home flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i>
+ </a>
+ <a href="/{{ .Lang }}/blog" id="sidebar-blog-button" class="w-[5rem] h-[5rem]">
+ <i onclick="return changeUrl('/{{ .Lang }}/blog');" class="fas fa-search flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i>
+ </a>
+ <a href="/{{ .Lang }}/map" id="sidebar-map-button" class="w-[5rem] h-[5rem]">
+ <i class="fas fa-map flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i>
+ </a>
+ <i onclick="toggleThemeWheel();" id="sidebar-theme-button" class="fas fa-swatchbook flex w-[5rem] h-[5rem] content-center text-center text-sidebar hover:bg-background-dark cursor-pointer transition-colors duration-300 rounded-lg"></i>
+ <a href="./" id="sidebar-back-button" class="w-[5rem] h-[5rem]">
+ <i onclick="return changeUrl('/../', true);" class="fas fa-circle-left flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i>
+ </a>
+ </div>
+ <div class="theme-wheel" id="theme-wheel">
+ <div class="theme-icon" data-theme="olive"></div>
+ <div class="theme-icon" data-theme="lettuce"></div>
+ <div class="theme-icon" data-theme="night"></div>
+ <div class="theme-icon" data-theme="ram"></div>
+ <div class="theme-icon" data-theme="lilac"></div>
+ <div class="theme-pin"></div>
+ </div>
+ <script>
+ sidebarHomeButton = document.getElementById("sidebar-home-button");
+ sidebarMapButton = document.getElementById("sidebar-map-button");
+ sidebarBlogButton = document.getElementById("sidebar-blog-button");
+ sidebarBackButton = document.getElementById("sidebar-back-button");
+
+ function updateSidebar() {
+ if (location.pathname == "" || location.pathname == "/") {
+ sidebarHomeButton.classList.add('hidden');
+ sidebarMapButton.classList.add('hidden');
+ sidebarBlogButton.classList.add('hidden');
+ sidebarBackButton.classList.add('hidden');
+ } else {
+ sidebarHomeButton.classList.remove('hidden');
+ sidebarMapButton.classList.remove('hidden');
+ sidebarBlogButton.classList.remove('hidden');
+ sidebarBackButton.classList.remove('hidden');
+ lang = location.pathname.split("/")[1];
+ sidebarHomeButton.setAttribute('href', `/${lang}`);
+ sidebarHomeButton.firstElementChild.setAttribute('onclick', `return changeUrl('/${lang}', false);`);
+ sidebarMapButton.setAttribute('href', `/${lang}/map`);
+ sidebarBlogButton.setAttribute('href', `/${lang}/blog`);
+ sidebarBlogButton.firstElementChild.setAttribute('onclick', `return changeUrl('/${lang}/blog', false);`);
+ }
}
- }
- window.addEventListener("popstate", updateSidebar);
- window.addEventListener("load", updateSidebar, {once: true});
- </script>
- </div>
+ window.addEventListener("popstate", updateSidebar);
+ window.addEventListener("load", updateSidebar, {once: true});
+ </script>
+ </div>
- <div class="bg-background-dark @container/main flex z-10 w-[100dvw] xs:w-[90dvw] sm:w-[80dvw] md:w-[75dvw] lg:w-[70dvw] xl:w-[65dvw] 2xl:w-[60dvw] grow-0 h-[calc(100dvh-5rem)] [@media(max-height:32rem)]:h-[100dvh] mx-auto [@media(max-height:32rem)]:mx-0
- shadow-[0_0_1rem_black]">
- <div class="bg-background-dark border-r-2 border-dashed border-main-hard"></div>
+ <div class="bg-background-dark @container/main flex z-10 w-[100dvw] xs:w-[90dvw] sm:w-[80dvw] md:w-[75dvw] lg:w-[70dvw] xl:w-[65dvw] 2xl:w-[60dvw] grow-0 h-[calc(100dvh-5rem)] [@media(max-height:32rem)]:h-[100dvh] shadow-[0_0_1rem_black]">
+ <div class="bg-background-dark border-r-2 border-dashed border-main-hard"></div>
- <div class="max-h-100% flex flex-col grow bg-background-dark relative pt-4 ml-8 pr-4">
- <div id="general-page-header" class="max-xs:hidden [@media(max-height:32rem)]:hidden flex flex-col basis-8"
- hx-get="/api/v1/general-page/header{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="load" hx-target="this" hx-swap="innerHTML">
- </div>
- <div id="general-page-header-trigger" hx-get="/api/v1/general-page/header{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="popstate from:window" hx-target="#general-page-header" hx-swap="innerHTML"></div>
+ <div class="max-h-100% flex flex-col grow bg-background-dark relative pt-4 ml-8 pr-4">
+ <div id="general-page-header" class="max-xs:hidden [@media(max-height:32rem)]:hidden flex flex-col basis-8"
+ hx-get="/api/v1/general-page/header{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="load" hx-target="this" hx-swap="innerHTML">
+ </div>
+ <div id="general-page-header-trigger" hx-get="/api/v1/general-page/header{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="popstate from:window" hx-target="#general-page-header" hx-swap="innerHTML"></div>
- <hr class="max-xs:hidden [@media(max-height:32rem)]:hidden border-t-4 border-dotted border-main-hard mb-2">
+ <hr class="max-xs:hidden [@media(max-height:32rem)]:hidden border-t-4 border-dotted border-main-hard mb-2">
- <div id="general-page-body" class="flex flex-col grow overflow-y-auto"
- hx-get="/api/v1/general-page/body{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="load" hx-target="this" hx-swap="innerHTML">
- </div>
- <div id="general-page-body-trigger" hx-get="/api/v1/general-page/body{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="popstate from:window" hx-target="#general-page-body" hx-swap="innerHTML"></div>
+ <div id="general-page-body" class="flex flex-col grow overflow-y-auto"
+ hx-get="/api/v1/general-page/body{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="load" hx-target="this" hx-swap="innerHTML">
+ </div>
+ <div id="general-page-body-trigger" hx-get="/api/v1/general-page/body{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="popstate from:window" hx-target="#general-page-body" hx-swap="innerHTML"></div>
- <div id="general-page-footer" class="flex flex-row basis-4 my-1"
- hx-get="/api/v1/general-page/footer{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="load" hx-target="this" hx-swap="innerHTML">
+ <div id="general-page-footer" class="flex flex-row basis-4 my-1"
+ hx-get="/api/v1/general-page/footer{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="load" hx-target="this" hx-swap="innerHTML">
+ </div>
+ <div id="general-page-footer-trigger" hx-get="/api/v1/general-page/footer{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="popstate from:window" hx-target="#general-page-footer" hx-swap="innerHTML"></div>
+
+ <hr class="border-t-4 border-dotted border-main-hard mb-2">
</div>
- <div id="general-page-footer-trigger" hx-get="/api/v1/general-page/footer{{ if .QueryString }}?{{ .QueryString }}{{ end }}" hx-trigger="popstate from:window" hx-target="#general-page-footer" hx-swap="innerHTML"></div>
- <hr class="border-t-4 border-dotted border-main-hard mb-2">
+ <div class="pr-[0.5dvw] bg-background-dark shadow-2xl border-l-2 border-dotted border-main-hard"></div>
</div>
-
- <div class="pr-[0.5dvw] bg-background-dark shadow-2xl border-l-2 border-dotted border-main-hard"></div>
</div>
+ <div class="grow bg-split-right"></div>
+
<script src="https://f003.backblazeb2.com/file/sayana-static/libs/htmx/2.0.6/htmx.min.js"></script>
<script src="https://f003.backblazeb2.com/file/sayana-static/libs/leaflet/1.9.4/leaflet.js"></script>
<script src="https://f003.backblazeb2.com/file/sayana-static/libs/imagesloaded/5.0.0/imagesloaded.pkgd.min.js"></script>
diff --git a/views/pages/global-map.html b/views/pages/global-map.html
index cd3c2d5..d0433e9 100644
--- a/views/pages/global-map.html
+++ b/views/pages/global-map.html
@@ -22,14 +22,15 @@
case "olive": theme = "lettuce"; break;
case "lettuce": theme = "night"; break;
case "night": theme = "ram"; break;
- case "ram": theme = "olive"; break;
+ case "ram": theme = "lilac"; break;
+ case "lilac": theme = "olive"; break;
}
}
localStorage.setItem('theme', theme);
document.body.setAttribute('data-theme', theme);
}
- const savedTheme = localStorage.getItem('theme') || 'ram';
+ const savedTheme = localStorage.getItem('theme') || 'lilac';
switchTheme(savedTheme);
</script>
@@ -62,6 +63,7 @@
<div class="theme-icon" data-theme="lettuce"></div>
<div class="theme-icon" data-theme="night"></div>
<div class="theme-icon" data-theme="ram"></div>
+ <div class="theme-icon" data-theme="lilac"></div>
<div class="theme-pin"></div>
</div>
</div>