summaryrefslogtreecommitdiff
path: root/views/pages/global-map.html
diff options
from:
to:
context:
space:
mode:
authorGravatar Saya Andy <145215889+SayaAndy@users.noreply.github.com> 2026-01-08 22:56:30 +0700
committerGravatar GitHub <noreply@github.com> 2026-01-08 22:56:30 +0700
commitb9c4a002feeffdbffee21969415cda2af20583ac (patch)
treed6568f45a489877fdc404a0ee720276b13519a02 /views/pages/global-map.html
parent77a43ebb42d80e3c6bbdf39b16a38f0f3ec4b30c (diff)
parent3c865e366119084894b7241ff9bb071e0899811d (diff)
downloadweb-b9c4a002feeffdbffee21969415cda2af20583ac.tar.gz
web-b9c4a002feeffdbffee21969415cda2af20583ac.zip
v0.12.0 (#21)v0.12.0
- [feat: use floating sidebar for general pages if screen is wide enough](https://github.com/SayaAndy/saya-today-web/commit/3c865e366119084894b7241ff9bb071e0899811d) - [feat: nextstep-like buttons for toolbar](https://github.com/SayaAndy/saya-today-web/commit/c8e542e883c8fec8b4a101bcd55c4d771b377e80) - [feat: switch standard OSM to CyclOSM for maps on site](https://github.com/SayaAndy/saya-today-web/commit/a48036d496f0af90ff437c897b77418ca8453e9c) - feat: content stays wider with wider screens - [fix: inset shadow getting overlapped by child elements](https://github.com/SayaAndy/saya-today-web/commit/6983adfc3a93c06236be29fb17bfc734e622ec9d) - [feat: move like button to header to make it more prominent](https://github.com/SayaAndy/saya-today-web/commit/e4f6790aab7f1b447892d0ed999dff8af45ac33e) - fix: problem with resizing content when galleries are in it - refactor: use var for noise image in themes (to reduce css size) - ci: update checkout action from v4 to v6
Diffstat (limited to 'views/pages/global-map.html')
-rw-r--r--views/pages/global-map.html38
1 files changed, 20 insertions, 18 deletions
diff --git a/views/pages/global-map.html b/views/pages/global-map.html
index 306f442..7d788d6 100644
--- a/views/pages/global-map.html
+++ b/views/pages/global-map.html
@@ -42,23 +42,25 @@
}
</script>
- <div id="sidebar" class="bg-sidebar block fixed shadow-[0_0_0.4rem_black] z-1001 w-[5rem] h-auto">
- <div class="text-[3rem] text-stroke-(--sidebar-stroke-color) text-stroke-[0.1dvw] flex flex-col gap-0 relative z-1001">
- <a href="./" class="w-[5rem] h-[5rem]">
- <i 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>
+ <div id="sidebar" class="bg-sidebar block fixed shadow-[0_0_0.4rem_black] z-1001 w-fit h-auto">
+ <div class="text-[3rem] flex flex-col gap-0 relative z-1001">
+ <a href="./" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
+ <i class="fas fa-circle-left flex w-18 h-18 content-center text-center text-sidebar"></i>
</a>
- <a href="/{{ .Lang }}" class="w-[5rem] h-[5rem]">
- <i 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 href="/{{ .Lang }}" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
+ <i class="fas fa-home flex w-18 h-18 content-center text-center text-sidebar"></i>
</a>
- <a href="/{{ .Lang }}/blog" class="w-[5rem] h-[5rem]">
- <i 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 href="/{{ .Lang }}/blog" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
+ <i class="fas fa-search flex w-18 h-18 content-center text-center text-sidebar"></i>
</a>
- <a href="/{{ .Lang }}/map" 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 href="/{{ .Lang }}/map" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
+ <i class="fas fa-map flex w-18 h-18 content-center text-center text-sidebar"></i>
</a>
- <i onclick="toggleThemeWheel();" id="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="/{{ .Lang }}/user" id="sidebar-user-button" class="w-[5rem] h-[5rem]">
- <i onclick="return changeUrl('/{{ .Lang }}/user');" class="fas fa-user flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i>
+ <div id="toolbar-theme-button" onclick="toggleThemeWheel();" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
+ <i id="toolbar-theme-button-content" class="fas fa-swatchbook flex w-18 h-18 content-center text-center text-sidebar"></i>
+ </div>
+ <a href="/{{ .Lang }}/user" id="sidebar-user-button" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
+ <i onclick="return changeUrl('/{{ .Lang }}/user');" class="fas fa-user flex w-18 h-18 content-center text-center text-sidebar"></i>
</a>
</div>
<div class="theme-wheel" id="theme-wheel">
@@ -79,7 +81,7 @@
<script>
const themeWheel = document.getElementById('theme-wheel');
- const themeButton = document.getElementById('theme-button');
+ const themeButton = document.getElementById('toolbar-theme-button');
const themeIcons = document.querySelectorAll('.theme-icon');
const themeWheelRadius = convertRemToPixels(6);
@@ -195,7 +197,7 @@
themeWheel.addEventListener('mouseleave', hideThemeWheel);
document.addEventListener('click', (e) => {
- if (!themeWheel.contains(e.target) && e.target !== themeButton) {
+ if (!themeWheel.contains(e.target) && e.target !== themeButton && !e.target.classList.contains("toolbar-theme-button-content")) {
hideThemeWheel();
}
});
@@ -228,9 +230,9 @@
function initLocationMap() {
map = L.map('map-container').setView([{{ .MapLocationLat }}, {{ .MapLocationLong }}], 4);
- L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
- maxZoom: 18,
- attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
+ L.tileLayer('https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png', {
+ maxZoom: 20,
+ attribution: '<a href="https://github.com/cyclosm/cyclosm-cartocss-style/releases" title="CyclOSM - Open Bicycle render">CyclOSM</a> | Map data: &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
zoomControl: false
}).addTo(map);