From 71f1418fea54e79a6aada1eb735e9728d4d521b4 Mon Sep 17 00:00:00 2001 From: Jesse Borden Date: Fri, 21 Nov 2025 06:02:08 -0800 Subject: [PATCH 1/2] feat(): create utility classes. Refactor landing and blog styles with new classes. Remove unused blog styles. --- .../new-includes/components/callout.html | 6 +- assets/javascripts/new-javascripts/blog.js | 10 +- assets/stylesheets/application.scss | 1 + .../stylesheets/new-stylesheets/_themes.scss | 1 + .../new-stylesheets/_typography.scss | 31 +++++ .../includes/callout/_base.scss | 4 - .../includes/footer/_base.scss | 2 +- .../includes/navigation/_base.scss | 1 + .../new-stylesheets/pages/_blog.scss | 127 ------------------ .../new-stylesheets/pages/_get-started.scss | 39 +----- blog/index.md | 31 +++-- index.md | 2 +- 12 files changed, 60 insertions(+), 195 deletions(-) create mode 100644 assets/stylesheets/new-stylesheets/_typography.scss diff --git a/_includes/new-includes/components/callout.html b/_includes/new-includes/components/callout.html index e055e754e..0945253c7 100644 --- a/_includes/new-includes/components/callout.html +++ b/_includes/new-includes/components/callout.html @@ -5,11 +5,11 @@ >
{% if include.title %} -

{{ include.title }}

+

{{ include.title }}

{% endif %} {% if include.subtitle %} -

{{ include.subtitle }}

+

{{ include.subtitle }}

{% endif %} {% if include.text %} -

{{ include.text }}

+

{{ include.text }}

{% endif %}
{% if include.code %} diff --git a/assets/javascripts/new-javascripts/blog.js b/assets/javascripts/new-javascripts/blog.js index b5310638d..967f072e2 100644 --- a/assets/javascripts/new-javascripts/blog.js +++ b/assets/javascripts/new-javascripts/blog.js @@ -13,11 +13,11 @@ const createAnchor = (postData) => { anchor.href = postData.url anchor.classList = 'post-link' anchor.innerHTML = ` -

${postData.title}

- -

${postData.excerpt}

+

${postData.title}

+ +

${postData.excerpt}

${postData.categories.reduce((markup, category) => { - return markup + ` ${category}` + return markup + ` ${category}` }, '')} ` return anchor @@ -83,7 +83,7 @@ window.addEventListener('click', (evt) => { // Select all category filters selectAllBox.addEventListener('click', () => - selectAllCategories(selectAllBox, filters) + selectAllCategories(selectAllBox, filters), ) filters.forEach((checkbox) => { diff --git a/assets/stylesheets/application.scss b/assets/stylesheets/application.scss index 1b21ff66b..d80608997 100644 --- a/assets/stylesheets/application.scss +++ b/assets/stylesheets/application.scss @@ -11,6 +11,7 @@ layout: source @use "pages"; @use "print"; @use "new-stylesheets/themes" as *; +@use 'new-stylesheets/typography'; @use 'new-stylesheets/includes/header'; @use 'new-stylesheets/includes/navigation'; @use 'new-stylesheets/includes/footer'; diff --git a/assets/stylesheets/new-stylesheets/_themes.scss b/assets/stylesheets/new-stylesheets/_themes.scss index b1f1e5704..ebec01049 100644 --- a/assets/stylesheets/new-stylesheets/_themes.scss +++ b/assets/stylesheets/new-stylesheets/_themes.scss @@ -136,6 +136,7 @@ --site-navigation-box-shadow: none; --site-navigation-background: rgba(0, 0, 0, 0.3); --site-navigation-text-color: #ffffff; + --site-navigation-text-color-selected: #1e162e; --site-navigation-item-background: rgba(0, 0, 0, 0.4); --site-tabs-background: rgba(35, 52, 74, 1); --site-tabs-active-background: #505f83; diff --git a/assets/stylesheets/new-stylesheets/_typography.scss b/assets/stylesheets/new-stylesheets/_typography.scss new file mode 100644 index 000000000..8ed33c26f --- /dev/null +++ b/assets/stylesheets/new-stylesheets/_typography.scss @@ -0,0 +1,31 @@ +// Typography utility classes + +.title-1 { + font-size: 48px; + font-weight: 500; + line-height: 1.2; +} + +.title-2 { + font-size: 42px; + font-weight: 500; + line-height: 1.2; +} + +.title-3 { + font-size: 24px; + font-weight: 500; + line-height: 1.2; +} + +.title-4 { + font-size: 22px; + font-weight: 500; + line-height: 1.2; +} + +.body { + line-height: 1.53; + font-weight: 400; + font-size: 17px; +} diff --git a/assets/stylesheets/new-stylesheets/includes/callout/_base.scss b/assets/stylesheets/new-stylesheets/includes/callout/_base.scss index 542fdc1df..7b00f6726 100644 --- a/assets/stylesheets/new-stylesheets/includes/callout/_base.scss +++ b/assets/stylesheets/new-stylesheets/includes/callout/_base.scss @@ -57,13 +57,9 @@ .callout-title { margin: -4px 0 3px; - font-size: 48px; - font-weight: 600; - line-height: 1.2; } .callout-subtitle { - line-height: 1.25; margin-bottom: 4px; font-size: 24px; } diff --git a/assets/stylesheets/new-stylesheets/includes/footer/_base.scss b/assets/stylesheets/new-stylesheets/includes/footer/_base.scss index a199674f4..9eb0f0281 100644 --- a/assets/stylesheets/new-stylesheets/includes/footer/_base.scss +++ b/assets/stylesheets/new-stylesheets/includes/footer/_base.scss @@ -131,7 +131,7 @@ footer.global-footer { } input:checked + .color-scheme-toggle-label { - background: #fca76c; + background: var(--site-navigation-selected-background); color: #1e162e; } } diff --git a/assets/stylesheets/new-stylesheets/includes/navigation/_base.scss b/assets/stylesheets/new-stylesheets/includes/navigation/_base.scss index 6f8c2dcd0..1a4402826 100644 --- a/assets/stylesheets/new-stylesheets/includes/navigation/_base.scss +++ b/assets/stylesheets/new-stylesheets/includes/navigation/_base.scss @@ -82,6 +82,7 @@ & > span { background-color: var(--site-navigation-selected-background); + color: var(--site-navigation-text-color-selected); } } } diff --git a/assets/stylesheets/new-stylesheets/pages/_blog.scss b/assets/stylesheets/new-stylesheets/pages/_blog.scss index fd9430c68..d565b0c28 100644 --- a/assets/stylesheets/new-stylesheets/pages/_blog.scss +++ b/assets/stylesheets/new-stylesheets/pages/_blog.scss @@ -71,15 +71,11 @@ display: block; color: var(--blog-muted-color); margin-bottom: 10px; - font-weight: 500; } .blog-title { display: block; - font-size: 22px; - line-height: 1.2; margin: 0 0 5px; - font-weight: 500; } .blog-excerpt { @@ -95,7 +91,6 @@ // featured grid styles .blog-featured-grid { margin-top: 146px; - line-height: 1.53; margin-bottom: 50px; .content { @@ -112,15 +107,11 @@ } .blog-featured-grid-headline { - font-size: 48px; - font-weight: 500; margin-bottom: 16px; color: var(--site-text-color); text-align: left; @media only screen and (max-width: 768px) { - font-size: 32px; - line-height: 1.33; margin-bottom: 22px; } } @@ -146,15 +137,7 @@ } .blog-featured-grid-category-headline { - font-size: 24px; - font-weight: 600; margin-bottom: 13px; - line-height: 1.2; - } - - .section-icon { - width: 60px; - margin: 40px 0 0; } .blog-featured-category-posts { @@ -182,80 +165,6 @@ border-radius: 22px; padding: 20px 30px 20px 20px; flex-grow: 1; - - // @media only screen and (max-width: 768px) { - // flex-direction: column; - // } - - img { - width: 168px; - height: 180px; - object-fit: cover; - flex-shrink: 0; - background-color: #f6f6f6; - - @media only screen and (max-width: 768px) { - width: 100%; - height: auto; - } - } - - div { - display: flex; - flex-direction: column; - flex: 1; - min-height: 140px; - position: relative; - padding: 20px; - - .name { - font-size: 24px; - line-height: 1.25; - margin-bottom: 10px; - } - - .text { - font-size: 17px; - flex-grow: 1; - } - } - } - } - - .tertiary-cards, - .primary-cards { - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: 20px; - // padding: 0 0 40px; - - .news-item { - background-color: var(--get-started-card-secondary-bg); - padding: 20px 30px 20px 20px; - display: flex; - text-align: left; - - div { - display: flex; - flex-direction: column; - flex: 1; - position: relative; - - .name { - font-size: 24px; - line-height: 1.25; - margin-bottom: 10px; - } - - .text { - font-size: 17px; - flex-grow: 1; - } - } - } - - @media only screen and (max-width: 768px) { - grid-template-columns: 1fr; } } } @@ -270,20 +179,6 @@ border: 1px solid var(--blog-dropdown-toggle-inset-outline-color-active); } - .dropdown-close { - background: var(--dropdown-close-icon); - position: absolute; - top: 12px; - right: 12px; - background-size: cover; - border: none; - width: 20px; - height: 20px; - padding: 0; - color: var(--blog-muted-color); - cursor: pointer; - } - .dropdown-toggle { display: flex; align-items: center; @@ -436,29 +331,7 @@ text-decoration: none; display: block; - &-with-image { - display: flex; - gap: 36px; - - img { - width: 120px; - height: 120px; - background-size: cover; - } - - @media only screen and (max-width: 1024px) { - display: block; - - img { - width: 100%; - height: auto; - } - } - } - h3 { - font-size: 22px; - font-weight: 600; color: var(--site-text-color); } diff --git a/assets/stylesheets/new-stylesheets/pages/_get-started.scss b/assets/stylesheets/new-stylesheets/pages/_get-started.scss index e2ca9a69a..9a8a42e89 100644 --- a/assets/stylesheets/new-stylesheets/pages/_get-started.scss +++ b/assets/stylesheets/new-stylesheets/pages/_get-started.scss @@ -246,43 +246,6 @@ } } - .tertiary-cards, - .primary-cards { - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: 20px; - // padding: 0 0 40px; - - li { - background-color: var(--get-started-card-secondary-bg); - padding: 20px 30px 20px 20px; - display: flex; - text-align: left; - - div { - display: flex; - flex-direction: column; - flex: 1; - position: relative; - - .name { - font-size: 24px; - line-height: 1.25; - margin-bottom: 10px; - } - - .text { - font-size: 17px; - flex-grow: 1; - } - } - } - - @media only screen and (max-width: 768px) { - grid-template-columns: 1fr; - } - } - .tertiary-cards { img { width: 45px; @@ -553,7 +516,7 @@ @media only screen and (max-width: 768px) { nav { - width: 100%; + width: 100%; ul { white-space: nowrap; diff --git a/blog/index.md b/blog/index.md index dfae2966e..a89adcdec 100644 --- a/blog/index.md +++ b/blog/index.md @@ -7,12 +7,12 @@ title: Blog