diff --git a/_includes/footer.css b/_includes/footer.css new file mode 100644 index 0000000..fa02388 --- /dev/null +++ b/_includes/footer.css @@ -0,0 +1,30 @@ +footer { + border-top: 1px dotted rgba(0,0,0,.15); + padding: 4rem 0; +} + +#footerNav ul { + margin: 0; + padding: 0; + display: flex; + gap: 1em; +} + +#footerNav li { + display: inline; +} + +.footer-container { + max-width: var(--page-width); + margin-left: auto; + margin-right: auto; + display: grid; + grid-template-columns: auto auto; + grid-auto-flow: column; + grid-template-rows: 1fr 1fr; + gap: 1em; +} + +.footer-container > :nth-last-child(-n + 2) { + text-align: end; +} diff --git a/_includes/footer.njk b/_includes/footer.njk index 41f5ace..3f6468d 100644 --- a/_includes/footer.njk +++ b/_includes/footer.njk @@ -20,30 +20,5 @@ {% css %} -footer { - border-top: 1px dotted rgba(0,0,0,.15); - padding: 4rem 0; -} -#footerNav ul { - margin: 0; - padding: 0; - display: flex; - gap: 1em; -} -#footerNav li { - display: inline; -} -.footer-container { - max-width: var(--page-width); - margin-left: auto; - margin-right: auto; - display: grid; - grid-template-columns: auto auto; - grid-auto-flow: column; - grid-template-rows: 1fr 1fr; - gap: 1em; -} -.footer-container > :nth-last-child(-n + 2) { - text-align: end; -} + {% include "footer.css" %} {% endcss %} diff --git a/_includes/header.css b/_includes/header.css new file mode 100644 index 0000000..56b409a --- /dev/null +++ b/_includes/header.css @@ -0,0 +1,57 @@ +header { + display: flex; + position: sticky; + top: 0; + min-height: 6.4rem; + padding: 2rem 0; + backdrop-filter: blur(5px); + background-color: rgba(255,255,255,.92); + box-shadow: 0 3px 15px hsla(0,0%,39.2%,.12); +} + +.header-container { + width: 100%; + max-width: var(--page-width); + margin-left: auto; + margin-right: auto; + display: flex; + justify-content: space-between; + align-items: center; +} + +#mainNav ul { + margin: 0; + padding: 0; +} + +#mainNav li { + display: inline; + margin-left: 1rem; +} + +#mainNav a { + position: relative; + font-size: 16px; + font-family: Aileron; + font-weight: 500; + line-height: 2; + text-transform: uppercase; + color: var(--color-text); + text-decoration: none; +} + +#mainNav a::after { + content: ""; + position: absolute; + background: var(--color-primary); + opacity: 0; + bottom: -4px; + left: 0; + right: 0; + height: 2px; + transition: opacity .3s ease-out; +} + +#mainNav a:hover::after { + opacity: 1; +} diff --git a/_includes/header.njk b/_includes/header.njk index c1a5d66..0e9a6d7 100644 --- a/_includes/header.njk +++ b/_includes/header.njk @@ -8,55 +8,5 @@ {% css %} -header { - display: flex; - position: sticky; - top: 0; - min-height: 6.4rem; - padding: 2rem 0; - backdrop-filter: blur(5px); - background-color: rgba(255,255,255,.92); - box-shadow: 0 3px 15px hsla(0,0%,39.2%,.12); -} -.header-container { - width: 100%; - max-width: var(--page-width); - margin-left: auto; - margin-right: auto; - display: flex; - justify-content: space-between; - align-items: center; -} -#mainNav ul { - margin: 0; - padding: 0; -} -#mainNav li { - display: inline; - margin-left: 1rem; -} -#mainNav a { - position: relative; - font-size: 16px; - font-family: Aileron; - font-weight: 500; - line-height: 2; - text-transform: uppercase; - color: var(--color-text); - text-decoration: none; -} -#mainNav a::after { - content: ""; - position: absolute; - background: var(--color-primary); - opacity: 0; - bottom: -4px; - left: 0; - right: 0; - height: 2px; - transition: opacity .3s ease-out; -} -#mainNav a:hover::after { - opacity: 1; -} + {% include "header.css" %} {% endcss %} diff --git a/_includes/page.css b/_includes/page.css new file mode 100644 index 0000000..7f0bbea --- /dev/null +++ b/_includes/page.css @@ -0,0 +1,62 @@ +* { + box-sizing: border-box; +} + +body { + margin: 0; + font-family: Aileron, sans-serif; + line-height: 1.5; + color: var(--color-text); +} + +main { + max-width: var(--page-width); + margin-left: auto; + margin-right: auto; +} + +h1, h2, h3, h4 { + color: var(--color-primary); +} + +h1 { + font-weight: 700; + font-size: 2.8rem; + text-transform: uppercase; +} + +h2 { + font-weight: 300; + font-size: 2.4rem; + line-height: 2; +} + +h3 { + font-weight: 300; + font-size: 1.8rem; + line-height: 2; +} + +h4 { + font-weight: 400; + font-size: 1.3rem; + line-height: 2; +} + +h5 { + font-weight: 700; + font-size: 1rem; + margin-bottom: 1rem; +} + +p { + line-height: 1.8; +} + +:root { + font-size: 17px; + --page-width: 75rem; + --color-text: #495057; + --color-primary: {{ eseColor }}; +} + diff --git a/_layouts/page.njk b/_layouts/page.njk index e21301f..86fa668 100644 --- a/_layouts/page.njk +++ b/_layouts/page.njk @@ -24,55 +24,5 @@ eleventyComputed: {% css %} -:root { - --page-width: 75rem; - --color-text: #495057; - --color-primary: {{ eseColor }}; - font-size: 17px; -} -* { - box-sizing: border-box; -} -body { - margin: 0; - font-family: Aileron, sans-serif; - line-height: 1.5; - color: var(--color-text); -} -main { - max-width: var(--page-width); - margin-left: auto; - margin-right: auto; -} -h1, h2, h3, h4 { - color: var(--color-primary); -} -h1 { - font-weight: 700; - font-size: 2.8rem; - text-transform: uppercase; -} -h2 { - font-weight: 300; - font-size: 2.4rem; - line-height: 2; -} -h3 { - font-weight: 300; - font-size: 1.8rem; - line-height: 2; -} -h4 { - font-weight: 400; - font-size: 1.3rem; - line-height: 2; -} -h5 { - font-weight: 700; - font-size: 1rem; - margin-bottom: 1rem; -} -p { - line-height: 1.8; -} + {% include "page.css" %} {% endcss %}