From 744ac982897b94054c1182c677183a81e7a63af9 Mon Sep 17 00:00:00 2001 From: John Hess Date: Tue, 25 Jun 2024 17:59:04 -0500 Subject: [PATCH] wire up language selector --- _i18n/en.yml | 2 ++ _includes/header.html | 8 +++-- _includes/language-selector.html | 28 +++++++++++++++++ _layouts/default.html | 2 +- _scss/pages/home.scss | 54 ++++++++++++++++++++++++++++++++ index.html | 47 +++++++++++++-------------- 6 files changed, 114 insertions(+), 27 deletions(-) create mode 100644 _includes/language-selector.html diff --git a/_i18n/en.yml b/_i18n/en.yml index abd27bc..6635aaf 100644 --- a/_i18n/en.yml +++ b/_i18n/en.yml @@ -13,6 +13,8 @@ message_board: "Message Board" app_store: 'App Store' offline_maps: 'Offline Maps' +language_prompt: 'Language' + apps: breadcrumb: "App Store" footer: The Butter App Store is built on F-Droid free software diff --git a/_includes/header.html b/_includes/header.html index e0565fd..2ebc189 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -2,10 +2,12 @@
Paddy, the Butter Box Mascot
{% t site_name %}
- +
- \ No newline at end of file + + +{% include language-selector.html %} diff --git a/_includes/language-selector.html b/_includes/language-selector.html new file mode 100644 index 0000000..e63b389 --- /dev/null +++ b/_includes/language-selector.html @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index 1674b38..7b2a0cf 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -4,4 +4,4 @@ layout: basic {% include header.html %} -{{ content }} \ No newline at end of file +{{ content }} diff --git a/_scss/pages/home.scss b/_scss/pages/home.scss index 99205ff..1159b14 100644 --- a/_scss/pages/home.scss +++ b/_scss/pages/home.scss @@ -80,6 +80,10 @@ a:active { padding: 0 10px; width: 100px; } + .language-selector:hover { + cursor: pointer; + text-decoration: none; + } .language-code { margin: 0 8px; @@ -103,6 +107,56 @@ a:active { font-weight: bold; } +.language-selector-container { + h2.modal__title { + text-align: left; + font-size: 18px; + font-weight: 500; + margin: 20px 0; + } + min-width: 300px; +} + +.language-selection { + align-items: center; + display: flex; + margin: 15px 0px; + input[type="radio"] { + appearance: none; + width: 18px; + height: 18px; + border: 2px solid #9B9A98; + border-radius: 50%; + position: relative; + cursor: pointer; + } + + input[type="radio"]::before { + content: ''; + display: block; + width: 10px; + height: 10px; + border-radius: 50%; + background: #333; /* Change this to your desired color */ + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + opacity: 0; + transition: opacity 0.2s ease-in-out; + } + + label { + font-size: 16px; + margin-left: 20px; + cursor: pointer; + } +} +.language-selection:hover { + text-decoration: none; +} + + .content { padding: 20px; } diff --git a/index.html b/index.html index 3d1dd99..0f9fbb1 100644 --- a/index.html +++ b/index.html @@ -6,28 +6,29 @@ layout: default
\ No newline at end of file +
\ No newline at end of file