summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-19 21:56:32 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-19 21:56:32 +0100
commitac3666f65bd81f48c8d88099310070eeff46fbd7 (patch)
tree08d35d461c8dc11286ebcadda653bc87ac683fab /src
parent6a493f1a07612043a6ab75f044059b67e3a8b95b (diff)
Better Back To Top link layout
Diffstat (limited to 'src')
-rw-r--r--src/components/Footer.astro7
-rw-r--r--src/pages/[locale]/index.astro4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/components/Footer.astro b/src/components/Footer.astro
index f1ee19c..2a5307e 100644
--- a/src/components/Footer.astro
+++ b/src/components/Footer.astro
@@ -2,13 +2,14 @@
import translate from '$i18n/translate';
import tSite from '$i18n/translations/site';
import getLocaleFromPath from '$lib/getLocaleFromPath';
+import Button from './Button.astro';
const locale = getLocaleFromPath(Astro.url.pathname);
const t = translate(locale);
---
<footer>
- <p class="back-to-top">
- <a class="btn" href="#top">▴ {t(tSite, { key: 'back-to-top' })}</a>
- </p>
+ <Button layoutClasses="grid-span-3 grid-end" href="#top">
+ ▴ {t(tSite, { key: 'back-to-top' })}
+ </Button>
</footer>
diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro
index 82cafd4..11188a0 100644
--- a/src/pages/[locale]/index.astro
+++ b/src/pages/[locale]/index.astro
@@ -19,9 +19,9 @@ const mostRecentNewsItem = await getMostRecentNewsItem(locale);
<Page title={t(tPage, { key: 'title' })}>
<section>
- <h2 set:html={t(tPage, { key: 'news' })} />
+ <h2 class="grid-span-6" set:html={t(tPage, { key: 'news' })} />
{mostRecentNewsItem && <NewsPreviewLink headingLevel="h3" newsItem={mostRecentNewsItem} />}
- <div class="align-end margin-block-start-sm">
+ <div class="grid-end margin-block-start-sm">
<a href={`/${locale}/news`} class="btn">
{t(tPage, { key: 'aw-news' })} ▷
</a>