diff options
| author | 2025-10-20 01:35:01 +0700 | |
|---|---|---|
| committer | 2025-10-20 01:35:01 +0700 | |
| commit | f6c60d0a963817189854f5b42bc58a76ddb90d53 (patch) | |
| tree | ff81251fd1cc24f8c28617b2d1ccaa4af232a4a4 /views | |
| parent | fdb8582f40168dbb0795358f1ea950a26f157b2d (diff) | |
| download | web-f6c60d0a963817189854f5b42bc58a76ddb90d53.tar.gz web-f6c60d0a963817189854f5b42bc58a76ddb90d53.zip | |
feat: redo language page with general page layout
Diffstat (limited to 'views')
| -rw-r--r-- | views/layouts/general-page.html | 3 | ||||
| -rw-r--r-- | views/pages/language-pick.html | 16 |
2 files changed, 16 insertions, 3 deletions
diff --git a/views/layouts/general-page.html b/views/layouts/general-page.html index f4fd9be..8a621c4 100644 --- a/views/layouts/general-page.html +++ b/views/layouts/general-page.html @@ -22,9 +22,6 @@ const newPath = toAppend ? `${newPathname}${path}` : `${path}`; history.pushState({}, '', `${newPath}${urlParams.entries.length == 0 ? '' : '?' + urlParams.toString()}`); - if (location.pathname == "" || location.pathname == "/") { - return true; - } window.dispatchEvent(new Event('popstate')); return false; }; diff --git a/views/pages/language-pick.html b/views/pages/language-pick.html new file mode 100644 index 0000000..0bd0f6e --- /dev/null +++ b/views/pages/language-pick.html @@ -0,0 +1,16 @@ +{{ define "body" }} +<div class="flex flex-col justify-center text-3xl h-[100%]"> + {{- range .AvailableLanguages }} + <hr class="border-t-2 border-dotted border-main-hard"> + <div class="nth-[2n+1_of_div]:bg-(--background-medium-color) p-2.5 flex flex-row justify-center justify-items-center"> + <a href="/{{ .Name }}" class="w-12 h-12 basis-12 shrink-0 mr-4"> + <img onclick="return changeUrl('{{ .Name }}');" class="w-full h-full aspect-square cursor-pointer object-cover rounded-md select-none" src="{{ .Flag }}"> + </a> + <a href="/{{ .Name }}" onclick="return changeUrl('{{ .Name }}');" class="cursor-pointer"> + {{ .Alt }} + </a> + </div> + {{- end }} + <hr class="border-t-2 border-dotted border-main-hard"> +</div> +{{ end }} |