From 039de0cc607a6558ed8dd37bfdb884066ff54305 Mon Sep 17 00:00:00 2001
From: Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Date: Sat, 21 Nov 2026 08:14:50 +0000
Subject: [PATCH] fix(footer): show the copyright on small screens
---
layouts/_partials/site-footer.html | 6 +++---
tests/e2e/footer.spec.ts | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/layouts/_partials/site-footer.html b/layouts/_partials/site-footer.html
index 043755c..04342f3 100644
--- a/layouts/_partials/site-footer.html
+++ b/layouts/_partials/site-footer.html
@@ -1,8 +1,8 @@
<footer class="{{ .Site.Params.background_color_class | compare.Default "bg-black" }} bottom-0 w-100 pa3" role="contentinfo">
- <div class="flex justify-between">
- <a class="f4 fw4 hover-white white-70 dn dib-ns pv2 ph3 no-underline" href="{{ .Site.Home.Permalink }}" >
+ <div class="flex flex-wrap justify-between">
+ <a class="f4 fw4 hover-white white-70 dib pv2 ph3 no-underline" href="{{ .Site.Home.Permalink }}" >
© {{ with .Site.Copyright | compare.Default .Site.Title }} {{ . | safe.HTML }} {{ now.Format "2006"}} {{ end }}
</a>
- <div>{{ partials.IncludeCached "social/follow.html" . }}</div>
+ <div class="ph3 ph0-ns">{{ partials.IncludeCached "social/follow.html" . }}</div>
</div>
</footer>
diff --git a/tests/e2e/footer.spec.ts b/tests/e2e/footer.spec.ts
new file mode 100644
index 0000000..058185c
--- /dev/null
+++ b/tests/e2e/footer.spec.ts
@@ -0,0 +1,20 @@
+import { expect, test } from "@playwright/test";
+
+for (const width of [375, 1280]) {
+ test(`footer shows the copyright at ${width}px (#449)`, async ({ page }) => {
+ await page.setViewportSize({ width, height: 900 });
+ await page.goto("/");
+ const footer = page.getByRole("contentinfo");
+ const copyright = footer.getByRole("link", { name: /©/ });
+ await expect(copyright).toBeVisible();
+ const footerBox = await footer.boundingBox();
+ const linkBox = await copyright.boundingBox();
+ expect(linkBox).not.toBeNull();
+ expect(footerBox).not.toBeNull();
+ if (linkBox && footerBox) {
+ expect(linkBox.x + linkBox.width).toBeLessThanOrEqual(
+ footerBox.x + footerBox.width,
+ );
+ }
+ });
+}
--
Gitblit v1.10.0