diff --git a/src/main/resources/templates/fragments/header.html b/src/main/resources/templates/fragments/header.html index 4fe0403..31e04fe 100644 --- a/src/main/resources/templates/fragments/header.html +++ b/src/main/resources/templates/fragments/header.html @@ -55,13 +55,18 @@ - + - Our Products - Catering - Our Story - Contact + Our Products diff --git a/src/main/resources/templates/fragments/page.html b/src/main/resources/templates/fragments/page.html index f6351ba..28cb33b 100644 --- a/src/main/resources/templates/fragments/page.html +++ b/src/main/resources/templates/fragments/page.html @@ -15,8 +15,11 @@
+ +
-
+
diff --git a/src/main/resources/templates/history.html b/src/main/resources/templates/history.html index c0fcac6..dbfed4e 100644 --- a/src/main/resources/templates/history.html +++ b/src/main/resources/templates/history.html @@ -26,7 +26,7 @@

How it started

-

+

Morissa Bennett opened The Vine in 2024, at 215 E Main Street, in the middle of downtown Princeville. The plan was not complicated. Bake it ourselves, sell it ourselves, and keep enough tables that nobody feels rushed out the door. @@ -42,6 +42,14 @@

+
+ Cinnamon rolls, iced, on the counter at The Vine +
The cinnamon rolls, most mornings
+
+

The cakes are the fun part

@@ -53,6 +61,14 @@

+
+ A decorated cake made to order at The Vine +
Made to order, whatever the week is celebrating
+
+

Around town

diff --git a/src/main/styles/components.css b/src/main/styles/components.css index 058712a..a1fc1e4 100644 --- a/src/main/styles/components.css +++ b/src/main/styles/components.css @@ -200,3 +200,37 @@ @utility band { @apply py-14 md:py-20; } + +/* + * THE PAGE YOU ARE ON, in the nav. A rule under the word rather than a colour change: the nav is already + * sage on cream, and darkening it further reads as a hover, not as "you are here". + */ +@utility is-here { + @apply text-bakery-900; + text-decoration: underline; + text-decoration-color: var(--color-bakery-500); + text-decoration-thickness: 2px; + text-underline-offset: 8px; +} + +/* + * The keyboard's way past the nav. Off-screen until focused, then a normal-looking button in the corner — + * the pattern only works if it becomes visible, which is the half everyone forgets. + */ +@utility skip-link { + @apply sr-only; + &:focus { + @apply not-sr-only fixed left-4 top-4 z-50 pill-sage; + } +} + +/* + * An opening paragraph set like a printed one. Used once, on the story — a drop cap on every page would + * be a costume rather than a voice. + */ +@utility opening-para { + &::first-letter { + @apply font-adbhashitha text-6xl text-bakery-700 float-left mr-3 mt-1; + line-height: 0.75; + } +} diff --git a/src/test/java/com/itsthevine/web/SiteControllerTest.java b/src/test/java/com/itsthevine/web/SiteControllerTest.java index 78880be..8f0fd7f 100644 --- a/src/test/java/com/itsthevine/web/SiteControllerTest.java +++ b/src/test/java/com/itsthevine/web/SiteControllerTest.java @@ -123,6 +123,24 @@ class SiteControllerTest { mvc.perform(get("/products")).andExpect(content().string(containsString("href=\"/catering\""))); } + @Test + void theNavMarksThePageYouAreOn() throws Exception { + // Generated from the path the controller set, so a wrong model attribute would mark nothing at + // all — and nothing at all looks exactly like a page that simply has no active link. + mvc.perform(get("/catering")) + .andExpect(content().string(containsString("href=\"/catering\" aria-current=\"page\""))); + mvc.perform(get("/products")) + .andExpect(content().string(containsString("href=\"/products\" aria-current=\"page\""))) + .andExpect(content().string(not(containsString("href=\"/catering\" aria-current")))); + } + + @Test + void everyPageOffersTheKeyboardAWayPastTheNav() throws Exception { + mvc.perform(get("/")) + .andExpect(content().string(containsString("href=\"#content\""))) + .andExpect(content().string(containsString("id=\"content\""))); + } + @Test void aCateringButtonStartsTheEnquiryOffAboutThatTable() throws Exception { mvc.perform(get("/contact").param("about", "Weddings"))