From c982ea69f5267ed6a4ffac67b38d7d8b0b0b4ecf Mon Sep 17 00:00:00 2001 From: RadioPotin Date: Tue, 22 Oct 2024 17:01:56 +0200 Subject: [PATCH] Update navbar css, make more readable, add fr/en selector --- assets/sass/navigation.scss | 58 +++++++++++++++++++-------- layouts/partials/i18nlist.html | 12 ++++++ layouts/partials/site-navigation.html | 10 ++++- static/images/en.svg | 1 + static/images/fr.svg | 1 + 5 files changed, 63 insertions(+), 19 deletions(-) create mode 100644 layouts/partials/i18nlist.html create mode 100644 static/images/en.svg create mode 100644 static/images/fr.svg diff --git a/assets/sass/navigation.scss b/assets/sass/navigation.scss index e39492e..c5d30a7 100644 --- a/assets/sass/navigation.scss +++ b/assets/sass/navigation.scss @@ -14,6 +14,8 @@ nav.navbar { .navbar-title { color: #fff; text-decoration: none; + font-size: 1.5rem; + font-weight: 600; } // Hamburger menu styles @@ -81,7 +83,7 @@ nav.navbar { } } - // Mobile navigation styles + // Navbar items and links .nav-links { display: flex; align-items: center; @@ -94,9 +96,17 @@ nav.navbar { align-items: center; } - li { + li.nav-item { padding: 0 1rem; font-size: 1rem; + border: 2px solid transparent; + transition: all 0.3s ease; + + &:hover { + border-color: #ffcc00; + background-color: #333; + border-radius: 5px; + } a { text-decoration: none; @@ -104,21 +114,44 @@ nav.navbar { font-weight: 400; &:hover { - color: #ccc; + color: #ffcc00; // Gold accent on hover } } } + + // Flags in the language selector + li img { + vertical-align: middle; + } } - // Hamburger menu for mobile + // Contact button styling + #contact-button { + background-color: #ffcc00; // Gold button + color: black; + font-weight: 600; + border: none; + padding: 10px 20px; + border-radius: 50px; + transition: all 0.3s ease; + cursor: pointer; + + &:hover { + background-color: #fff; + color: #000; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + } + } + + // Mobile styles @media screen and (max-width: 992px) { .nav-links { - display: none; // Hidden by default + display: none; } #main-navigation.open { display: flex; - flex-direction: column; // Stack items vertically on mobile + flex-direction: column; width: 100%; background-color: #000; padding: 1rem 0; @@ -129,25 +162,17 @@ nav.navbar { } ul { - display: flex; flex-direction: column; - list-style: none; - padding: 0; - margin: 0; } .nav-item { padding: 0.75rem 1rem; margin: 0; width: 100%; - text-align: center; // Ensure the items are centered + text-align: center; a { - text-decoration: none; - color: white; - font-size: 1rem; - font-weight: 400; - display: block; // Make the link take up the full width + display: block; width: 100%; padding: 0.75rem 0; transition: background-color 0.3s ease, color 0.3s ease; @@ -159,7 +184,6 @@ nav.navbar { } } - // Adjustments for larger screens @media (min-width: 992px) { .nav-links { display: flex; diff --git a/layouts/partials/i18nlist.html b/layouts/partials/i18nlist.html new file mode 100644 index 0000000..18a497e --- /dev/null +++ b/layouts/partials/i18nlist.html @@ -0,0 +1,12 @@ +{{ if .IsTranslated }} +

{{ i18n "translations" }}

+ +{{ end }} diff --git a/layouts/partials/site-navigation.html b/layouts/partials/site-navigation.html index 2035f54..fbd7d85 100644 --- a/layouts/partials/site-navigation.html +++ b/layouts/partials/site-navigation.html @@ -8,13 +8,12 @@ diff --git a/static/images/en.svg b/static/images/en.svg new file mode 100644 index 0000000..2f6c03e --- /dev/null +++ b/static/images/en.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/images/fr.svg b/static/images/fr.svg new file mode 100644 index 0000000..050105c --- /dev/null +++ b/static/images/fr.svg @@ -0,0 +1 @@ + \ No newline at end of file