From b0ab2ed92870d8c651267db10d68eb695da2ec62 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Tue, 26 Aug 2025 23:41:00 +0700 Subject: feat: like button (only inmem-cache for now) --- views/pages/blog-catalogue.html | 2 +- views/pages/blog-page.html | 6 +++++- views/pages/global-map.html | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'views/pages') diff --git a/views/pages/blog-catalogue.html b/views/pages/blog-catalogue.html index 9fa8ea7..25b0685 100644 --- a/views/pages/blog-catalogue.html +++ b/views/pages/blog-catalogue.html @@ -56,7 +56,7 @@ {{ end }} -{{ define "footer" }} +{{ define "bottom-embeds" }} diff --git a/views/pages/global-map.html b/views/pages/global-map.html index 6185076..569166f 100644 --- a/views/pages/global-map.html +++ b/views/pages/global-map.html @@ -263,7 +263,5 @@ }); - {{ block "footer" . }}{{ end }} - -- cgit v1.3.1+13 From ea8c6da9b8bafa1d4e5fe5a77fb306006db7d6f6 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Wed, 27 Aug 2025 01:37:04 +0700 Subject: feat: update galleries on resize (with smooth animations this time) --- internal/lightgallery/html_renderer.go | 49 ++++++++++++++++++---------------- views/pages/blog-page.html | 16 +++++++++-- 2 files changed, 40 insertions(+), 25 deletions(-) (limited to 'views/pages') diff --git a/internal/lightgallery/html_renderer.go b/internal/lightgallery/html_renderer.go index e20e9ec..17a6f2b 100644 --- a/internal/lightgallery/html_renderer.go +++ b/internal/lightgallery/html_renderer.go @@ -92,32 +92,35 @@ func (r *LightGalleryHTMLRenderer) renderLightGallery(w util.BufWriter, source [ w.WriteString(fmt.Sprintf(` `, galleryID, galleryID, strings.Join(dynamicElements, ","), galleryID)) +`, galleryID, galleryID, strings.Join(dynamicElements, ","), galleryID, galleryID)) } return ast.WalkContinue, nil diff --git a/views/pages/blog-page.html b/views/pages/blog-page.html index 83860d7..d685fda 100644 --- a/views/pages/blog-page.html +++ b/views/pages/blog-page.html @@ -12,6 +12,10 @@ height: 100% !important; } + + {{ end }} {{ define "body" }} @@ -70,10 +74,18 @@ {{ .MapLocationAreaMeters }} )}); + let resizeTimeout; window.addEventListener('resize', function() { - setTimeout(() => { + clearTimeout(resizeTimeout); + resizeTimeout = setTimeout(() => { map.invalidateSize(); - }, 100); + var oldGalleryMap = new Map(galleryMap); + oldGalleryMap.forEach((createFunc, g, map) => { + galleryMap.delete(g); + g.destroy(); + createFunc(); + }); + }, 300); }); {{- end }} -- cgit v1.3.1+13 From 5e40ca4d314a9dc6cb7cb2c69081876f5aa446f3 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Fri, 29 Aug 2025 02:02:52 +0700 Subject: feat: implement decor of night/ram theme on general pages --- static/input.css | 14 ++++- views/layouts/general-page.html | 126 ++++++++++++++++++++++++++++++++++++---- views/pages/blog-page.html | 6 +- 3 files changed, 131 insertions(+), 15 deletions(-) (limited to 'views/pages') diff --git a/static/input.css b/static/input.css index 18910eb..7b7da23 100644 --- a/static/input.css +++ b/static/input.css @@ -612,7 +612,7 @@ body[data-theme~="ram"] .leaflet-tile { } } -.star { +.night-star { color: var(--color-yellow-100); animation-name: blink; animation-duration: 5s; @@ -621,6 +621,18 @@ body[data-theme~="ram"] .leaflet-tile { -webkit-user-select: none; } +.ram-frame { + width: 20vmin; + height: 20vmin; + user-select: none; + -webkit-user-select: none; + box-shadow: + inset 1vmin 1vmin var(--background-dark-color), + inset -1vmin -1vmin var(--main-light-color), + 1vmin 1vmin var(--background-dark-color), + -1vmin -1vmin var(--main-dark-color); +} + @keyframes blink { 0% { opacity: 1; diff --git a/views/layouts/general-page.html b/views/layouts/general-page.html index 9885d66..a7cf66e 100644 --- a/views/layouts/general-page.html +++ b/views/layouts/general-page.html @@ -15,6 +15,112 @@ + + {{ block "bottom-embeds" . }}{{ end }} diff --git a/views/pages/blog-page.html b/views/pages/blog-page.html index d685fda..65ee31d 100644 --- a/views/pages/blog-page.html +++ b/views/pages/blog-page.html @@ -74,10 +74,10 @@ {{ .MapLocationAreaMeters }} )}); - let resizeTimeout; + let galleryResizeTimeout; window.addEventListener('resize', function() { - clearTimeout(resizeTimeout); - resizeTimeout = setTimeout(() => { + clearTimeout(galleryResizeTimeout); + galleryResizeTimeout = setTimeout(() => { map.invalidateSize(); var oldGalleryMap = new Map(galleryMap); oldGalleryMap.forEach((createFunc, g, map) => { -- cgit v1.3.1+13 From 1c14a4088b068fefe425cad1acdde2d603bd27a9 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Sat, 30 Aug 2025 16:00:28 +0700 Subject: feat: always show search buttons out of overflow feat: add favicon --- static/favicon.ico | Bin 0 -> 5694 bytes static/input.css | 4 +++ views/pages/blog-catalogue.html | 75 +++++++++++++++++++++------------------- 3 files changed, 43 insertions(+), 36 deletions(-) create mode 100644 static/favicon.ico (limited to 'views/pages') diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..33eb226 Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/input.css b/static/input.css index f254970..47e7d16 100644 --- a/static/input.css +++ b/static/input.css @@ -581,6 +581,10 @@ body[data-theme~="ram"] .leaflet-tile { width: 100vw; } + .ar-lt-0\.8\:max-h-\[25\%\] { + max-height: 25%; + } + .ar-lt-0\.8\:max-h-\[80\%\] { max-height: 80%; } diff --git a/views/pages/blog-catalogue.html b/views/pages/blog-catalogue.html index 25b0685..1d0a2de 100644 --- a/views/pages/blog-catalogue.html +++ b/views/pages/blog-catalogue.html @@ -1,44 +1,47 @@ {{ define "body" }}
-
- {{ .L.BlogSearch.TagsHeader }} -
-
- + class="tags-list ar-gt-0.8:min-w-[10vh] ar-gt-0.8:max-w-[20vh] ar-gt-0.8:w-fit ar-lt-0.8:w-[100%] ar-lt-0.8:max-h-[25%] flex shrink-0 flex-col ar-gt-0.8:mr-[1.2vmin]"> +
+
+ {{ .L.BlogSearch.TagsHeader }} +
+
+ +
+ {{- range .Tags }} +
+ +
+ {{- end }}
- {{- range .Tags }} -
- +
+
+ {{ .L.BlogSearch.OrderByHeader }} +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
- {{- end }} -
-
-
- {{ .L.BlogSearch.OrderByHeader }} -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
+ +
+
+