This commit is contained in:
juanatsap
2025-11-16 10:11:58 +00:00
parent f93adf04cb
commit 25e9ebafe7
42 changed files with 8219 additions and 224 deletions
-1
View File
@@ -124,7 +124,6 @@
{{template "action-bar" .}}
{{template "hamburger-menu" .}}
{{template "skeleton-loader" .}}
<!-- Zoom Wrapper (for zoom functionality) -->
<div id="zoom-wrapper" class="zoom-wrapper">
+3 -19
View File
@@ -1,42 +1,26 @@
<!-- Primary response: Updated language selector -->
<div class="language-selector" id="language-selector"
_="on htmx:beforeRequest from .selector-btn
add .active to #skeleton-loader
end
on htmx:afterSwap from .selector-btn
wait 100ms
remove .active from #skeleton-loader
end">
<div class="language-selector" id="language-selector">
<button class="selector-btn {{if eq .Lang "en"}}active{{end}}"
data-short="EN"
hx-get="/switch-language?lang=en"
hx-target="#language-selector"
hx-swap="outerHTML swap:250ms settle:250ms"
hx-indicator="#lang-indicator-en"
hx-push-url="/?lang=en"
aria-label="English">
<span>English</span>
<iconify-icon icon="mdi:loading"
class="htmx-indicator spinning small light"
width="14"
height="14"
aria-label="Loading"></iconify-icon>
</button>
<button class="selector-btn {{if eq .Lang "es"}}active{{end}}"
data-short="ES"
hx-get="/switch-language?lang=es"
hx-target="#language-selector"
hx-swap="outerHTML swap:250ms settle:250ms"
hx-indicator="#lang-indicator-es"
hx-push-url="/?lang=es"
aria-label="Español">
<span>Español</span>
<iconify-icon icon="mdi:loading"
class="htmx-indicator spinning small light"
width="14"
height="14"
aria-label="Loading"></iconify-icon>
</button>
</div>
<!-- Out-of-band swap: Page 1 content wrapper with fade transition -->
<div id="cv-inner-content-page-1"
class="cv-page-content-wrapper"
@@ -1,40 +1,44 @@
{{define "language-selector"}}
<!-- Language selector with atomic updates via out-of-band swaps -->
<div class="language-selector" id="language-selector"
_="on htmx:beforeRequest from .selector-btn
add .active to #skeleton-loader
end
on htmx:afterSwap from .selector-btn
wait 100ms
remove .active from #skeleton-loader
end">
<button class="selector-btn {{if eq .Lang "en"}}active{{end}}"
data-short="EN"
hx-get="/switch-language?lang=en"
hx-target="#language-selector"
hx-swap="outerHTML swap:250ms settle:250ms"
hx-push-url="/?lang=en"
aria-label="English">
<span>English</span>
<div class="language-selector-wrapper">
<!-- Loading indicators placed outside swap target so they persist -->
<!-- Using span wrapper to avoid shadow DOM issues with iconify-icon -->
<span id="lang-indicator-en" class="htmx-indicator small">
<iconify-icon icon="mdi:loading"
class="htmx-indicator spinning small light"
class="spinning light"
width="14"
height="14"
aria-label="Loading"></iconify-icon>
</button>
<button class="selector-btn {{if eq .Lang "es"}}active{{end}}"
data-short="ES"
hx-get="/switch-language?lang=es"
hx-target="#language-selector"
hx-swap="outerHTML swap:250ms settle:250ms"
hx-push-url="/?lang=es"
aria-label="Español">
<span>Español</span>
</span>
<span id="lang-indicator-es" class="htmx-indicator small">
<iconify-icon icon="mdi:loading"
class="htmx-indicator spinning small light"
class="spinning light"
width="14"
height="14"
aria-label="Loading"></iconify-icon>
</button>
</span>
<div class="language-selector" id="language-selector">
<button class="selector-btn {{if eq .Lang "en"}}active{{end}}"
data-short="EN"
hx-get="/switch-language?lang=en"
hx-target="#language-selector"
hx-swap="outerHTML swap:250ms settle:250ms"
hx-indicator="#lang-indicator-en"
hx-push-url="/?lang=en"
aria-label="English">
<span>English</span>
</button>
<button class="selector-btn {{if eq .Lang "es"}}active{{end}}"
data-short="ES"
hx-get="/switch-language?lang=es"
hx-target="#language-selector"
hx-swap="outerHTML swap:250ms settle:250ms"
hx-indicator="#lang-indicator-es"
hx-push-url="/?lang=es"
aria-label="Español">
<span>Español</span>
</button>
</div>
</div>
{{end}}