diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-13 14:29:02 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-13 14:35:37 +0100 |
| commit | 144deab1b6067f59a56ae36c333f3097d08056ef (patch) | |
| tree | 8b20660c6b48cce57bbafb5b0a287759d1b8d1ce | |
| parent | c39c9d8d67db7833a027beed870aa3f879a27d57 (diff) | |
Adds Logo to Navbar
| -rw-r--r-- | public/main.css | 17 | ||||
| -rw-r--r-- | src/components/Navbar.astro | 9 | ||||
| -rw-r--r-- | src/i18n/translations/site.ts | 4 |
3 files changed, 30 insertions, 0 deletions
diff --git a/public/main.css b/public/main.css index 91b8183..7b38c44 100644 --- a/public/main.css +++ b/public/main.css @@ -400,8 +400,25 @@ nav { nav { flex-direction: row; justify-content: space-evenly; + align-items: baseline; padding-inline: 0; } + + .breadcrumbs { + order: 0; + } + + .logo { + order: 1; + } + + .switch-language-link { + order: 2; + } +} + +.logo a { + text-decoration: none; } .breadcrumbs li { diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 80829d3..1ce0749 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -2,15 +2,24 @@ import type Locale from '../types/Locale'; import Breadcrumbs from './Breadcrumbs.astro'; import SwitchLanguageLink from './SwitchLanguageLink.astro'; +import tSite from '../i18n/translations/site'; +import translate from '../i18n/translate'; interface Props { locale: Locale; } const { locale } = Astro.props; + +const t = translate(locale); --- <nav class="dark"> + <h1 class="logo"> + <a href="/"> + {t(tSite, { key: 'scots-leid-associe' })} + </a> + </h1> <SwitchLanguageLink currentLocale={locale} /> <Breadcrumbs /> </nav> diff --git a/src/i18n/translations/site.ts b/src/i18n/translations/site.ts index 66c95cd..25598f1 100644 --- a/src/i18n/translations/site.ts +++ b/src/i18n/translations/site.ts @@ -14,6 +14,10 @@ const siteTranslations = { sco: () => 'Lallans', 'en-GB': () => 'Lallans', }, + 'scots-leid-associe': { + sco: () => 'Scots Leid Associe', + 'en-GB': () => 'Scots Language Society', + }, by: { sco: () => 'bi', 'en-GB': () => 'by', |
