diff --git a/.eleventy.js b/.eleventy.js index 2f9080e..aa758aa 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -14,6 +14,11 @@ module.exports = function (eleventyConfig) { new Date().getFullYear() ); + // Wrap & with a Georgia-italic span so headings use an elegant ampersand + eleventyConfig.addFilter("styleAmp", (str) => + String(str).replace(/&|&/g, '&') + ); + return { templateFormats: ["njk", "html", "xml", "txt"], htmlTemplateEngine: "njk", diff --git a/src/_includes/layouts/service.njk b/src/_includes/layouts/service.njk index 7f861ae..7774173 100644 --- a/src/_includes/layouts/service.njk +++ b/src/_includes/layouts/service.njk @@ -31,7 +31,7 @@ layout: layouts/base.njk

{{ _eyebrow }}

-

{{ _title }}

+

{{ _title | styleAmp | safe }}

{{ _lead }}

Request a Quote diff --git a/src/css/main.css b/src/css/main.css index 40dfdd7..1da4c5e 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -333,7 +333,11 @@ a { } /* Georgia italic has a far more elegant ampersand than Fraunces at small sizes */ -.nav__brand-amp { +/* Shared elegant ampersand — applied via the styleAmp filter in headings + and directly in nav/footer brand markup */ +.amp, +.nav__brand-amp, +.footer__brand-amp { font-family: Georgia, 'Times New Roman', serif; font-style: italic; } @@ -1117,10 +1121,7 @@ a { transition: color 0.2s ease; } -.footer__brand-amp { - font-family: Georgia, 'Times New Roman', serif; - font-style: italic; -} +/* .footer__brand-amp covered by shared .amp rule in section 6 (Navigation) */ .footer__brand:hover .footer__brand-her, .footer__brand:hover .footer__brand-tagline {