') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Design feedback by enatario · Pull Request #17 · RubyGemsOrg/rubycentral-theme · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file addedassets/fonts/Inter-Variable.woff2
Binary file not shown.
Binary file addedassets/fonts/Rubik-Variable.woff2
Binary file not shown.
2 changes: 1 addition & 1 deletion partials/components/hero-home.hbs
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,7 @@
{{#foreach pages}}
{{#if feature_image}}
<figure class="hero__image u-grid-span-3">
{{> "components/image" src=feature_image class="bottom-left" alt=custom_excerpt hero=true sizes="(min-width: 65em) 700px, 100vw"}}
{{> "components/image" src=feature_image alt=custom_excerpt hero=true sizes="(min-width: 65em) 700px, 100vw"}}
</figure>
{{/if}}
{{/foreach}}
Expand Down
16 changes: 8 additions & 8 deletions partials/icons/logo.hbs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/css/base/_buttons.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,7 @@
border: var(--border-width--thick) solid transparent;
cursor: pointer;
display: flex;
font-family: var(--font-family--ui);
font-size: var(--font-size--ui);
font-weight: var(--font-weight--bold);
gap: var(--space--x-small);
Expand Down
18 changes: 13 additions & 5 deletions src/css/base/_fonts.css
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
/*@font-face {
font-display: swap ;
font-family: "Inter";
@font-face {
font-display: swap;
font-family: Rubik;
font-style: normal;
font-weight: 300 900;
src: url("../fonts/Rubik-Variable.woff2") format("woff2");
}

@font-face {
font-display: swap;
font-family: Inter;
font-style: normal;
font-weight: 100 900;
src: url("./fonts/InterVariable.woff2") format("woff2");
}*/
src: url("../fonts/Inter-Variable.woff2") format("woff2");
}
12 changes: 6 additions & 6 deletions src/css/base/_typography.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,40 +70,40 @@ small {
}

.heading-data {
font-family: var(--font-family--heading-data);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-data);
font-weight: var(--font-weight--bold);
}

.heading-overline {
font-family: var(--font-family--heading-overline);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-overline);
font-weight: var(--font-weight--bold);
}

.heading-section {
font-family: var(--font-family--heading-base);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-section);
font-weight: var(--font-weight--normal);
line-height: var(--line-height--tight);
}

.heading-subsection {
font-family: var(--font-family--heading-base);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-subsection);
font-weight: var(--font-weight--normal);
line-height: var(--line-height--tight);
}

.heading-title-big {
font-family: var(--font-family--heading-base);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-title-big);
font-weight: var(--font-weight--normal);
line-height: var(--line-height--tight);
}

.heading-title-small {
font-family: var(--font-family--heading-base);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-title-small);
font-weight: var(--font-weight--normal);
line-height: var(--line-height--tight);
Expand Down
28 changes: 14 additions & 14 deletions src/css/base/_variables.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,11 +59,11 @@
/* Font & typography */
--font-size--50: 0.875rem;
--font-size--100: 1rem;
--font-size--200: 1.25rem;
--font-size--300: 2rem;
--font-size--400: clamp(2rem, 1.25rem + 2vw, 2.5rem);
--font-size--500: clamp(2.5rem, 1.375rem + 3vw, 3.25rem);
--font-size--600: clamp(3rem, 1.875rem + 3vw, 3.75rem);
--font-size--200: 1.15rem;
--font-size--300: 1.5rem;
--font-size--400: clamp(1.75rem, 1.375rem + 1vw, 2rem);
--font-size--500: clamp(2rem, 1.25rem + 2vw, 2.5rem);
--font-size--600: clamp(2.25rem, 1.5rem + 2vw, 2.75rem);

--font-size--body-callout: var(--font-size--400);
--font-size--body-base: var(--font-size--100);
Expand All@@ -78,15 +78,15 @@
--font-size--ui: var(--font-size--100);

--font-weight--normal: 400;
--font-weight--bold: 700;

--font-family--sans: system-ui, "Arial", "Helvetica", sans-serif;
--font-family--serif: hoefler text, baskerville old face, garamond, times new roman, serif;

--font-family--body: var(--font-family--sans);
--font-family--heading-base: var(--font-family--serif);
--font-family--heading-overline: var(--font-family--sans);
--font-family--heading-data: var(--font-family--sans);
--font-weight--bold: 600;

--font-family--sans-fallback: system-ui, "Arial", "Helvetica", sans-serif;
--font-family--inter: "Inter", var(--font-family--sans-fallback);
--font-family--rubik: "Rubik", var(--font-family--sans-fallback);

--font-family--body: var(--font-family--inter);
--font-family--heading: var(--font-family--rubik);
--font-family--ui: var(--font-family--rubik);

--line-height--base: 1.5;
--line-height--tight: 1.2;
Expand Down
2 changes: 1 addition & 1 deletion src/css/components/_cta.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@
padding: var(--space--xx-large);

p {
font-family: var(--font-family--heading-base);
font-family: var(--font-family--heading);
font-size: var(--font-size--body-callout);
font-weight: var(--font-weight--normal);
line-height: var(--line-height--tight);
Expand Down
1 change: 1 addition & 0 deletions src/css/components/_global-nav.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -74,6 +74,7 @@
}

.global-nav__list {
align-items: baseline;
display: flex;
flex-direction: column;
gap: var(--space--large);
Expand Down
6 changes: 3 additions & 3 deletions src/css/components/_hero.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,13 +15,13 @@
}

h1 {
font-family: var(--font-family--heading-overline);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-overline);
font-weight: var(--font-weight--bold);
}

h2 {
font-family: var(--font-family--heading-base);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-title-small);
font-weight: var(--font-weight--normal);
line-height: var(--line-height--tight);
Expand All@@ -33,5 +33,5 @@
}

.hero__image .image {
background-color: var(--color--primary-base);
border-bottom-left-radius: var(--border-radius--x-large);
}
19 changes: 1 addition & 18 deletions src/css/components/_image.css
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,12 @@
.image {
background-color: var(--color--primary-inverse);
border-radius: var(--border-radius--base);
display: block;
height: 100%;
overflow: hidden;

img {
filter: grayscale(1);
height: 100%;
mix-blend-mode: screen;
object-fit: cover;
}
}

.image--bottom-left {
border-bottom-left-radius: var(--border-radius--x-large);
}

.image--bottom-right {
border-bottom-right-radius: var(--border-radius--x-large);
}

.image--top-left {
border-top-left-radius: var(--border-radius--x-large);
}

.image--top-right {
border-top-right-radius: var(--border-radius--x-large);
}
8 changes: 4 additions & 4 deletions src/css/components/_info-block.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -58,13 +58,13 @@
}

h2 {
font-family: var(--font-family--heading-overline);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-overline);
font-weight: var(--font-weight--bold);
}

h3 {
font-family: var(--font-family--heading-base);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-subsection);
font-weight: var(--font-weight--normal);
line-height: var(--line-height--tight);
Expand All@@ -77,13 +77,13 @@

.info-block__content:has(> h4) {
h3 {
font-family: var(--font-family--heading-overline);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-overline);
font-weight: var(--font-weight--bold);
}

h4 {
font-family: var(--font-family--heading-base);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-subsection);
font-weight: var(--font-weight--normal);
line-height: var(--line-height--tight);
Expand Down
2 changes: 1 addition & 1 deletion src/css/components/_link-list.css
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
.link-list {
display: flex;
flex-direction: column;
font-family: var(--font-family--heading);
gap: var(--space--xx-small);

p {
Expand DownExpand Up@@ -60,7 +61,6 @@
}

.link-list--feature .link-list__title {
font-family: var(--font-family--heading-base);
font-size: var(--font-size--heading-subsection);
font-weight: var(--font-weight--normal);
grid-area: title;
Expand Down
4 changes: 2 additions & 2 deletions src/css/components/_section.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,13 +15,13 @@
}

> h2 {
font-family: var(--font-family--heading-overline);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-overline);
font-weight: var(--font-weight--bold);
}

> h3 {
font-family: var(--font-family--heading-base);
font-family: var(--font-family--heading);
font-size: var(--font-size--heading-section);
font-weight: var(--font-weight--normal);
line-height: var(--line-height--tight);
Expand Down