From 49972ec6b683411120a357c3785a0ed28712d636 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Thu, 31 Aug 2023 08:29:59 +0100 Subject: Changes site to scotsleidassocie.org --- astro.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astro.config.mjs b/astro.config.mjs index 60e7399..0f9b9d5 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -5,5 +5,5 @@ import sitemap from '@astrojs/sitemap'; // https://astro.build/config export default defineConfig({ integrations: [mdx(), sitemap()], - site: 'https://www.lallans.co.uk', + site: 'https://scotsleidassocie.org', }); -- cgit v1.2.3 From bd7adff375965825ef9005f9ea94694d47abbe8c Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Thu, 31 Aug 2023 08:35:59 +0100 Subject: Sitemap excludes payment success confirmation --- astro.config.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/astro.config.mjs b/astro.config.mjs index 0f9b9d5..b9895ef 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,11 @@ import sitemap from '@astrojs/sitemap'; // https://astro.build/config export default defineConfig({ - integrations: [mdx(), sitemap()], + integrations: [ + mdx(), + sitemap({ + filter: (page) => !page.includes('payment-success-confirmation'), + }), + ], site: 'https://scotsleidassocie.org', }); -- cgit v1.2.3 From 737e6161f47657b96a567de20ea5e3f0ef08e3bb Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Thu, 31 Aug 2023 09:26:10 +0100 Subject: Adds robots.txt --- src/pages/robots.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/pages/robots.txt diff --git a/src/pages/robots.txt b/src/pages/robots.txt new file mode 100644 index 0000000..1055a1f --- /dev/null +++ b/src/pages/robots.txt @@ -0,0 +1,5 @@ +User-agent: * +User-agent: AdsBot-Google +Disallow: */payment-success-confirmation + +Sitemap: https://scotsleidassocie.org/sitemap-index.xml -- cgit v1.2.3 From 30a256d434f5cab7feeef16836fbf1e00ad5f83b Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Thu, 31 Aug 2023 10:20:51 +0100 Subject: Adds RSS button --- public/css/modules/footer.css | 27 +++++++++++++++++++++++++++ public/css/modules/index.css | 3 ++- public/images/rss.svg | 20 ++++++++++++++++++++ src/components/Button.astro | 10 +++------- src/components/Footer.astro | 13 ++++++++++--- src/i18n/translations/components/footer.ts | 15 +++++++++++++++ src/i18n/translations/site.ts | 4 ---- src/pages/[locale]/index.astro | 4 ++-- 8 files changed, 79 insertions(+), 17 deletions(-) create mode 100644 public/css/modules/footer.css create mode 100644 public/images/rss.svg create mode 100644 src/i18n/translations/components/footer.ts diff --git a/public/css/modules/footer.css b/public/css/modules/footer.css new file mode 100644 index 0000000..eb9e108 --- /dev/null +++ b/public/css/modules/footer.css @@ -0,0 +1,27 @@ +footer { + display: grid; + grid-template-columns: repeat(var(--grid-column-count), var(--grid-column-width)); + gap: var(--grid-gutter-width); + align-items: baseline; +} + +.footer__rss-button__label { + /* Hides the label from non-screen-readers */ + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +.footer__rss-button__img { + width: calc(8 * var(--relative-eighth-rem)); +} + +.footer__back-to-top { + grid-column: calc(var(--grid-column-count) - 2) / calc(var(--grid-column-count) + 1); +} \ No newline at end of file diff --git a/public/css/modules/index.css b/public/css/modules/index.css index 1a1c62a..d33754f 100644 --- a/public/css/modules/index.css +++ b/public/css/modules/index.css @@ -12,4 +12,5 @@ @import './nav.lg.css' (min-width: 64rem); @import './skip-to-content.css'; @import './committee.css'; -@import './committee.md.css' (min-width: 48rem); \ No newline at end of file +@import './committee.md.css' (min-width: 48rem); +@import './footer.css'; diff --git a/public/images/rss.svg b/public/images/rss.svg new file mode 100644 index 0000000..9a58156 --- /dev/null +++ b/public/images/rss.svg @@ -0,0 +1,20 @@ + + + RSS feed icon + + + + + + + + \ No newline at end of file diff --git a/src/components/Button.astro b/src/components/Button.astro index 9cc3885..20b6087 100644 --- a/src/components/Button.astro +++ b/src/components/Button.astro @@ -1,17 +1,13 @@ --- -import type Digit from '$types/Digit'; - -type LayoutClasses = `grid-span-${Digit}${'' | ' grid-end' | ' grid-prose-end'}`; - interface Props { href: string; - layoutClasses: LayoutClasses; + classNames: string; } -const { href, layoutClasses } = Astro.props; +const { href, classNames } = Astro.props; --- - +

diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 62b3b82..40fdddb 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,6 +1,6 @@ --- import translate from '$i18n/translate'; -import tSite from '$i18n/translations/site'; +import tComponent from '$i18n/translations/components/footer'; import { getLocaleFromPathOrDefault } from '$lib/getLocaleFromPath'; import Button from './Button.astro'; @@ -9,7 +9,14 @@ const t = translate(locale); ---
diff --git a/src/i18n/translations/components/footer.ts b/src/i18n/translations/components/footer.ts new file mode 100644 index 0000000..c7d6055 --- /dev/null +++ b/src/i18n/translations/components/footer.ts @@ -0,0 +1,15 @@ +import type { TranslationsDictionary } from '$types/TranslationsDictionary'; + +const tComponent = { + 'back-to-top': { + sco: () => 'Back til tap', + 'en-GB': () => 'Back to top', + }, + 'subscribe-to-rss': { + sco: () => 'Subscrive til oor RSS feed', + 'en-GB': () => 'Subscribe to our RSS feed', + }, +}; + +type Raw = typeof tComponent; +export default tComponent as TranslationsDictionary; diff --git a/src/i18n/translations/site.ts b/src/i18n/translations/site.ts index 7d48670..59a8cd4 100644 --- a/src/i18n/translations/site.ts +++ b/src/i18n/translations/site.ts @@ -32,10 +32,6 @@ const tSite = { sco: () => 'an', 'en-GB': () => 'and', }, - 'back-to-top': { - sco: () => 'Back til tap', - 'en-GB': () => 'Back to top', - }, locale: { sco: ({ locale }: { locale: Locale }) => { switch (locale) { diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro index 39db161..f031e8e 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -27,7 +27,7 @@ const mostRecentNewsItem = await getMostRecentNewsItem(locale); { mostRecentNewsItem && ( - ) @@ -73,7 +73,7 @@ const mostRecentNewsItem = await getMostRecentNewsItem(locale);

-

-- cgit v1.2.3 From e55874883b8c91577f7125adfecc11ffd55601b2 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Thu, 31 Aug 2023 10:22:33 +0100 Subject: fixes robots.txt --- src/pages/robots.txt | 5 ----- src/pages/robots.txt.ts | 11 +++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 src/pages/robots.txt create mode 100644 src/pages/robots.txt.ts diff --git a/src/pages/robots.txt b/src/pages/robots.txt deleted file mode 100644 index 1055a1f..0000000 --- a/src/pages/robots.txt +++ /dev/null @@ -1,5 +0,0 @@ -User-agent: * -User-agent: AdsBot-Google -Disallow: */payment-success-confirmation - -Sitemap: https://scotsleidassocie.org/sitemap-index.xml diff --git a/src/pages/robots.txt.ts b/src/pages/robots.txt.ts new file mode 100644 index 0000000..c7e396f --- /dev/null +++ b/src/pages/robots.txt.ts @@ -0,0 +1,11 @@ +import type { APIContext } from 'astro'; + +export async function get(context: APIContext) { + return new Response(` + User-agent: * + User-agent: AdsBot-Google + Disallow: */payment-success-confirmation + + Sitemap: ${context.site}sitemap-index.xml + `); +} -- cgit v1.2.3 From 5bfb00f6cdbb369d834dbe27d213d80a821f8036 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Thu, 31 Aug 2023 10:26:30 +0100 Subject: Better support for Sitka typefaces --- public/css/variables/typography.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/variables/typography.css b/public/css/variables/typography.css index fd3452a..810a129 100644 --- a/public/css/variables/typography.css +++ b/public/css/variables/typography.css @@ -9,7 +9,7 @@ --font-serif: Alegreya, - Sitka, + Sitka, "Sitka Display", "Sitka Heading", "Sitka Text", -apple-system-ui-serif, "Droid Serif", ui-serif, -- cgit v1.2.3