') + ')', '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); } })(); })(); Finessing some of the hp elements more by enatario · Pull Request #19 · 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
14 changes: 7 additions & 7 deletions home.hbs
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,19 +2,19 @@

{{> "components/hero-home" copy="title:'Home::Hero - Body'" primary="title:'Home::Hero - Button Primary'" secondary="title:'Home::Hero - Button Secondary'"}}

{{#> "components/section" id="pillars" copy="title:'Home::Pillars - Heading'" grid="trio"}}
{{> "components/info-block" copy="title:'Home::Pillars - Conferences'" feature="tag:hash-home-featured-event" featureLabel="Next up" featureCta="title:'Home::Pillars - Button'" id="" border=true}}
{{> "components/info-block" copy="title:'Home::Pillars - OpenSource'" secondary="title:'Home::Pillars - OpenSource - Button'" id="" border=true}}
{{> "components/info-block" copy="title:'Home::Pillars - Community'" primary="title:'Home::Pillars - Community - Button'" id="" border=true}}
{{/components/section}}

{{#> "components/section"}}
<div class="home-involvement u-grid">
<div class="home-involvement">
{{> "components/link-list" links="tag:hash-home-involvement" description=true feature=true}}
<figure class="home-involvement__image" data-involvement-image>
{{> "components/image" src="http://localhost:2368/content/images/2026/06/about-mission-audience.jpg" alt="A large audience watching a conference talk"}}
</figure>
</div>
{{/components/section}}

{{#> "components/section" id="pillars" copy="title:'Home::Pillars - Heading'" grid="trio" feature=true}}
{{> "components/info-block" copy="title:'Home::Pillars - Conferences'" feature="tag:hash-home-featured-event" featureLabel="Next up" featureCta="title:'Home::Pillars - Button'" id=""}}
{{> "components/info-block" copy="title:'Home::Pillars - OpenSource'" secondary="title:'Home::Pillars - OpenSource - Button'" id=""}}
{{> "components/info-block" copy="title:'Home::Pillars - Community'" primary="title:'Home::Pillars - Community - Button'" id=""}}
{{/components/section}}

{{> "components/cta" copy="title:'Home::Transparency'" primary="title:'Home::Transparency - Button'" label="Transparency and governance"}}
3 changes: 1 addition & 2 deletions partials/components/section.hbs
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
{{!-- params: id (optional, anchor target — matches the hero link-list href), copy (optional, section-level overline+heading filter; omit when the wrapped content already provides its own heading, e.g. a standalone info-block), grid (string: "trio" or "quad" — lay child components out in a flowing grid using the matching u-grid modifier) --}}
<section{{#if id}} id="{{id}}"{{/if}} class="section u-container">
<section{{#if id}} id="{{id}}"{{/if}} class="section u-container{{#if feature}} section--feature{{/if}}">
{{#if copy}}
{{#get 'pages' filter=copy limit='1'}}
{{#foreach pages}}
Expand Down
18 changes: 5 additions & 13 deletions src/css/components/_home-involvement.css
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
.home-involvement .link-list {
@media (min-width: 55em) {
grid-column: span 5;
}
.home-involvement {
display: grid;
gap: var(--space--large);
}

.home-involvement__image {
margin: 0;

@media (min-width: 55em) {
grid-column: span 2;
}
}

.home-involvement__image {
align-self: start;
justify-self: center;
max-width: 65rem;
}
10 changes: 5 additions & 5 deletions src/css/components/_info-block.css
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
.info-block {
background-color: var(--color--background-base);
display: flex;
flex-direction: column;
gap: var(--space--medium);
Expand All@@ -21,9 +20,14 @@
}

.info-block--border {
background-color: var(--color--background-base);
border: var(--border--dark);
border-radius: var(--border-radius--base);
padding: var(--space--base);

.cta-buttons {
margin-block-start: auto;
}
}

.info-block__image {
Expand DownExpand Up@@ -70,10 +74,6 @@
font-weight: var(--font-weight--normal);
line-height: var(--line-height--tight);
}

.cta-buttons {
margin-block-start: auto;
}
}

.info-block__content:not(:has(> h2)) h3 {
Expand Down
2 changes: 1 addition & 1 deletion src/css/components/_link-list.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,7 +62,7 @@

.link-list--feature .link-list__title {
font-size: var(--font-size--heading-subsection);
font-weight: var(--font-weight--normal);
font-weight: var(--font-weight--bold);
grid-area: title;
line-height: var(--line-height--tight);
}
Expand Down
14 changes: 14 additions & 0 deletions src/css/components/_section.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,3 +27,17 @@
line-height: var(--line-height--tight);
}
}

.section--feature h2 {
align-items: center;
display: flex;
gap: var(--space--medium);

&::after {
background-color: var(--color--secondary-base);
content: "";
display: block;
width: 100%;
height: var(--border-width--base);
}
}