From b041b2d6b15bc74a0e6ddeef96970d5d8d8f5383 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Thu, 5 Nov 2026 16:02:22 -0800 Subject: [PATCH 01/14] Restyle the homepage below the hero as /community/ cards Below the hero, the homepage was a purple gradient with large white headings, while /community/ uses white cards on a light canvas. This keeps the hero as the only full-width band and moves everything under it into compact white cards in the /community/ style, with the big participant carousel replaced by the /community/ logo strip. The strip is now a component both pages share, and the card styles live in a new `sass/_cards.scss` that /community/ also draws its card surface from. The hero gets sentence case and a copyable `docker run` command, and the Documentation and Community nav menus now open on keyboard focus. Signed-off-by: Madelyn Olson --- content/_index.md | 19 +- sass/_cards.scss | 224 +++++++ sass/_community.scss | 25 +- sass/_valkey.scss | 589 ++----------------- sass/css/styles.scss | 1 + static/assets/js/carousel.js | 212 ------- static/assets/js/community.js | 11 +- templates/community-home.html | 11 +- templates/includes/head.html | 3 - templates/includes/participant-carousel.html | 61 -- templates/index.html | 212 ++++--- templates/macros/community.html | 18 +- templates/macros/release.html | 32 +- 13 files changed, 437 insertions(+), 981 deletions(-) create mode 100644 sass/_cards.scss delete mode 100644 static/assets/js/carousel.js delete mode 100644 templates/includes/participant-carousel.html diff --git a/content/_index.md b/content/_index.md index 16ea142e..fafc9cc9 100644 --- a/content/_index.md +++ b/content/_index.md @@ -6,42 +6,39 @@ repos_heading= "Featured repositories" github_org= "https://github.com/valkey-io" github_org_text= "All repos in the Valkey GitHub organization" -# Number of blog posts shown in the "Latest Blog Posts" panel. +# Number of blog posts shown in the "Latest blog posts" panel. latest_blog_posts= 4 headline= "Valkey: an open source, in-memory data store" long_description= "" [extra.hero] -headings = ["FAST. RELIABLE.", "OPEN SOURCE, FOREVER."] +headings = ["Fast. Reliable.", "Open source, forever."] subtitle = "Valkey is an open source (BSD) high-performance key/value datastore that supports a variety of workloads such as caching, message queues, and can act as a primary database. The project is backed by the Linux Foundation, ensuring it will remain open source forever." -button_text = "GET STARTED" +button_text = "Get started" button_url = "/topics/quickstart" -secondary_button_text = "INSTALL VALKEY" +secondary_button_text = "Install Valkey" secondary_button_url = "/topics/installation" +command = "docker run -d -p 6379:6379 valkey/valkey" [[extra.documentation_cards]] title = "Usage guide" description = "Detailed documentation on the various datatypes supported by Valkey and best practices." -button_text = "Documentation by topic" button_url = "/topics/" [[extra.documentation_cards]] title = "Valkey API" description = "View the full list of Valkey commands including first party modules." -button_text = "Command Reference" button_url = "/commands" [[extra.documentation_cards]] title = "Clients" description = "Recommended Valkey client libraries for Python, Java, Go, Node.js, PHP, C#, Ruby, and more." -button_text = "Learn More" button_url = "/clients/" [[extra.documentation_cards]] title = "Performance" description = "Deep dive into Valkey performance numbers across versions." -button_text = "Explore" button_url = "/performance/" [[extra.download_ctas]] @@ -56,8 +53,8 @@ title= "Read the docs" +++ -## Learn more +## Learn more {.community-home-kicker} -Valkey can run as either a **standalone** daemon or in a **cluster**, with options for **replication** and **high availability**. Valkey natively supports a rich collection of datatypes, including **strings**, **numbers**, **hashes**, **lists**, **sets**, **sorted sets**, **bitmaps**, **hyperloglogs** and more. +Valkey can run as either a standalone daemon or in a cluster, with options for replication and high availability. Valkey natively supports a rich collection of datatypes, including strings, numbers, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs and more. You can operate on data structures in-place with an expressive collection of commands. -Valkey also supports native extensibility with built-in scripting support for **Lua** and supports **module** plugins to create new commands, data types, and more. +Valkey also supports native extensibility with built-in scripting support for Lua and supports module plugins to create new commands, data types, and more. diff --git a/sass/_cards.scss b/sass/_cards.scss new file mode 100644 index 00000000..f0d02cf3 --- /dev/null +++ b/sass/_cards.scss @@ -0,0 +1,224 @@ +// Cards: white cards on a light canvas, the design /community/ introduced. +// The homepage is built from it. The canvas (.community-home-canvas), section +// head and label (.community-home-section-head, .community-home-kicker), and +// the logo strip are /community/'s, in _community.scss. +// +// Imported before _community.scss, which takes its palette and the card +// surface from here. + +$community-purple-900: #2d2471; +$community-purple-800: #35247e; +$community-blue-500: #5b6fff; +$community-ink: #072150; + +// The white card: /community/'s Connect card and every card below. +@mixin card { + background: #fff; + border-radius: 18px; + box-shadow: 0 10px 28px rgba(60, 60, 130, 0.08); +} + +// Homepage (templates/index.html) ------------------------------------------- + +// Every block below the hero is a card on .community-home-canvas. Two columns +// from 900px: the release cards stack beside the blog card, then Learn more +// and the logo strip run full width. The 1fr row takes any height the blog +// card has over the two release cards, and the past releases card sits at the +// top of it, so both release cards keep their natural height. +.homepage-grid { + display: grid; + gap: 2rem; + max-width: var(--max-width); + margin: 3.4rem auto; + + @include respond-min(900px) { + grid-template-columns: 1fr 1fr; + grid-template-rows: auto 1fr auto auto; + grid-template-areas: + "release blog" + "past blog" + "learn learn" + "participants participants"; + + .homepage-card-release { grid-area: release; } + .homepage-card-past { grid-area: past; align-self: start; } + .homepage-card-blog { grid-area: blog; } + .homepage-card-learn { grid-area: learn; } + .homepage-card-participants { grid-area: participants; } + } +} + +// Connect's padding is too wide for a 390px screen, so cards start tighter. +.homepage-card { + @include card; + min-width: 0; + padding: 2.2rem 2rem; + + @include respond-min(768px) { + padding: 2.7rem 3.4rem; + } + + > :last-child { + margin-bottom: 0; + } + + // Sentence-case section labels; /community/ keeps the uppercase kicker. + // #4a5ad8 is the hero button blue: 5.6:1 on white, where the kicker's + // #5b6fff is 4.1:1. 2.4rem keeps them above the 2rem release headline. + // Balanced wrapping avoids leaving "releases" alone on a line. + .community-home-kicker { + color: #4a5ad8; + font-size: 2.4rem; + font-weight: 600; + letter-spacing: normal; + text-transform: none; + text-wrap: balance; + } + + .release-headline { + margin: 0 0 1rem; + + a { + color: $community-ink; + + &:hover { + text-decoration: underline; + } + } + } + + .link-readmore { + text-transform: none; + font-size: 1.4rem; + } + + // Baseline-aligned: the label is the tallest item, so it sits at the top + // of the head and lines up with the labels in the other cards, and the + // link shares its baseline. + .community-home-section-head { + align-items: baseline; + + .link-readmore { + margin: 0; + } + } +} + +// One row per post, split by the logo strip's hairline. The title takes the +// same ink as the latest release and Learn more titles. +.homepage-blog-card { + display: block; + padding: 1.4rem 0; + border-top: 1px solid #e9ebf4; + + &:first-child { + padding-top: 0; + border-top: 0; + } + + &:last-child { + padding-bottom: 0; + } + + &:hover .homepage-blog-card-title { + text-decoration: underline; + } +} + +.homepage-blog-card-title { + margin: 0 0 0.3rem; + color: $community-ink; + font-size: 1.7rem; + font-weight: 700; + line-height: 1.3; +} + +.homepage-blog-card-meta { + margin: 0 0 0.5rem; + color: #606985; + font-size: 1.3rem; +} + +.homepage-blog-card-description { + display: -webkit-box; + margin: 0; + overflow: hidden; + color: #47506b; + font-size: 1.4rem; + line-height: 1.45; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +// The kicker is the markdown heading in content/_index.md. Flex keeps the +// inline-block kicker off the parent's line box, which would push it below +// the kickers in the other cards. +.homepage-learn-intro { + display: flex; + flex-direction: column; + align-items: flex-start; + + p { + margin: 1.2rem 0 0; + color: #47506b; + font-size: 1.6rem; + line-height: 1.6; + } +} + +.homepage-learn-grid { + display: grid; + gap: 2.4rem; + margin-top: 2.4rem; + + @include respond-min(600px) { + grid-template-columns: 1fr 1fr; + } + + @include respond-min(1100px) { + grid-template-columns: repeat(4, 1fr); + } +} + +.homepage-learn-item { + display: block; + padding: 1.8rem 2rem; + border-radius: 14px; + background: #f8faff; + transition: background 0.15s; + + &:hover { + background: #eef1fb; + + h3 { + text-decoration: underline; + } + } + + &:focus-visible { + outline: 2px solid $community-blue-500; + outline-offset: 2px; + } + + h3 { + margin: 0 0 0.8rem; + color: $community-ink; + font-size: 1.8rem; + font-weight: 700; + + // Same chevron as .link-readmore. inline-block keeps the hover underline + // off it. + &::after { + content: '\203A'; + display: inline-block; + margin-left: 0.4em; + } + } + + p { + margin: 0; + color: #47506b; + font-size: 1.5rem; + line-height: 1.5; + } +} diff --git a/sass/_community.scss b/sass/_community.scss index a143a17b..c70b09ed 100644 --- a/sass/_community.scss +++ b/sass/_community.scss @@ -1,12 +1,8 @@ -// Community landing page (templates/community-home.html) -// The "Ways to contribute" tiles reuse the shared .community-card styles -// from _valkey.scss. Everything here is specific to the landing page: -// participant logo strip, photo hero, connect bar, and photo carousel. - -$community-purple-900: #2d2471; -$community-purple-800: #35247e; -$community-blue-500: #5b6fff; -$community-ink: #072150; +// Community landing page (templates/community-home.html): participant logo +// strip, photo hero, connect bar, and photo carousel. The "Ways to +// contribute" tiles reuse the shared .community-card styles from +// _valkey.scss. The palette and the card surface come from _cards.scss, +// whose pages reuse the canvas, section head, kicker and logo strip below. // Shared pieces -------------------------------------------------------------- @@ -19,10 +15,11 @@ $community-ink: #072150; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; +} - &:hover { - color: $community-purple-800; - } +// Only labels that are links, such as "Valkey participants", change colour. +a.community-home-kicker:hover { + color: $community-purple-800; } .community-home-btn { @@ -249,9 +246,7 @@ $community-ink: #072150; max-width: var(--max-width); margin: 3.4rem auto; padding: 2.7rem 3.4rem; - background: #fff; - border-radius: 18px; - box-shadow: 0 10px 28px rgba(60, 60, 130, 0.08); + @include card; @include respond-min(900px) { flex-direction: row; diff --git a/sass/_valkey.scss b/sass/_valkey.scss index bffd23d2..5a26cd2f 100644 --- a/sass/_valkey.scss +++ b/sass/_valkey.scss @@ -299,7 +299,8 @@ p { display: flex; } - &:hover { + &:hover, + &:focus-within { > span { color: #04202a; } @@ -321,6 +322,21 @@ p { text-decoration: none; } } + + // Desktop only: below 1024px the submenu is always listed under its link. + @include respond-min(1024px) { + &::after { + content: ''; + display: inline-block; + width: 0.45em; + height: 0.45em; + margin-left: 0.5em; + border-right: 2px solid currentColor; + border-bottom: 2px solid currentColor; + vertical-align: 0.25em; + transform: rotate(45deg); + } + } } .submenu { @@ -1725,10 +1741,16 @@ html.banner-hidden .banner { // Hero Section Styles .hero-section { position: relative; + min-height: min(65vh, 68rem); background-size: cover; - background-position: right center; + // Only the photo layer moves; the gradients fill the box either way. + background-position: center, center, 65% center; background-color: #30186e; - background-image: linear-gradient(to bottom, rgba(48, 24, 110, 0.15), rgba(48, 24, 110, 0.75)), url('/img/hero-bg.webp'); + // The radial layer dims the photo behind the headline without hiding it. + background-image: + radial-gradient(ellipse 50% 60% at center, rgba(28, 18, 58, 0.6), rgba(28, 18, 58, 0)), + linear-gradient(to bottom, rgba(48, 24, 110, 0.15), rgba(48, 24, 110, 0.75)), + url('/img/hero-bg.webp'); display: flex; align-items: center; justify-content: center; @@ -1760,7 +1782,6 @@ html.banner-hidden .banner { font-weight: 700; margin: 0; line-height: 1; - letter-spacing: 2px; color: white; @include respond-min(768px) { @@ -1770,7 +1791,7 @@ html.banner-hidden .banner { .hero-subtitle { font-size: 1.8rem; - font-weight: 700; + font-weight: 400; max-width: 800px; margin: 2rem auto 4rem; line-height: 1.6; @@ -1841,176 +1862,33 @@ html.banner-hidden .banner { } } -// Documentation Section Styles -.documentation-section { - padding: 2rem 2rem 4rem; - - // Continues the .whats-new-section gradient, finishing on the #6983ff that - // .homepage-participants-section starts from. - background: linear-gradient(rgb(81, 85, 193), #6983FF); - position: relative; - text-align: center; - color: white; - - @include respond-min(768px) { - padding-bottom: 8rem; - } - - .col { - max-width: 890px; - margin: 0 auto; - } - - a { - color: white; - text-decoration: underline; - } - - h2 { - width: 100%; - line-height: 1.2; - font-size: 3.75rem; - text-align: center; - font-weight: 700; - margin-bottom: 1.75rem; - - @include respond-min(768px) { - font-size: 6rem; - } - } - - p { - margin-bottom: 2rem; - } -} - -.documentation-card-grid { - margin-top: 4rem; - - @media (max-width: 1100px) { - .col { - flex: 1 1 50%; - margin-bottom: 3rem; - } - } - - @media (max-width: 768px) { - .col { - flex: 1 1 100%; - } - } -} - -.documentation-card { - display: flex; - flex-direction: column; - - // Spaces title from description, and keeps the button off the description - // even when `margin-top: auto` has no slack left to push it down. - gap: 1.5rem; - padding: 4rem; - border-radius: 20px; - color: white; - background: #2d2471; - - @include respond-min(768px) { - min-height: 100%; - } - - h3 { - font-weight: 700; - font-size: 2rem; - line-height: 1.2; - text-align: center; - color: white; - margin: 0 0 .5rem; - } - - p { - text-align: left; - margin: 0; - } - - ul { - text-align: left; - padding: 0 0 0 18px; - margin: 10px 0 20px; - } - - a.btn { - color: white; - border-radius: 24px; - border: 1px solid currentcolor; - padding: 1rem; - margin-top: auto; - text-decoration: none; - } -} - -// What's New Section Styles -.whats-new-section { - padding-bottom: 4rem; - - // Stops short of the full #6983ff so the section doesn't end glaring bright. - // .documentation-section picks the gradient up from here. - background-image: linear-gradient(rgb(48, 23, 110), rgb(81, 85, 193)); - - @include respond-min(768px) { - padding: 0 0 4rem; - } - - h2 { - width: 100%; - line-height: 1.2; - font-size: 3.75rem; - color: white; - text-align: center; - font-weight: 700; - margin: 0 0 1.75rem; - - @include respond-min(768px) { - font-size: 6rem; - } - } -} - -.whats-new-inner { - display: flex; - width: 100%; - padding: 2rem; - border-radius: 20px; - background: rgba(255, 255, 255, 0.2); +// The install command under the buttons. .copy-code is the light block from the +// release pages, so it is recoloured here to sit on the dark hero, and it wraps +// at spaces rather than scrolling on narrow screens. +.hero-content .copy-code { + display: inline-flex; + max-width: 100%; + margin: 3rem 0 0; + border-color: rgba(255, 255, 255, 0.35); + background: rgba(16, 8, 48, 0.5); + text-align: left; - @include respond-min(768px) { - padding: 2.5rem; + code { + color: #fff; + white-space: pre-wrap; } - h3 { - color: white; - font-size: 2.75rem; - font-weight: 700; - width: 100%; - margin: 0 0 1rem; - } + .copy-code-button { + border-left-color: rgba(255, 255, 255, 0.35); + color: rgba(255, 255, 255, 0.85); - .inner-card { - background: white; - padding: 3rem; - border-radius: 10px; - margin: 0 0 3rem; - - // The panel's own padding closes out the column; a trailing card margin - // would stack on top of it. - &:last-child { - margin-bottom: 0; - } - - h4 { - margin: 0 0 1rem; + &:hover { + background: rgba(255, 255, 255, 0.12); + color: #fff; } - hr { - margin: 2rem 0; + &.copied { + color: #8ce99a; } } } @@ -2020,7 +1898,6 @@ html.banner-hidden .banner { flex-wrap: wrap; align-items: baseline; gap: 1rem; - margin: 0 0 1.5rem; font-size: 2rem; font-weight: 700; @@ -2405,378 +2282,6 @@ blockquote { } } -// Homepage blog cards: text-only cards stacked vertically, matching the release -// cards in the other column. -.homepage-blog-section { - display: flex; - flex-direction: column; - gap: 1.5rem; - margin-bottom: 3rem; -} - -// The card is itself an anchor, so it takes its colour from the global -// `a, a:visited` rule. That is the same rule the release links next to it use, -// which is the point: the two white cards in this panel cannot drift apart. -// Do not set a colour here or on the title. -.homepage-blog-card { - background: #fff; - border-radius: 10px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); - padding: 2rem 2.5rem; - transition: box-shadow 0.2s ease; - display: block; - text-decoration: none; - - &:hover { - box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); - } -} - -.homepage-blog-card-title { - margin: 0 0 0.5rem 0; - font-size: 1.8rem; - line-height: 1.3; - font-weight: 700; -} - -.homepage-blog-card-meta { - margin: 0 0 1rem; - font-size: 1.3rem; - color: #4a5568; -} - -.homepage-blog-card-description { - margin: 0; - font-size: 1.4rem; - line-height: 1.4; - color: #4a5568; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -// Sits on the heading row rather than under the cards, so the column ends on a -// card edge instead of a stray link. -.homepage-blog-heading { - display: flex; - align-items: baseline; - flex-wrap: wrap; - justify-content: space-between; - gap: 0 1.5rem; - - h3 { - width: auto; - } -} - -// `&:visited` is not redundant: the global `a:visited` is more specific than a -// bare class, so without it the link falls back to the blue link colour. -// Underlined rather than tinted to set it apart from the white heading: no tint -// distinct from white keeps 4.5:1 contrast where the gradient sits on mobile. -.homepage-blog-more { - &, - &:visited, - &:hover { - color: white; - } - - @include sans-serif; - font-size: 1.4rem; - font-weight: 700; - text-transform: uppercase; - text-decoration: underline; - white-space: nowrap; - - // inline-block keeps the underline off the chevron. - &:after { - content: '›'; - display: inline-block; - margin-left: 0.3em; - font-size: 1.2em; - } -} - -// Responsive adjustments for homepage blog cards -@media (max-width: 768px) { - .homepage-blog-card { - padding: 1.5rem 1.8rem; - } - - .homepage-blog-card-title { - font-size: 1.6rem; - } - - .homepage-blog-card-description { - font-size: 1.3rem; - } -} - -// Homepage Participant Carousel Styles -.homepage-participants-section { - background: linear-gradient(180deg, #6983FF 0%, #BCB5E7 100%); - padding: 8rem 0; - - .homepage-participants-container { - max-width: var(--max-width); - margin: 0 auto; - padding: 0 2rem; - } - - .homepage-participants-header { - text-align: center; - margin-bottom: 6rem; - } - - // Same scale as the "Learn more" h2 above it. - .homepage-participants-title { - color: $white; - font-size: 3.75rem; - font-weight: 700; - margin: 0 0 2rem 0; - letter-spacing: -1px; - - @include respond-min(768px) { - font-size: 6rem; - } - } - - .homepage-participants-description { - color: $white; - font-size: 1.8rem; - line-height: 1.6; - max-width: 80rem; - margin: 0 auto; - opacity: 0.95; - } - - .homepage-participants-error { - background: $white; - border-radius: 2rem; - padding: 4rem; - text-align: center; - - p { - color: $text-light; - font-size: 1.6rem; - margin: 0; - } - } - - .homepage-participants-carousel-container { - background: $white; - border-radius: 2rem; - position: relative; - overflow: hidden; - } - - .homepage-participants-carousel { - overflow: hidden; - position: relative; - - .homepage-participants-track { - display: flex; - transition: transform 0.5s ease-in-out; - width: 100%; - } - - .homepage-participant-card { - flex: 0 0 33.33%; - min-width: 0; - min-height: 100%; - border-radius: 1.2rem; - padding: 4rem; - transition: all 0.3s ease; - cursor: pointer; - - .homepage-participant-image-container { - display: flex; - align-items: center; - justify-content: center; - margin-bottom: 2rem; - } - - .homepage-participant-image { - object-fit: contain; - max-height: 40px; - margin-inline: auto; - } - - .homepage-participant-image-placeholder { - width: 6rem; - height: 6rem; - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - color: $white; - font-size: 2.4rem; - font-weight: 700; - text-transform: uppercase; - } - - .homepage-participant-name { - font-size: 2rem; - font-weight: 700; - color: $text; - text-align: center; - margin: 0 0 1.2rem 0; - line-height: 1.3; - } - - .homepage-participant-offering { - font-size: 1.4rem; - line-height: 1.5; - color: $text-light; - margin: 0; - text-align: center; - word-wrap: break-word; - overflow-wrap: break-word; - display: -webkit-box; - -webkit-line-clamp: 7; - -webkit-box-orient: vertical; - overflow: hidden; - - a { - color: $text-link-alternate; - text-decoration: none; - transition: color 0.2s ease; - - &:hover { - color: $text-link-alternate-lighter; - text-decoration: underline; - } - } - } - } - } - - .homepage-participants-navigation { - display: flex; - justify-content: center; - margin-top: 1.25rem; - - .homepage-participants-dots { - display: flex; - gap: 0.5rem; - align-items: center; - - .homepage-participant-dot { - width: 0.5rem; - height: 0.5rem; - border-radius: 50%; - border: none; - background: rgba($color: #000000, $alpha: 0.25); - cursor: pointer; - transition: all 0.2s ease; - padding: 0; - - &:hover, - &:focus { - background: #000; - transform: scale(1.1); - outline-offset: 2px; - } - - &[aria-current="true"], - &.active { - background: #000; - transform: scale(1.2); - } - } - } - } -} - -// Responsive design for homepage participant carousel -@media (max-width: 1200px) { - .homepage-participants-section { - .homepage-participants-carousel { - .homepage-participant-card { - flex: 0 0 50%; - } - } - } -} - -@media (max-width: 768px) { - .homepage-participants-section { - padding: 6rem 2rem; - - .homepage-participants-container { - padding: 0 1.5rem; - } - - .homepage-participants-description { - font-size: 1.6rem; - max-width: 100%; - } - - .homepage-participants-carousel { - .homepage-participant-card { - flex: 0 0 100%; - padding: 1.8rem; - - .homepage-participant-image-container { - margin-bottom: 1.5rem; - } - - .homepage-participant-name { - font-size: 1.8rem; - margin-bottom: 1rem; - } - - .homepage-participant-offering { - font-size: 1.3rem; - } - } - } - - .homepage-participants-navigation { - margin-top: 2rem; - - .homepage-participants-dots { - gap: 0.75rem; - - .homepage-participant-dot { - width: 0.75rem; - height: 0.75rem; - } - } - } - } -} - -@media (max-width: 480px) { - .homepage-participants-section { - .homepage-participants-carousel { - .homepage-participant-card { - padding: 1.5rem; - } - } - - .homepage-participants-title { - font-size: 3rem; - } - - .homepage-participants-description { - font-size: 1.5rem; - } - - .homepage-participants-navigation { - .homepage-participants-dots { - gap: 1rem; - - .homepage-participant-dot { - width: 1rem; - height: 1rem; - } - } - } - } -} - // Events Calendar .events-calendar { max-width: 800px; diff --git a/sass/css/styles.scss b/sass/css/styles.scss index 755f9691..2183a498 100755 --- a/sass/css/styles.scss +++ b/sass/css/styles.scss @@ -9,6 +9,7 @@ @import '../valkey'; @import '../email-form'; @import '../catalog'; +@import '../cards'; @import '../community'; /* Styling for Markdown Tables */ diff --git a/static/assets/js/carousel.js b/static/assets/js/carousel.js deleted file mode 100644 index 467cd9af..00000000 --- a/static/assets/js/carousel.js +++ /dev/null @@ -1,212 +0,0 @@ -/** - * Homepage Participant Carousel Module - * - * Features: - * - Auto-scrolling carousel with pause on hover - * - Responsive design (1/2/3 cards per slide based on screen size) - * - Keyboard navigation support - * - Intersection Observer for performance optimization - * - Accessibility features with ARIA labels - * - */ - -(function() { - 'use strict'; - - // Cache DOM elements to avoid repeated queries - let carousel, track, dots, cards; - let currentSlide = 0; - let autoScrollInterval = null; - let dotButtons = []; - let isVisible = true; - let resizeTimeout; - - /** - * Get number of cards per slide based on screen size - * @returns {number} Number of cards to show per slide - */ - function getCardsPerSlide() { - const width = window.innerWidth; - if (width <= 768) { - return 1; // Mobile: 1 card per slide - } else if (width <= 1200) { - return 2; // Tablet: 2 cards per slide - } else { - return 3; // Desktop: 3 cards per slide - } - } - - /** - * Update dots based on current screen size - */ - function updateDotsForScreenSize() { - const cardsPerSlide = getCardsPerSlide(); - const totalSlides = Math.ceil(cards.length / cardsPerSlide); - - // Clear existing dots - dots.innerHTML = ''; - - // Create new dots - for (let i = 0; i < totalSlides; i++) { - const dot = document.createElement('button'); - dot.className = 'homepage-participant-dot'; - dot.setAttribute('data-slide', i); - dot.setAttribute('aria-label', `Go to slide ${i + 1}`); - dot.setAttribute('aria-current', 'false'); - - dot.addEventListener('click', () => { - goToSlide(i); - }); - - dots.appendChild(dot); - } - - // Update reference to dot buttons - dotButtons = dots.querySelectorAll('.homepage-participant-dot'); - - // Ensure current slide is valid - if (currentSlide >= totalSlides) { - currentSlide = totalSlides - 1; - } - - updateDots(); - } - - /** - * Start auto-scroll functionality - */ - function startAutoScroll() { - if (dotButtons.length <= 1 || !isVisible) return; // Don't auto-scroll if only one slide or not visible - - autoScrollInterval = setInterval(() => { - currentSlide = (currentSlide + 1) % dotButtons.length; - updateCarousel(); - }, 5000); // 5 seconds - } - - /** - * Update carousel position - */ - function updateCarousel() { - const slideWidth = carousel.offsetWidth; - const translateX = -currentSlide * slideWidth; - track.style.transform = `translateX(${translateX}px)`; - updateDots(); - } - - /** - * Update dot states - */ - function updateDots() { - dotButtons.forEach((dot, index) => { - if (index === currentSlide) { - dot.setAttribute('aria-current', 'true'); - dot.classList.add('active'); - } else { - dot.setAttribute('aria-current', 'false'); - dot.classList.remove('active'); - } - }); - } - - /** - * Go to specific slide - * @param {number} slideIndex - Index of slide to navigate to - */ - function goToSlide(slideIndex) { - currentSlide = Math.max(0, Math.min(slideIndex, dotButtons.length - 1)); - updateCarousel(); - } - - /** - * Add keyboard support for participant cards - */ - function setupKeyboardSupport() { - cards.forEach(card => { - card.addEventListener('keydown', (e) => { - if (e.key === 'Enter' || e.key === ' ') { - e.preventDefault(); - card.click(); - } - }); - }); - } - - /** - * Setup event listeners - */ - function setupEventListeners() { - // Pause auto-scroll on hover - carousel.addEventListener('mouseenter', () => { - if (autoScrollInterval) { - clearInterval(autoScrollInterval); - autoScrollInterval = null; - } - }); - - carousel.addEventListener('mouseleave', () => { - startAutoScroll(); - }); - - // Handle window resize with debouncing - window.addEventListener('resize', () => { - clearTimeout(resizeTimeout); - resizeTimeout = setTimeout(() => { - updateDotsForScreenSize(); - updateCarousel(); - }, 250); - }); - - // Add Intersection Observer to pause carousel when not visible - if ('IntersectionObserver' in window) { - const observer = new IntersectionObserver((entries) => { - entries.forEach(entry => { - isVisible = entry.isIntersecting; - if (isVisible) { - startAutoScroll(); - } else if (autoScrollInterval) { - clearInterval(autoScrollInterval); - autoScrollInterval = null; - } - }); - }, { threshold: 0.1 }); - - observer.observe(carousel); - } - } - - /** - * Initialize the carousel - */ - function init() { - carousel = document.getElementById('homepageParticipantsCarousel'); - track = document.getElementById('homepageParticipantsTrack'); - dots = document.getElementById('homepageParticipantsDots'); - - if (!carousel || !track || !dots) { - console.warn('Participant carousel elements not found'); - return; - } - - cards = track.querySelectorAll('.homepage-participant-card'); - - if (cards.length === 0) { - console.warn('No participant cards found'); - return; - } - - // Setup carousel functionality - updateDotsForScreenSize(); - setupKeyboardSupport(); - setupEventListeners(); - startAutoScroll(); - } - - // Initialize when DOM is ready - if (document.readyState === 'loading') { - document.addEventListener('DOMContentLoaded', init); - } else { - init(); - } - -})(); diff --git a/static/assets/js/community.js b/static/assets/js/community.js index e3d8e4dd..735728d4 100644 --- a/static/assets/js/community.js +++ b/static/assets/js/community.js @@ -1,11 +1,12 @@ /** - * Community page interactions + * Interactions for /community/ and the homepage * * 1. Participant logo marquee pause/play toggle (WCAG 2.2.2: auto-moving - * content lasting more than 5s needs a control to pause it). - * 2. "Community in action" photo carousel: pages through photos three at a - * time on desktop, two on tablet, one on mobile. Prev/next buttons and a - * "current / total" status are the only controls; there is no auto-scroll. + * content lasting more than 5s needs a control to pause it). Both pages. + * 2. "Community in action" photo carousel, /community/ only: pages through + * photos three at a time on desktop, two on tablet, one on mobile. + * Prev/next buttons and a "current / total" status are the only controls; + * there is no auto-scroll. */ (function () { diff --git a/templates/community-home.html b/templates/community-home.html index cf0b8f33..e2ddb4f1 100644 --- a/templates/community-home.html +++ b/templates/community-home.html @@ -9,16 +9,7 @@ {% if participants and participants | length > 0 %}
-
- Valkey participants - -
-
-
- {{< logo_set participants={participants} />}} - {{< logo_set participants={participants} duplicate={true} />}} -
-
+ {{< logo_strip participants={participants} />}}
{% endif %} diff --git a/templates/includes/head.html b/templates/includes/head.html index 2bf49492..3555fa5a 100644 --- a/templates/includes/head.html +++ b/templates/includes/head.html @@ -60,9 +60,6 @@ - - - diff --git a/templates/includes/participant-carousel.html b/templates/includes/participant-carousel.html deleted file mode 100644 index 87a30a2c..00000000 --- a/templates/includes/participant-carousel.html +++ /dev/null @@ -1,61 +0,0 @@ -{% set participants = load_data(path="_data/participants.yml") %} - -
-
-
-

Participants

-

- The Valkey project participants are a diverse group of organizations that have come together to maintain and contribute to the project. Valkey participants are more than vendors, they are dedicated to continuously strengthening the long-term health and viability of this project so that everyone can benefit from it. Since its inception Valkey has enjoyed steady adoption demonstrating the industry's desire for an open, community-driven database solution. We look forward to seeing our list of participants grow as more companies work on our project. -

-
- - {% if participants and participants | length > 0 %} - - -
-
- {% set total_participants = participants | length %} - {% set total_slides = (total_participants / 3) | round(method="ceil") | int %} - {% if total_slides > 1 %} - {% for i in range(start=1, end=total_slides + 1) %} - - {% endfor %} - {% endif %} -
-
- {% else %} -
-

Unable to load participant information at this time. Please try again later.

-
- {% endif %} -
- -
diff --git a/templates/index.html b/templates/index.html index 46d578bb..137e543d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -16,135 +16,131 @@

{{ heading }}

{{ section.extra.hero.secondary_button_text }} {% endif %} + {% if section.extra.hero.command %} + {{< copy_code command={section.extra.hero.command} />}} + {% endif %} {% endif %} -
-
-
- {# The newest stable release on each major.minor line, newest line first. #} - {% set release_section = get_section(path="download/releases/_index.md") %} - {% set_global keyed_lines = [] %} - {% set_global seen_lines = [] %} - {% for candidate in release_section.pages | sort(attribute="date") | reverse %} - {% if candidate.extra.tag is not matching(pat=".*-.*") %} - {% set candidate_parts = candidate.extra.tag | split(pat=".") %} - {% set candidate_line = candidate_parts[:2] | join(sep=".") %} - {% if candidate_line not in seen_lines %} - {% set_global seen_lines = [...seen_lines, candidate_line] %} - {% set_global keyed_lines = [...keyed_lines, {"version": (candidate_parts[0] | int) * 1000 + (candidate_parts[1] | int), "release": candidate}] %} - {% endif %} - {% endif %} - {% endfor %} +{# Below the hero, every block is a white card on the light canvas /community/ + uses. The styles are in _cards.scss. #} +
+
+ {# The newest stable release on each major.minor line, newest line first. #} + {% set release_section = get_section(path="download/releases/_index.md") %} + {% set_global keyed_lines = [] %} + {% set_global seen_lines = [] %} + {% for candidate in release_section.pages | sort(attribute="date") | reverse %} + {% if candidate.extra.tag is not matching(pat=".*-.*") %} + {% set candidate_parts = candidate.extra.tag | split(pat=".") %} + {% set candidate_line = candidate_parts[:2] | join(sep=".") %} + {% if candidate_line not in seen_lines %} + {% set_global seen_lines = [...seen_lines, candidate_line] %} + {% set_global keyed_lines = [...keyed_lines, {"version": (candidate_parts[0] | int) * 1000 + (candidate_parts[1] | int), "release": candidate}] %} + {% endif %} + {% endif %} + {% endfor %} - {# Dates pick each line's newest patch but cannot order the lines: every - supported line usually ships a patch on the same day. #} - {% set_global release_lines = [] %} - {% for keyed in keyed_lines | sort(attribute="version") | reverse %} - {% set_global release_lines = [...release_lines, keyed.release] %} - {% endfor %} + {# Dates pick each line's newest patch but cannot order the lines: every + supported line usually ships a patch on the same day. #} + {% set_global release_lines = [] %} + {% for keyed in keyed_lines | sort(attribute="version") | reverse %} + {% set_global release_lines = [...release_lines, keyed.release] %} + {% endfor %} - {% set latest = release_lines | first %} - {% set latest_parts = latest.extra.tag | split(pat=".") %} - {% set latest_line = latest_parts[:2] | join(sep=".") %} + {% set latest = release_lines | first %} + {% set latest_parts = latest.extra.tag | split(pat=".") %} + {% set latest_line = latest_parts[:2] | join(sep=".") %} - {# Highlights and the line URL both come from the /download// page. - get_page fails the build if a release ships without its line page. #} - {% set latest_slug = latest_line | replace(from=".", to="-") %} - {% set latest_line_page = get_page(path="download/versions/" ~ latest_slug ~ ".md") %} + {# Highlights and the line URL both come from the /download// page. + get_page fails the build if a release ships without its line page. #} + {% set latest_slug = latest_line | replace(from=".", to="-") %} + {% set latest_line_page = get_page(path="download/versions/" ~ latest_slug ~ ".md") %} -

Latest release

-
-

- Valkey {{ latest.extra.tag }} - Released {{ latest.date | date(format="%B %-d, %Y") }} -

+
+
+

Latest release

+
+

+ Valkey {{ latest.extra.tag }} + Released {{ latest.date | date(format="%B %-d, %Y") }} +

-
{{ latest_line_page.content | safe }}
- {% if latest_line_page.extra.blog_url %} - {{ latest_line_page.extra.blog_text }} - {% endif %} -
+
{{ latest_line_page.content | safe }}
+ {% if latest_line_page.extra.blog_url %} + {{ latest_line_page.extra.blog_text }} + {% endif %} + -

Latest supported version of past releases

-
- - All releases -
+
+
+

Latest supported version of past releases

-
-
-

Latest Blog Posts

- All blog posts -
-
- {% set blog_post_section = get_section(path="blog/_index.md") %} - {% set blog_count = section.extra.latest_blog_posts %} - {% set blog_posts = blog_post_section.pages[:blog_count] %} - {% for post in blog_posts %} - {# The whole card is the link, so there is no separate call to action. - Featured images are 16:9 decoration; a thumbnail this narrow could only - show a crop of one, so the card is text instead. #} - -

{{ post.title }}

-

{{ post.date | date(format="%B %-d, %Y") }}

-

{{ post.description }}

-
- {% endfor %} -
+ + All releases +
- {% if section.extra and section.extra.sidebar %} - {% for sidebar_category in section.extra.sidebar %} -

{{sidebar_category.title}}

-
- - {% if sidebar_category.more %} - {{sidebar_category.more.title}} - {% endif %} -
- {% endfor %} - {% endif %} +
+
+

Latest blog posts

+ All blog posts
-
-
+
+ {% set blog_post_section = get_section(path="blog/_index.md") %} + {% set blog_count = section.extra.latest_blog_posts %} + {% set blog_posts = blog_post_section.pages[:blog_count] %} + {% for post in blog_posts %} + {# The whole row is the link, so there is no separate call to action. + Featured images are 16:9 decoration; a thumbnail this narrow could only + show a crop of one, so the row is text instead. #} + +

{{ post.title }}

+

{{ post.date | date(format="%B %-d, %Y") }}

+

{{ post.description }}

+
+ {% endfor %} +
+ -
-
-
+
+
{{ section.content | safe }}
-
-
{% if section.extra and section.extra.documentation_cards %} + {# The whole tile is the link, like the blog rows. #} +
{% for card in section.extra.documentation_cards %} -
-
-

{{ card.title }}

-

{{ card.description }}

- {{ card.button_text }} -
-
+ +

{{ card.title }}

+

{{ card.description }}

+
{% endfor %} +
{% endif %} -
+ + + {# Same order as the Participants page #} + {% set participants = load_data(path="_data/participants.yml") | sort(attribute="name") %} + {% if participants and participants | length > 0 %} +
+ {{< logo_strip participants={participants} />}} +
+ {% endif %} +
-{% include "includes/participant-carousel.html" %} + {%- endblock content -%} diff --git a/templates/macros/community.html b/templates/macros/community.html index 0ca5cf28..c1504143 100644 --- a/templates/macros/community.html +++ b/templates/macros/community.html @@ -1,5 +1,5 @@ {# - Participant logo strip helpers for the community page. + Participant logo strip helpers for the community page and the homepage. Logos come in very different shapes (square icons, tall lockups, long wordmarks). To give them similar visual weight, each logo is sized against @@ -44,3 +44,19 @@ {%- endfor -%}
{% endcomponent logo_set %} + +{# The whole strip: kicker, pause control, and the marquee. Each page supplies + its own wrapper. community.js finds the track and button by id, so a page + holds at most one strip. #} +{% component logo_strip(participants) -%} +
+ Valkey participants + +
+
+
+ {{< logo_set participants={participants} />}} + {{< logo_set participants={participants} duplicate={true} />}} +
+
+{%- endcomponent logo_strip %} diff --git a/templates/macros/release.html b/templates/macros/release.html index 9c1c6e72..85633017 100644 --- a/templates/macros/release.html +++ b/templates/macros/release.html @@ -1,3 +1,21 @@ +{# A command with a copy button. copy-code.js, loaded on every page, handles + the click. #} +{% component copy_code(command) -%} +
+
{{ command }}
+ + +
+{%- endcomponent copy_code %} + {% component release_info(date, release, notice=true) %} {# A tag with a suffix is a pre-release. The warning lives here so it reaches every page that offers the artifacts. Callers that have already warned in @@ -25,19 +43,7 @@

{{registry.name}} ({{registry.id}})

Example:

-
-
docker run --rm {{ registry.id }}:{{ registry.tags | first }}
- - -
+ {{< copy_code command={"docker run --rm " ~ registry.id ~ ":" ~ (registry.tags | first)} />}}
{% endfor %} {% if release.packages %} From 4a48971ae98365e1fe1f6820d10ce226c0fa04be Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Thu, 5 Nov 2026 16:05:32 -0800 Subject: [PATCH 02/14] Redesign /blog/ as a featured lead post and list, and put posts in /community/ cards Builds on #747. /blog/ drops its banner and opens on one big lead card for the newest featured post, then type pills and a single list card with a row per post: title, two-line description, author photos and names, type, and date. Post pages make the article and the sidebar two white cards and leave the article itself unchanged. The styles sit after #747's homepage section in `sass/_cards.scss`. Signed-off-by: Madelyn Olson --- CONTRIBUTING-BLOG-POST.md | 8 +- sass/_cards.scss | 432 +++++++++++++++++++++++++++++++++++-- sass/_colors.scss | 9 + sass/_valkey.scss | 155 +------------ templates/blog-aside.html | 15 -- templates/blog-single.html | 4 + templates/blog.html | 211 +++++++++++------- templates/macros/blog.html | 66 ++++++ 8 files changed, 635 insertions(+), 265 deletions(-) delete mode 100644 templates/blog-aside.html create mode 100644 templates/macros/blog.html diff --git a/CONTRIBUTING-BLOG-POST.md b/CONTRIBUTING-BLOG-POST.md index 8a8d1178..74528b60 100644 --- a/CONTRIBUTING-BLOG-POST.md +++ b/CONTRIBUTING-BLOG-POST.md @@ -156,9 +156,11 @@ authors= [ "maury", "jacobim" ] # Leave it out unless you are scheduling; see "Scheduling a post" below. draft = true [extra] - # 'featured' controls whether the blog post appears in the featured section on the main blog page - featured = true - # 'featured_image' sets the main image for the blog header + # 'featured' is for maintainers: `featured = true` makes a post the big + # lead card at the top of /blog/ (the newest featured post leads), so + # leave it out. + # 'featured_image' sets the main image for the blog header. When the post + # is the /blog/ lead, the image is cropped to 16:9 there. # Choose from one of the available images: # "/assets/media/featured/random-01.webp" # "/assets/media/featured/random-02.webp" diff --git a/sass/_cards.scss b/sass/_cards.scss index f0d02cf3..bf0589ef 100644 --- a/sass/_cards.scss +++ b/sass/_cards.scss @@ -1,7 +1,8 @@ // Cards: white cards on a light canvas, the design /community/ introduced. -// The homepage is built from it. The canvas (.community-home-canvas), section -// head and label (.community-home-section-head, .community-home-kicker), and -// the logo strip are /community/'s, in _community.scss. +// The homepage, /blog/ and blog posts are built from it. The canvas +// (.community-home-canvas), section head and label +// (.community-home-section-head, .community-home-kicker), and the logo strip +// are /community/'s, in _community.scss. // // Imported before _community.scss, which takes its palette and the card // surface from here. @@ -18,6 +19,19 @@ $community-ink: #072150; box-shadow: 0 10px 28px rgba(60, 60, 130, 0.08); } +// A card's section label: sentence case in #4a5ad8, the hero button blue, +// which is 5.6:1 on white where /community/'s #5b6fff kicker is 4.1:1. +// 2.4rem keeps it above the homepage's 2rem release headline. Balanced +// wrapping avoids leaving "releases" alone on a line. +@mixin card-label { + color: #4a5ad8; + font-size: 2.4rem; + font-weight: 600; + letter-spacing: normal; + text-transform: none; + text-wrap: balance; +} + // Homepage (templates/index.html) ------------------------------------------- // Every block below the hero is a card on .community-home-canvas. Two columns @@ -62,17 +76,9 @@ $community-ink: #072150; margin-bottom: 0; } - // Sentence-case section labels; /community/ keeps the uppercase kicker. - // #4a5ad8 is the hero button blue: 5.6:1 on white, where the kicker's - // #5b6fff is 4.1:1. 2.4rem keeps them above the 2rem release headline. - // Balanced wrapping avoids leaving "releases" alone on a line. + // /community/ keeps the uppercase kicker. .community-home-kicker { - color: #4a5ad8; - font-size: 2.4rem; - font-weight: 600; - letter-spacing: normal; - text-transform: none; - text-wrap: balance; + @include card-label; } .release-headline { @@ -222,3 +228,403 @@ $community-ink: #072150; line-height: 1.5; } } + +// Blog landing page (templates/blog.html, macros/blog.html) ------------------ + +// No banner: a big lead card for the newest featured post, then the type +// pills and one list card with a row per post. +.blog-landing { + display: grid; + gap: 4rem; + max-width: var(--max-width); + margin: 3.4rem auto 4.8rem; +} + +.blog-heading, +.blog-eyebrow { + @include card-label; + margin: 0; + line-height: 1.2; +} + +// A 16:9 frame for the lead image, or the banner gradient and Valkey mark +// when there is none. +.blog-media { + position: relative; + aspect-ratio: 16 / 9; + overflow: hidden; + background: linear-gradient(135deg, rgb(59, 42, 102), rgb(78, 81, 191)); + + img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; + } +} + +.blog-media-empty::after { + content: ''; + position: absolute; + inset: 0; + background: rgba(255, 255, 255, 0.9); + mask: url('/img/Valkey-logo.svg') center / auto 36% no-repeat; + -webkit-mask: url('/img/Valkey-logo.svg') center / auto 36% no-repeat; +} + +// Type label: a dot in the type's badge colour, then the name. +.blog-type { + display: inline-flex; + align-items: center; + gap: 0.6rem; + color: #47506b; + font-size: 1.3rem; + font-weight: 600; + line-height: 1.2; + + &::before { + content: ''; + flex: 0 0 auto; + width: 0.8rem; + height: 0.8rem; + border-radius: 50%; + background: $grey-dk-200; + } + + @each $type, $color in $blog-type-colors { + &[data-type="#{$type}"]::before { background: $color; } + } +} + +.blog-byline { + display: flex; + align-items: center; + gap: 1rem; + min-width: 0; + color: #606985; + font-size: 1.3rem; + line-height: 1.35; + + time { + display: block; + } +} + +.blog-avatars { + display: flex; + flex: 0 0 auto; + + &:empty { + display: none; + } + + img, + .blog-avatar-initials { + width: 2.8rem; + height: 2.8rem; + border: 2px solid #fff; + border-radius: 50%; + background: #e9ebf4; + } + + img { + object-fit: cover; + } + + > * + * { + margin-left: -0.9rem; + } +} + +.blog-avatar-initials { + display: inline-flex; + align-items: center; + justify-content: center; + color: $community-purple-800; + font-size: 1.05rem; + font-weight: 700; +} + +.blog-byline-names { + display: block; + color: $community-ink; + font-weight: 600; +} + +// Lead post: image beside the text once the card is wide enough. +.blog-lead { + @include card; + display: grid; + gap: 2rem; + padding: 1.4rem; + + @include respond-min(768px) { + grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); + align-items: center; + gap: 3.4rem; + padding: 1.8rem; + } + + .blog-media { + border-radius: 12px; + } + + .blog-avatars img, + .blog-avatars .blog-avatar-initials { + width: 3.4rem; + height: 3.4rem; + } + + &:hover .blog-lead-title { + text-decoration: underline; + } + + &:focus-visible { + outline: 2px solid $community-blue-500; + outline-offset: 3px; + } +} + +.blog-lead-body { + padding: 0 0.8rem 1rem; + + @include respond-min(768px) { + padding: 1rem 2.4rem 1rem 0; + } +} + +.blog-lead-kicker { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.6rem 1.6rem; + margin: 0; +} + +.blog-lead-title { + margin: 1.2rem 0 1.2rem; + color: $community-ink; + font-size: 2.6rem; + font-weight: 700; + line-height: 1.2; + letter-spacing: -0.01em; + + @include respond-min(1100px) { + font-size: 3.4rem; + } +} + +.blog-lead-description { + display: -webkit-box; + margin: 0 0 2.2rem; + overflow: hidden; + color: #47506b; + font-size: 1.7rem; + line-height: 1.55; + -webkit-line-clamp: 4; + -webkit-box-orient: vertical; +} + +// All posts: heading and type pills, then the list. +.blog-all-head { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 1.2rem 2rem; + margin-bottom: 1.6rem; +} + +.blog-filter { + display: flex; + flex-wrap: wrap; + gap: 0.8rem; + + &[hidden] { + display: none; + } + + button { + display: inline-flex; + align-items: center; + padding: 0.7rem 1.4rem; + border: 1px solid #d5daea; + border-radius: 999px; + background: #fff; + color: #47506b; + font: inherit; + font-size: 1.3rem; + font-weight: 700; + line-height: 1.2; + cursor: pointer; + transition: background 0.15s, border-color 0.15s, color 0.15s; + + &:hover { + border-color: $community-purple-800; + color: $community-purple-800; + } + + &:focus-visible { + outline: 2px solid $community-blue-500; + outline-offset: 2px; + } + + &[aria-pressed="true"] { + border-color: $community-purple-800; + background: $community-purple-800; + color: #fff; + } + } + + .blog-type { + color: inherit; + font-weight: inherit; + } +} + +// One white card; each row is a link, split from the next by the homepage's +// hairline. From 1100px the byline, type and date sit in columns, so they line +// up down the list. +.blog-list { + @include card; + margin: 0; + padding: 0.6rem 2rem; + list-style: none; + + @include respond-min(768px) { + padding: 0.8rem 3.4rem; + } + + // Every shown row but the first; the filter hides rows, the lead among them. + li:not([hidden]) ~ li:not([hidden]) { + border-top: 1px solid #e9ebf4; + } +} + +.blog-row { + display: grid; + grid-template-columns: auto minmax(0, 1fr); + grid-template-areas: + "type date" + "text text" + "byline byline"; + align-items: center; + gap: 0.8rem 1.4rem; + padding: 1.8rem 0; + + @include respond-min(1100px) { + grid-template-columns: minmax(0, 1fr) 24rem 17rem 10rem; + grid-template-areas: "text byline type date"; + gap: 2.4rem; + padding: 2rem 0; + } + + &:hover .blog-row-title { + text-decoration: underline; + } + + &:focus-visible { + outline: 2px solid $community-blue-500; + outline-offset: 2px; + } + + .blog-byline { + grid-area: byline; + } +} + +.blog-row-text { + grid-area: text; + min-width: 0; +} + +.blog-row-title { + margin: 0; + color: $community-ink; + font-size: 1.7rem; + font-weight: 700; + line-height: 1.35; +} + +.blog-row-description { + display: -webkit-box; + margin: 0.4rem 0 0; + overflow: hidden; + color: #47506b; + font-size: 1.4rem; + line-height: 1.5; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.blog-row-type { + grid-area: type; +} + +.blog-row-date { + grid-area: date; + color: #606985; + font-size: 1.3rem; + font-variant-numeric: tabular-nums; + white-space: nowrap; + + @include respond-min(1100px) { + text-align: right; + } +} + +.blog-no-results { + margin: 0; + color: #606985; + font-size: 1.5rem; +} + +// The live count under the list, and the point that loads the next batch +// as it nears the viewport. +.blog-status { + margin: 2.4rem 0 0; + color: #606985; + font-size: 1.3rem; + text-align: center; +} + +.blog-sentinel { + height: 1px; +} + +// Blog posts (templates/blog-single.html) ------------------------------------ + +// The article and the sidebar are white cards on .community-home-canvas. +// The article's type rules are in _valkey.scss. +.blog-single { + display: grid; + grid-template-columns: minmax(0, 1fr); + gap: 2rem; + max-width: var(--max-width); + margin: 3.4rem auto; + + @include respond-min(1024px) { + grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); + align-items: start; + } + + // "About the authors". + .blog-authors h2 { + @include card-label; + margin: 0; + line-height: 1.2; + } + + // The article and the sidebar are the cards. width: auto drops the + // generic .body main/aside column widths. + > main, + > aside { + @include card; + width: auto; + padding: 2.2rem 2rem; + + @include respond-min(768px) { + padding: 2.7rem 3.4rem; + } + } +} diff --git a/sass/_colors.scss b/sass/_colors.scss index 89985b69..25309188 100755 --- a/sass/_colors.scss +++ b/sass/_colors.scss @@ -103,6 +103,15 @@ $text-link-alternate: #0053b8; //pacific blue $text-link-alternate-lighter: #137cc1; //pacific blue tint 1 $text-link-alternate-darker: #00529e; +// Each blog type's colour: the badge on posts and the dot on /blog/. +$blog-type-colors: ( + "Technical Deep Dive": #6983ff, + "Community Highlight": $green-200, + "How-to": $purple-200, + "Announcements": $yellow-100, + "Events": $red-100 +); + @mixin respond-min($width) { @media screen and (min-width: $width) { @content; diff --git a/sass/_valkey.scss b/sass/_valkey.scss index 5a26cd2f..81d1249e 100644 --- a/sass/_valkey.scss +++ b/sass/_valkey.scss @@ -1095,20 +1095,6 @@ aside { } } -.blog-type-filters { - margin-bottom: 1.5rem; - - select { - padding: 0.4rem 1rem; - border-radius: 8px; - border: 1px solid $grey-lt-300; - background: $white; - color: $text; - font-size: 1.3rem; - cursor: pointer; - } -} - .sr-only { position: absolute; width: 1px; @@ -1129,106 +1115,8 @@ aside { color: $white; background-color: $grey-dk-200; - &[data-type="Technical Deep Dive"] { background-color: #6983ff; } - &[data-type="Community Highlight"] { background-color: $green-200; } - &[data-type="How-to"] { background-color: $purple-200; } - &[data-type="Announcements"] { background-color: $yellow-100; } - &[data-type="Events"] { background-color: $red-100; } -} - -.blog-inner { - - .blog-list { - list-style: none; - margin: 0; - padding: 0; - - li { - background: #fff; - padding: 20px; - margin-bottom: 20px; - - h2 a { - color: #30176e; - margin: 0; - } - - a.link-readmore { - color: #747bff ; - } - - .meta { - margin-top: 2px; - } - } - } -} - -.blog-featured { - h2 { - color: #30176e; - margin-bottom: 1rem; - font-size: 120%; - } - - &-card { - display: flex; - background: #fff; - border-radius: 10px; - margin-bottom: 2rem; - - img { - max-width: 50%; - height: auto; - object-fit: cover; - border-top-left-radius: 10px; - border-bottom-left-radius: 10px; - } - - .info { - flex: 1 1 50%; - width: 50%; - padding: 1.25rem; - - h4 { - margin: 0 0 1.25rem; - -webkit-box-orient: vertical; - overflow: hidden; - - a { - color: #000; - } - } - - p { - margin: 0 0 1.25rem; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; - } - - .read-more { - - } - } - .read-more { - display: inline-flex; - align-items: center; - justify-content: center; - position: relative; - line-height: 1.2; - font-weight: 600; - font-size: 14px; - padding: 12px 24px; - border: 1px solid #e2e8f0; - border-radius: 50px; - color: #2d3748; - align-self: flex-end; - margin-left: auto; - transition: all 0.2s; - } - + @each $type, $color in $blog-type-colors { + &[data-type="#{$type}"] { background-color: $color; } } } @@ -1277,15 +1165,6 @@ aside { } .blog-single { - display: flex; - flex-wrap: wrap; - width: 100%; - background-color: #e2e8f0; - display: flex; - max-width: var(--max-width); - margin-left: auto; - margin-right: auto; - h2 { font-size: 1.5rem; margin: 0 0 0.25rem 0; @@ -1294,21 +1173,7 @@ aside { text-transform: uppercase; } - main { - flex: 1; - padding: 2rem; - width: 100%; - - @include respond-min(1024px) { - width: 67%; - } - } - .main-inner { - width: 100%; - background-color: #fff; - padding: 1rem 2rem 2rem; - .feature-img { object-fit: cover; width: 100%; @@ -1353,22 +1218,6 @@ aside { margin-bottom: 2rem; } } - - aside { - background-color: #f1f0fa; - padding: 2rem; - width: 100%; - - @include respond-min(768px) { - max-width: 33%; - } - } -} - -.blog-authors { - h2 { - color: #553c9a; - } } .author-container { diff --git a/templates/blog-aside.html b/templates/blog-aside.html deleted file mode 100644 index e1dc1978..00000000 --- a/templates/blog-aside.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "default.html" %} - -{% block content %} -{% block subhead_content %}{% endblock subhead_content %} -
-
-
- {% block main_content %}{% endblock main_content %} -
-
- -
-{% endblock content %} \ No newline at end of file diff --git a/templates/blog-single.html b/templates/blog-single.html index e968aed5..225dc271 100644 --- a/templates/blog-single.html +++ b/templates/blog-single.html @@ -2,6 +2,9 @@ {% block content %} {% block subhead_content %}{% endblock subhead_content %} +{# The article and the sidebar are white cards on the /community/ canvas. + The layout is in the blog section of _cards.scss. #} +
@@ -12,4 +15,5 @@ {% block related_content %}{% endblock related_content %}
+
{% endblock content %} \ No newline at end of file diff --git a/templates/blog.html b/templates/blog.html index bf567fb9..15dc9f93 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -1,91 +1,140 @@ -{% extends "blog-aside.html" %} +{% extends "default.html" %} -{% block subhead_content %} -
-

{{ section.title }}

-

{{ section.description }}

-
-{% endblock subhead_content %} +{% block content %} +{# No banner or visible title: the page opens on the /community/ canvas with + a big lead card, then the type pills and every post as a row in one list + card. The heading stays for screen readers, and the section description is + still the page's meta description. The styles are in the blog section of + _cards.scss, the pieces in macros/blog.html. #} +

{{ section.title }}

+
+
+ {# The lead is the newest post with extra.featured, or the newest post if + none is featured. #} + {% set featured = [p for p in section.pages if p.extra?.featured == true] %} + {% if featured %}{% set lead = featured | first %}{% else %}{% set lead = section.pages | first %}{% endif %} + {% set lead_types = lead.taxonomies.blog_type | default(value=[]) %} + + {{< blog_media post={lead} width={1200} height={675} />}} +
+

+ {% if featured %}Featured{% else %}Latest{% endif %} + {% if lead_types %}{{< blog_type name={lead_types | first} />}}{% endif %} +

+

{{ lead.title | safe }}

+

{{ lead.description | safe }}

+ {{< blog_byline post={lead} />}} +
+
-{% block main_content %} - {% set taxonomy = get_taxonomy(kind="blog_type", required=false) %} - {% if taxonomy %} - - {% endif %} -
    - {% for page in section.pages %} - {% set blog_type = page.taxonomies.blog_type | default(value=[]) %} - {% set type_name = blog_type | first | default(value="") %} - - {% if type_name %} - {{ type_name }} +
    +
    +

    All posts

    + {% set taxonomy = get_taxonomy(kind="blog_type", required=false) %} + {% if taxonomy %} + {# The script below shows the pills; without it every post is listed. #} + {% endif %} -

    {{ page.title | safe}}

    -
    {{ page.date | date(format="%A %B %e, %Y") }}
    -

    {{ page.description | safe }}

    - - {% endfor %} -
- - -{% endblock main_content %} - -{% block related_content %} - -{% endblock related_content %} + } + render(); +}); + +{% endblock content %} diff --git a/templates/macros/blog.html b/templates/macros/blog.html new file mode 100644 index 00000000..48241019 --- /dev/null +++ b/templates/macros/blog.html @@ -0,0 +1,66 @@ +{# + Pieces of the /blog/ landing page (templates/blog.html). + + The lead image is the post's extra.featured_image, cut to 16:9 at build + time so the page does not download a full-size hero (some are several MB). + SVGs are used as they are. A post without an image gets the banner gradient + with the Valkey mark. +#} + +{% component blog_media(post, width, height) %} + {%- set src = post.extra.featured_image | default(value="") -%} + {%- if src and not ".svg" in src -%} + {#- Colocated images are linked by URL (/blog//...) but live in the + page's dated content folder. -#} + {%- if post.path in src -%} + {%- set file = "content/" ~ post.colocated_path ~ (src | replace(from=post.path, to="")) -%} + {%- else -%} + {%- set file = "static" ~ src -%} + {%- endif -%} + {%- if get_image_metadata(path=file, allow_missing=true) -%} + {%- set image = resize_image(path=file, width=width, height=height, op="fill", format="webp", quality=80) -%} + {%- set src = image.url -%} + {%- endif -%} + {%- endif -%} +
+ {%- if src -%} + + {%- endif -%} +
+{% endcomponent blog_media %} + +{# Author photos and names, and the date unless the row shows it elsewhere. + Photos come from the author page's extra.photo, as in author_panel.html; + an author without one gets their initials. The photos repeat the names, so + they are hidden from assistive tech. #} +{% component blog_byline(post, date=true) %} + +{% endcomponent blog_byline %} + +{# The type, with a dot in the type's badge colour. #} +{% component blog_type(name) %}{{ name }}{% endcomponent blog_type %} From e9fbcbc73663eb3384475af05380f4c63fc0c2a5 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Thu, 5 Nov 2026 16:27:11 -0800 Subject: [PATCH 03/14] Give the cards an edge and a darker canvas, and tighten the hero The white cards sat on a #f8faff canvas with an 8% shadow, so their edges barely read, and in forced-colors mode, which drops the shadow and fills, they had none at all. The card mixin now draws a 1px #d5d9e8 border and a 16% shadow, and the canvas is #e8ebf5. This applies to the /community/ Connect card too. The hero drops the min(65vh, 68rem) floor and its 8rem/10rem padding for 3.5rem at every width. At 1400x1000 it goes from 650px to 479px, and at 390x844 from 745px to 655px. The overlay, the photo and its 65% phone position are unchanged. Signed-off-by: Madelyn Olson --- sass/_cards.scss | 6 ++++-- sass/_community.scss | 2 +- sass/_valkey.scss | 8 +------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/sass/_cards.scss b/sass/_cards.scss index f0d02cf3..d86f5805 100644 --- a/sass/_cards.scss +++ b/sass/_cards.scss @@ -11,11 +11,13 @@ $community-purple-800: #35247e; $community-blue-500: #5b6fff; $community-ink: #072150; -// The white card: /community/'s Connect card and every card below. +// The white card: /community/'s Connect card and every card below. The +// border also draws the edge in forced-colors mode, which drops the shadow. @mixin card { + border: 1px solid #d5d9e8; background: #fff; border-radius: 18px; - box-shadow: 0 10px 28px rgba(60, 60, 130, 0.08); + box-shadow: 0 12px 32px rgba(60, 60, 130, 0.16); } // Homepage (templates/index.html) ------------------------------------------- diff --git a/sass/_community.scss b/sass/_community.scss index c70b09ed..adec2ad1 100644 --- a/sass/_community.scss +++ b/sass/_community.scss @@ -234,7 +234,7 @@ a.community-home-kicker:hover { // gutter is the single, page-wide rule so everything lines up with the // header/footer content column (--max-width). padding: 0.1px 2rem; - background: #f8faff; + background: #e8ebf5; } // Connect with us ----------------------------------------------------------- diff --git a/sass/_valkey.scss b/sass/_valkey.scss index 5a26cd2f..53024158 100644 --- a/sass/_valkey.scss +++ b/sass/_valkey.scss @@ -1741,7 +1741,6 @@ html.banner-hidden .banner { // Hero Section Styles .hero-section { position: relative; - min-height: min(65vh, 68rem); background-size: cover; // Only the photo layer moves; the gradients fill the box either way. background-position: center, center, 65% center; @@ -1755,7 +1754,7 @@ html.banner-hidden .banner { align-items: center; justify-content: center; overflow: hidden; - padding: 8rem 2rem; + padding: 3.5rem 2rem; &::after { content: ""; @@ -1763,11 +1762,6 @@ html.banner-hidden .banner { background-image: linear-gradient(to bottom, rgba(48, 24, 110, 0), rgba(48, 24, 110, 100)); pointer-events: none; } - - @include respond-min(768px) { - padding: 10rem 2rem; - - } } .hero-content { From 9fff5213194dabbdc177fa4be2ca2ec8d2defad5 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Thu, 5 Nov 2026 18:09:01 -0800 Subject: [PATCH 04/14] Name the homepage release card after its line and drop its date The card's label was "Latest release" and its headline repeated the release date. The label is now "Everything new in Valkey ", with the major.minor line taken from the release the card already picks (today "Everything new in Valkey 9.1"), and the date is gone. The .release-headline small rule styled only that date. Signed-off-by: Madelyn Olson --- sass/_valkey.scss | 6 ------ templates/index.html | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/sass/_valkey.scss b/sass/_valkey.scss index 53024158..9172d210 100644 --- a/sass/_valkey.scss +++ b/sass/_valkey.scss @@ -1894,12 +1894,6 @@ html.banner-hidden .banner { gap: 1rem; font-size: 2rem; font-weight: 700; - - small { - font-size: 1.3rem; - font-weight: 400; - color: #4a5568; - } } .release-highlights { diff --git a/templates/index.html b/templates/index.html index 137e543d..6d0e161f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -60,11 +60,10 @@

{{ heading }}

-

Latest release

+

Everything new in Valkey {{ latest_line }}

Valkey {{ latest.extra.tag }} - Released {{ latest.date | date(format="%B %-d, %Y") }}

{{ latest_line_page.content | safe }}
From e8e24c13b9979ba11ee5f1a0470305830dce4d93 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Thu, 5 Nov 2026 18:13:08 -0800 Subject: [PATCH 05/14] Drop the visible "Featured" and "All posts" labels from /blog/ The lead card now opens on its type, and the pills sit above the list on their own, starting at the list's left edge. "All posts" stays as a visually hidden h2, so the outline is still h1 Blog, h2 lead title, h2 All posts, h3 per row, and the section keeps its name. The pill row's wrapper and the .blog-heading/.blog-eyebrow rule go; the pills carry the bottom margin, so the no-JS page, where they are hidden, has no empty gap. Signed-off-by: Madelyn Olson --- sass/_cards.scss | 22 ++-------------------- templates/blog.html | 33 +++++++++++++++------------------ 2 files changed, 17 insertions(+), 38 deletions(-) diff --git a/sass/_cards.scss b/sass/_cards.scss index 0f2a840a..2139106b 100644 --- a/sass/_cards.scss +++ b/sass/_cards.scss @@ -242,13 +242,6 @@ $community-ink: #072150; margin: 3.4rem auto 4.8rem; } -.blog-heading, -.blog-eyebrow { - @include card-label; - margin: 0; - line-height: 1.2; -} - // A 16:9 frame for the lead image, or the banner gradient and Valkey mark // when there is none. .blog-media { @@ -397,9 +390,6 @@ $community-ink: #072150; .blog-lead-kicker { display: flex; - flex-wrap: wrap; - align-items: center; - gap: 0.6rem 1.6rem; margin: 0; } @@ -427,20 +417,12 @@ $community-ink: #072150; -webkit-box-orient: vertical; } -// All posts: heading and type pills, then the list. -.blog-all-head { - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: space-between; - gap: 1.2rem 2rem; - margin-bottom: 1.6rem; -} - +// The type pills above the list. .blog-filter { display: flex; flex-wrap: wrap; gap: 0.8rem; + margin-bottom: 1.6rem; &[hidden] { display: none; diff --git a/templates/blog.html b/templates/blog.html index 15dc9f93..4536f4ee 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -3,8 +3,8 @@ {% block content %} {# No banner or visible title: the page opens on the /community/ canvas with a big lead card, then the type pills and every post as a row in one list - card. The heading stays for screen readers, and the section description is - still the page's meta description. The styles are in the blog section of + card. The "Blog" and "All posts" headings stay for screen readers, and the + section description is still the page's meta description. The styles are in the blog section of _cards.scss, the pieces in macros/blog.html. #}

{{ section.title }}

@@ -17,10 +17,9 @@

{{ section.title }}

{{< blog_media post={lead} width={1200} height={675} />}}
-

- {% if featured %}Featured{% else %}Latest{% endif %} - {% if lead_types %}{{< blog_type name={lead_types | first} />}}{% endif %} -

+ {% if lead_types %} +

{{< blog_type name={lead_types | first} />}}

+ {% endif %}

{{ lead.title | safe }}

{{ lead.description | safe }}

{{< blog_byline post={lead} />}} @@ -28,19 +27,17 @@

{{ lead.title | safe }}

-
-

All posts

- {% set taxonomy = get_taxonomy(kind="blog_type", required=false) %} - {% if taxonomy %} - {# The script below shows the pills; without it every post is listed. #} - - {% endif %} +

All posts

+ {% set taxonomy = get_taxonomy(kind="blog_type", required=false) %} + {% if taxonomy %} + {# The script below shows the pills; without it every post is listed. #} + + {% endif %} {# The lead post is listed too, at its date. If it is also the newest post, the script leaves it out of the unfiltered list, where it would be the From 08116f2ea3fd5c55e7ca7d0df0a1bda97c2515ba Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Thu, 5 Nov 2026 18:22:15 -0800 Subject: [PATCH 06/14] Make the release card label a link, without the version The label is now "Everything new in Valkey", without the line number, and links to the latest line's page (/download/9.1/ today), the same target as the "Valkey 9.1.3" headline. The link takes the label's colour, turns #35247e on hover and gets the default focus ring, like the "Valkey participants" label. Signed-off-by: Madelyn Olson --- sass/_cards.scss | 10 ++++++++++ templates/index.html | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sass/_cards.scss b/sass/_cards.scss index d86f5805..76eea4b4 100644 --- a/sass/_cards.scss +++ b/sass/_cards.scss @@ -75,6 +75,16 @@ $community-ink: #072150; letter-spacing: normal; text-transform: none; text-wrap: balance; + + // The release card's label is a heading around a link; it looks like + // the "Valkey participants" link label. + a { + color: inherit; + + &:hover { + color: $community-purple-800; + } + } } .release-headline { diff --git a/templates/index.html b/templates/index.html index 6d0e161f..1dc90254 100644 --- a/templates/index.html +++ b/templates/index.html @@ -60,7 +60,7 @@

{{ heading }}

-

Everything new in Valkey {{ latest_line }}

+

Everything new in Valkey

Valkey {{ latest.extra.tag }} From ad9bd2ddd0e059dfa00501f62d553e9f1268403d Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Thu, 5 Nov 2026 19:05:40 -0800 Subject: [PATCH 07/14] Put the line back in the release label and drop the headline The label reads "Everything new in Valkey " again, from the same latest_line that picks latest_line_page, and still links to that line's page. The "Valkey 9.1.3" headline under it goes, with the two .release-headline rules that only styled it, so the card is the label, the highlights and the "What's new" link. Signed-off-by: Madelyn Olson --- sass/_cards.scss | 17 +++-------------- sass/_valkey.scss | 9 --------- templates/index.html | 5 +---- 3 files changed, 4 insertions(+), 27 deletions(-) diff --git a/sass/_cards.scss b/sass/_cards.scss index 76eea4b4..2fde9909 100644 --- a/sass/_cards.scss +++ b/sass/_cards.scss @@ -66,8 +66,9 @@ $community-ink: #072150; // Sentence-case section labels; /community/ keeps the uppercase kicker. // #4a5ad8 is the hero button blue: 5.6:1 on white, where the kicker's - // #5b6fff is 4.1:1. 2.4rem keeps them above the 2rem release headline. - // Balanced wrapping avoids leaving "releases" alone on a line. + // #5b6fff is 4.1:1. 2.4rem keeps them above the cards' titles, the largest + // of which is 1.8rem. Balanced wrapping avoids leaving "releases" alone on + // a line. .community-home-kicker { color: #4a5ad8; font-size: 2.4rem; @@ -87,18 +88,6 @@ $community-ink: #072150; } } - .release-headline { - margin: 0 0 1rem; - - a { - color: $community-ink; - - &:hover { - text-decoration: underline; - } - } - } - .link-readmore { text-transform: none; font-size: 1.4rem; diff --git a/sass/_valkey.scss b/sass/_valkey.scss index 9172d210..bce37fc1 100644 --- a/sass/_valkey.scss +++ b/sass/_valkey.scss @@ -1887,15 +1887,6 @@ html.banner-hidden .banner { } } -.release-headline { - display: flex; - flex-wrap: wrap; - align-items: baseline; - gap: 1rem; - font-size: 2rem; - font-weight: 700; -} - .release-highlights { ul { margin: 0 0 1rem; diff --git a/templates/index.html b/templates/index.html index 1dc90254..93388f2f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -60,11 +60,8 @@

{{ heading }}

-

- Valkey {{ latest.extra.tag }} -

{{ latest_line_page.content | safe }}
{% if latest_line_page.extra.blog_url %} From 67481d8d6baa063eed6e0455b5cb89bc12f95614 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Mon, 16 Nov 2026 17:11:22 -0800 Subject: [PATCH 08/14] Name the card colours and take the label class out of the content The card palette, including the colours _cards.scss used as raw hex, is now named once in _colors.scss. The compiled colours are unchanged. Learn more's heading in content/_index.md no longer carries a class; it takes the label style from its position in .homepage-learn-intro. The three list initialisers at the top of index.html are plain set; only the loops that add to them need set_global. Signed-off-by: Madelyn Olson --- content/_index.md | 2 +- sass/_cards.scss | 34 +++++++++++++++++----------------- sass/_colors.scss | 14 ++++++++++++++ sass/_community.scss | 12 +++++++----- templates/index.html | 10 ++++++---- 5 files changed, 45 insertions(+), 27 deletions(-) diff --git a/content/_index.md b/content/_index.md index fafc9cc9..36eaf8c5 100644 --- a/content/_index.md +++ b/content/_index.md @@ -53,7 +53,7 @@ title= "Read the docs" +++ -## Learn more {.community-home-kicker} +## Learn more Valkey can run as either a standalone daemon or in a cluster, with options for replication and high availability. Valkey natively supports a rich collection of datatypes, including strings, numbers, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs and more. You can operate on data structures in-place with an expressive collection of commands. diff --git a/sass/_cards.scss b/sass/_cards.scss index 2fde9909..81d6c05e 100644 --- a/sass/_cards.scss +++ b/sass/_cards.scss @@ -3,18 +3,13 @@ // head and label (.community-home-section-head, .community-home-kicker), and // the logo strip are /community/'s, in _community.scss. // -// Imported before _community.scss, which takes its palette and the card -// surface from here. - -$community-purple-900: #2d2471; -$community-purple-800: #35247e; -$community-blue-500: #5b6fff; -$community-ink: #072150; +// Imported before _community.scss, which takes the card surface from here. +// Both take their colours from the card palette in _colors.scss. // The white card: /community/'s Connect card and every card below. The // border also draws the edge in forced-colors mode, which drops the shadow. @mixin card { - border: 1px solid #d5d9e8; + border: 1px solid $community-card-border; background: #fff; border-radius: 18px; box-shadow: 0 12px 32px rgba(60, 60, 130, 0.16); @@ -70,7 +65,7 @@ $community-ink: #072150; // of which is 1.8rem. Balanced wrapping avoids leaving "releases" alone on // a line. .community-home-kicker { - color: #4a5ad8; + color: $community-label-blue; font-size: 2.4rem; font-weight: 600; letter-spacing: normal; @@ -110,7 +105,7 @@ $community-ink: #072150; .homepage-blog-card { display: block; padding: 1.4rem 0; - border-top: 1px solid #e9ebf4; + border-top: 1px solid $community-hairline; &:first-child { padding-top: 0; @@ -136,7 +131,7 @@ $community-ink: #072150; .homepage-blog-card-meta { margin: 0 0 0.5rem; - color: #606985; + color: $community-text-muted; font-size: 1.3rem; } @@ -144,14 +139,15 @@ $community-ink: #072150; display: -webkit-box; margin: 0; overflow: hidden; - color: #47506b; + color: $community-text; font-size: 1.4rem; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } -// The kicker is the markdown heading in content/_index.md. Flex keeps the +// The kicker is the markdown heading in content/_index.md. It takes the +// label style by position, so the content needs no class. Flex keeps the // inline-block kicker off the parent's line box, which would push it below // the kickers in the other cards. .homepage-learn-intro { @@ -159,9 +155,13 @@ $community-ink: #072150; flex-direction: column; align-items: flex-start; + > h2 { + @extend .community-home-kicker; + } + p { margin: 1.2rem 0 0; - color: #47506b; + color: $community-text; font-size: 1.6rem; line-height: 1.6; } @@ -185,11 +185,11 @@ $community-ink: #072150; display: block; padding: 1.8rem 2rem; border-radius: 14px; - background: #f8faff; + background: $community-tint; transition: background 0.15s; &:hover { - background: #eef1fb; + background: $community-tint-hover; h3 { text-decoration: underline; @@ -218,7 +218,7 @@ $community-ink: #072150; p { margin: 0; - color: #47506b; + color: $community-text; font-size: 1.5rem; line-height: 1.5; } diff --git a/sass/_colors.scss b/sass/_colors.scss index 89985b69..85dd1c8a 100755 --- a/sass/_colors.scss +++ b/sass/_colors.scss @@ -103,6 +103,20 @@ $text-link-alternate: #0053b8; //pacific blue $text-link-alternate-lighter: #137cc1; //pacific blue tint 1 $text-link-alternate-darker: #00529e; +// Card pages: /community/ and the homepage (_cards.scss, _community.scss). +$community-purple-900: #2d2471; +$community-purple-800: #35247e; +$community-blue-500: #5b6fff; +$community-ink: #072150; +$community-label-blue: #4a5ad8; // the hero button blue, 5.6:1 on white +$community-text: #47506b; +$community-text-muted: #606985; +$community-card-border: #d5d9e8; +$community-hairline: #e9ebf4; +$community-tint: #f8faff; +$community-tint-hover: #eef1fb; +$community-canvas: #e8ebf5; + @mixin respond-min($width) { @media screen and (min-width: $width) { @content; diff --git a/sass/_community.scss b/sass/_community.scss index adec2ad1..7afdc92e 100644 --- a/sass/_community.scss +++ b/sass/_community.scss @@ -1,8 +1,9 @@ // Community landing page (templates/community-home.html): participant logo // strip, photo hero, connect bar, and photo carousel. The "Ways to // contribute" tiles reuse the shared .community-card styles from -// _valkey.scss. The palette and the card surface come from _cards.scss, -// whose pages reuse the canvas, section head, kicker and logo strip below. +// _valkey.scss. The palette is in _colors.scss and the card surface in +// _cards.scss, whose pages reuse the canvas, section head, kicker and logo +// strip below. // Shared pieces -------------------------------------------------------------- @@ -227,14 +228,15 @@ a.community-home-kicker:hover { } } -// Connect with us and photo carousel sit on a faint blue canvas so the white -// Connect card and its shadow read against the page. +// Connect with us and photo carousel sit on a light blue canvas so the white +// Connect card and its shadow read against the page. The other card pages +// use the same canvas, so a change here changes them too. .community-home-canvas { // 0.1px top/bottom keeps child margins inside the tinted area; the side // gutter is the single, page-wide rule so everything lines up with the // header/footer content column (--max-width). padding: 0.1px 2rem; - background: #e8ebf5; + background: $community-canvas; } // Connect with us ----------------------------------------------------------- diff --git a/templates/index.html b/templates/index.html index 93388f2f..3f6c1fde 100644 --- a/templates/index.html +++ b/templates/index.html @@ -27,10 +27,12 @@

{{ heading }}

uses. The styles are in _cards.scss. #}
- {# The newest stable release on each major.minor line, newest line first. #} + {# The newest stable release on each major.minor line, newest line first. + A plain set inside a for loop is dropped when the loop ends, so the + loops add to these lists with set_global. #} {% set release_section = get_section(path="download/releases/_index.md") %} - {% set_global keyed_lines = [] %} - {% set_global seen_lines = [] %} + {% set keyed_lines = [] %} + {% set seen_lines = [] %} {% for candidate in release_section.pages | sort(attribute="date") | reverse %} {% if candidate.extra.tag is not matching(pat=".*-.*") %} {% set candidate_parts = candidate.extra.tag | split(pat=".") %} @@ -44,7 +46,7 @@

{{ heading }}

{# Dates pick each line's newest patch but cannot order the lines: every supported line usually ships a patch on the same day. #} - {% set_global release_lines = [] %} + {% set release_lines = [] %} {% for keyed in keyed_lines | sort(attribute="version") | reverse %} {% set_global release_lines = [...release_lines, keyed.release] %} {% endfor %} From 168293c25c8f02ea2cd76756a01a0fe138d954f8 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Mon, 16 Nov 2026 17:14:04 -0800 Subject: [PATCH 09/14] List every post at once and filter before the first paint The list no longer loads in batches of twenty; it is 75 text rows and the avatars are already lazy, so the IntersectionObserver, the sentinel and the "Showing N of M" status are gone. The filter script now runs right after the list instead of on DOMContentLoaded, so the pills appear and a #How-to hash is applied before the page first paints, and the list does not jump. The Technical Deep Dive colour is named $valkey-periwinkle, and the blog styles use the named card colours. Signed-off-by: Madelyn Olson --- sass/_cards.scss | 31 ++++-------- sass/_colors.scss | 5 +- templates/blog.html | 116 +++++++++++++++++--------------------------- 3 files changed, 57 insertions(+), 95 deletions(-) diff --git a/sass/_cards.scss b/sass/_cards.scss index 1dc66c61..779af606 100644 --- a/sass/_cards.scss +++ b/sass/_cards.scss @@ -270,7 +270,7 @@ display: inline-flex; align-items: center; gap: 0.6rem; - color: #47506b; + color: $community-text; font-size: 1.3rem; font-weight: 600; line-height: 1.2; @@ -294,7 +294,7 @@ align-items: center; gap: 1rem; min-width: 0; - color: #606985; + color: $community-text-muted; font-size: 1.3rem; line-height: 1.35; @@ -317,7 +317,7 @@ height: 2.8rem; border: 2px solid #fff; border-radius: 50%; - background: #e9ebf4; + background: $community-hairline; } img { @@ -408,7 +408,7 @@ display: -webkit-box; margin: 0 0 2.2rem; overflow: hidden; - color: #47506b; + color: $community-text; font-size: 1.7rem; line-height: 1.55; -webkit-line-clamp: 4; @@ -433,7 +433,7 @@ border: 1px solid #d5daea; border-radius: 999px; background: #fff; - color: #47506b; + color: $community-text; font: inherit; font-size: 1.3rem; font-weight: 700; @@ -479,7 +479,7 @@ // Every shown row but the first; the filter hides rows, the lead among them. li:not([hidden]) ~ li:not([hidden]) { - border-top: 1px solid #e9ebf4; + border-top: 1px solid $community-hairline; } } @@ -532,7 +532,7 @@ display: -webkit-box; margin: 0.4rem 0 0; overflow: hidden; - color: #47506b; + color: $community-text; font-size: 1.4rem; line-height: 1.5; -webkit-line-clamp: 2; @@ -545,7 +545,7 @@ .blog-row-date { grid-area: date; - color: #606985; + color: $community-text-muted; font-size: 1.3rem; font-variant-numeric: tabular-nums; white-space: nowrap; @@ -557,23 +557,10 @@ .blog-no-results { margin: 0; - color: #606985; + color: $community-text-muted; font-size: 1.5rem; } -// The live count under the list, and the point that loads the next batch -// as it nears the viewport. -.blog-status { - margin: 2.4rem 0 0; - color: #606985; - font-size: 1.3rem; - text-align: center; -} - -.blog-sentinel { - height: 1px; -} - // Blog posts (templates/blog-single.html) ------------------------------------ // The article and the sidebar are white cards on .community-home-canvas. diff --git a/sass/_colors.scss b/sass/_colors.scss index 6537e5cf..3e7af27e 100755 --- a/sass/_colors.scss +++ b/sass/_colors.scss @@ -117,9 +117,12 @@ $community-tint: #f8faff; $community-tint-hover: #eef1fb; $community-canvas: #e8ebf5; +// The site's periwinkle accent; _valkey.scss still spells it out as hex. +$valkey-periwinkle: #6983ff; + // Each blog type's colour: the badge on posts and the dot on /blog/. $blog-type-colors: ( - "Technical Deep Dive": #6983ff, + "Technical Deep Dive": $valkey-periwinkle, "Community Highlight": $green-200, "How-to": $purple-200, "Announcements": $yellow-100, diff --git a/templates/blog.html b/templates/blog.html index 4536f4ee..5b88d6df 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -59,79 +59,51 @@

{{ post.title | safe }}

{% endfor %} - -
-
-
-
+ + } + +
+
+
{% endblock content %} From 55306a3e7927585685794169a602f32a00b6a959 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Mon, 16 Nov 2026 17:41:24 -0800 Subject: [PATCH 10/14] Load the homepage participant logos lazily The strip sits below the fold on the homepage, unlike /community/, and main's homepage carousel loaded its logos lazily. logo_strip now takes a loading argument, eager by default so /community/ is unchanged. Signed-off-by: Madelyn Olson --- templates/index.html | 5 +++-- templates/macros/community.html | 14 ++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/templates/index.html b/templates/index.html index 3f6c1fde..1b5e40d6 100644 --- a/templates/index.html +++ b/templates/index.html @@ -129,11 +129,12 @@

{{ card.title }}

{% endif %} - {# Same order as the Participants page #} + {# Same order as the Participants page. The strip is below the fold here, + unlike /community/, so its logos load lazily. #} {% set participants = load_data(path="_data/participants.yml") | sort(attribute="name") %} {% if participants and participants | length > 0 %}
- {{< logo_strip participants={participants} />}} + {{< logo_strip participants={participants} loading="lazy" />}}
{% endif %}
diff --git a/templates/macros/community.html b/templates/macros/community.html index c1504143..01b30f17 100644 --- a/templates/macros/community.html +++ b/templates/macros/community.html @@ -29,7 +29,7 @@ already links to /participants/, where each logo is linked with a description. Rendering them as links here added ~20 tab stops with no skip link and let keyboard focus scroll the marquee off-track. #} -{% component logo_set(participants, duplicate=false) %} +{% component logo_set(participants, duplicate=false, loading="eager") %} - {% if section.extra.hero.command %} - {{< copy_code command={section.extra.hero.command} />}} - {% endif %}

{% endif %} diff --git a/templates/macros/release.html b/templates/macros/release.html index 85633017..9c1c6e72 100644 --- a/templates/macros/release.html +++ b/templates/macros/release.html @@ -1,21 +1,3 @@ -{# A command with a copy button. copy-code.js, loaded on every page, handles - the click. #} -{% component copy_code(command) -%} -
-
{{ command }}
- - -
-{%- endcomponent copy_code %} - {% component release_info(date, release, notice=true) %} {# A tag with a suffix is a pre-release. The warning lives here so it reaches every page that offers the artifacts. Callers that have already warned in @@ -43,7 +25,19 @@

{{registry.name}} ({{registry.id}})

Example:

- {{< copy_code command={"docker run --rm " ~ registry.id ~ ":" ~ (registry.tags | first)} />}} +
+
docker run --rm {{ registry.id }}:{{ registry.tags | first }}
+ + +

{% endfor %} {% if release.packages %} From d7c727bf3a806b9e3a026b2843377ee353bebc28 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Mon, 23 Nov 2026 12:50:23 -0800 Subject: [PATCH 13/14] Label the lead post "Featured" again The lead card on /blog/ opened on its type alone, so nothing said why that post was at the top. It now reads "Featured" (or "Latest" when no post is featured) beside the type, as it did before the label was dropped. Signed-off-by: Madelyn Olson --- sass/_cards.scss | 9 +++++++++ templates/blog.html | 7 ++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sass/_cards.scss b/sass/_cards.scss index 779af606..559a7e57 100644 --- a/sass/_cards.scss +++ b/sass/_cards.scss @@ -388,7 +388,16 @@ .blog-lead-kicker { display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.6rem 1.6rem; + margin: 0; +} + +.blog-eyebrow { + @include card-label; margin: 0; + line-height: 1.2; } .blog-lead-title { diff --git a/templates/blog.html b/templates/blog.html index 5b88d6df..fe857553 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -17,9 +17,10 @@

{{ section.title }}

{{< blog_media post={lead} width={1200} height={675} />}}
- {% if lead_types %} -

{{< blog_type name={lead_types | first} />}}

- {% endif %} +

+ {% if featured %}Featured{% else %}Latest{% endif %} + {% if lead_types %}{{< blog_type name={lead_types | first} />}}{% endif %} +

{{ lead.title | safe }}

{{ lead.description | safe }}

{{< blog_byline post={lead} />}} From 71ddb09fd59ef1e389f1d2ab6088d1dd0d995066 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Wed, 25 Nov 2026 16:29:41 -0800 Subject: [PATCH 14/14] Leave the homepage to #747 This PR carried #747's homepage restyle. Put the homepage, /community/ and the shared nav back as they are on main, so this changes only /blog/ and blog posts. _cards.scss keeps the card and card-label mixins and the blog styles, and drops the homepage section. The card pages' canvas stays /community/'s #f8faff. Signed-off-by: Madelyn Olson --- content/_index.md | 16 +- sass/_cards.scss | 223 +------ sass/_colors.scss | 2 +- sass/_community.scss | 33 +- sass/_valkey.scss | 599 ++++++++++++++++++- static/assets/js/carousel.js | 212 +++++++ static/assets/js/community.js | 11 +- templates/community-home.html | 11 +- templates/includes/head.html | 3 + templates/includes/participant-carousel.html | 61 ++ templates/index.html | 208 +++---- templates/macros/community.html | 24 +- 12 files changed, 1013 insertions(+), 390 deletions(-) create mode 100644 static/assets/js/carousel.js create mode 100644 templates/includes/participant-carousel.html diff --git a/content/_index.md b/content/_index.md index 91a055e0..16ea142e 100644 --- a/content/_index.md +++ b/content/_index.md @@ -6,38 +6,42 @@ repos_heading= "Featured repositories" github_org= "https://github.com/valkey-io" github_org_text= "All repos in the Valkey GitHub organization" -# Number of blog posts shown in the "Latest blog posts" panel. +# Number of blog posts shown in the "Latest Blog Posts" panel. latest_blog_posts= 4 headline= "Valkey: an open source, in-memory data store" long_description= "" [extra.hero] -headings = ["Fast. Reliable.", "Open source, forever."] +headings = ["FAST. RELIABLE.", "OPEN SOURCE, FOREVER."] subtitle = "Valkey is an open source (BSD) high-performance key/value datastore that supports a variety of workloads such as caching, message queues, and can act as a primary database. The project is backed by the Linux Foundation, ensuring it will remain open source forever." -button_text = "Get started" +button_text = "GET STARTED" button_url = "/topics/quickstart" -secondary_button_text = "Install Valkey" +secondary_button_text = "INSTALL VALKEY" secondary_button_url = "/topics/installation" [[extra.documentation_cards]] title = "Usage guide" description = "Detailed documentation on the various datatypes supported by Valkey and best practices." +button_text = "Documentation by topic" button_url = "/topics/" [[extra.documentation_cards]] title = "Valkey API" description = "View the full list of Valkey commands including first party modules." +button_text = "Command Reference" button_url = "/commands" [[extra.documentation_cards]] title = "Clients" description = "Recommended Valkey client libraries for Python, Java, Go, Node.js, PHP, C#, Ruby, and more." +button_text = "Learn More" button_url = "/clients/" [[extra.documentation_cards]] title = "Performance" description = "Deep dive into Valkey performance numbers across versions." +button_text = "Explore" button_url = "/performance/" [[extra.download_ctas]] @@ -54,6 +58,6 @@ title= "Read the docs" ## Learn more -Valkey can run as either a standalone daemon or in a cluster, with options for replication and high availability. Valkey natively supports a rich collection of datatypes, including strings, numbers, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs and more. +Valkey can run as either a **standalone** daemon or in a **cluster**, with options for **replication** and **high availability**. Valkey natively supports a rich collection of datatypes, including **strings**, **numbers**, **hashes**, **lists**, **sets**, **sorted sets**, **bitmaps**, **hyperloglogs** and more. You can operate on data structures in-place with an expressive collection of commands. -Valkey also supports native extensibility with built-in scripting support for Lua and supports module plugins to create new commands, data types, and more. +Valkey also supports native extensibility with built-in scripting support for **Lua** and supports **module** plugins to create new commands, data types, and more. diff --git a/sass/_cards.scss b/sass/_cards.scss index 559a7e57..7fe72c68 100644 --- a/sass/_cards.scss +++ b/sass/_cards.scss @@ -1,14 +1,10 @@ // Cards: white cards on a light canvas, the design /community/ introduced. -// The homepage, /blog/ and blog posts are built from it. The canvas -// (.community-home-canvas), section head and label -// (.community-home-section-head, .community-home-kicker), and the logo strip -// are /community/'s, in _community.scss. -// -// Imported before _community.scss, which takes the card surface from here. -// Both take their colours from the card palette in _colors.scss. - -// The white card: /community/'s Connect card and every card below. The -// border also draws the edge in forced-colors mode, which drops the shadow. +// /blog/ and blog posts are built from it. The canvas (.community-home-canvas) +// is /community/'s, in _community.scss. The colours are the card palette in +// _colors.scss. + +// The white card. The border also draws the edge in forced-colors mode, +// which drops the shadow. @mixin card { border: 1px solid $community-card-border; background: #fff; @@ -18,8 +14,7 @@ // A card's section label: sentence case in #4a5ad8, the hero button blue, // which is 5.6:1 on white where /community/'s #5b6fff kicker is 4.1:1. -// 2.4rem keeps it above the homepage cards' titles, the largest of which is -// 1.8rem. Balanced wrapping avoids leaving "releases" alone on a line. +// Balanced wrapping avoids leaving one word alone on a line. @mixin card-label { color: $community-label-blue; font-size: 2.4rem; @@ -29,206 +24,6 @@ text-wrap: balance; } -// Homepage (templates/index.html) ------------------------------------------- - -// Every block below the hero is a card on .community-home-canvas. Two columns -// from 900px: the release cards stack beside the blog card, then Learn more -// and the logo strip run full width. The 1fr row takes any height the blog -// card has over the two release cards, and the past releases card sits at the -// top of it, so both release cards keep their natural height. -.homepage-grid { - display: grid; - gap: 2rem; - max-width: var(--max-width); - margin: 3.4rem auto; - - @include respond-min(900px) { - grid-template-columns: 1fr 1fr; - grid-template-rows: auto 1fr auto auto; - grid-template-areas: - "release blog" - "past blog" - "learn learn" - "participants participants"; - - .homepage-card-release { grid-area: release; } - .homepage-card-past { grid-area: past; align-self: start; } - .homepage-card-blog { grid-area: blog; } - .homepage-card-learn { grid-area: learn; } - .homepage-card-participants { grid-area: participants; } - } -} - -// Connect's padding is too wide for a 390px screen, so cards start tighter. -.homepage-card { - @include card; - min-width: 0; - padding: 2.2rem 2rem; - - @include respond-min(768px) { - padding: 2.7rem 3.4rem; - } - - > :last-child { - margin-bottom: 0; - } - - // /community/ keeps the uppercase kicker. - .community-home-kicker { - @include card-label; - - // The release card's label is a heading around a link; it looks like - // the "Valkey participants" link label. - a { - color: inherit; - - &:hover { - color: $community-purple-800; - } - } - } - - .link-readmore { - text-transform: none; - font-size: 1.4rem; - } - - // Baseline-aligned: the label is the tallest item, so it sits at the top - // of the head and lines up with the labels in the other cards, and the - // link shares its baseline. - .community-home-section-head { - align-items: baseline; - - .link-readmore { - margin: 0; - } - } -} - -// One row per post, split by the logo strip's hairline. The title takes the -// same ink as the latest release and Learn more titles. -.homepage-blog-card { - display: block; - padding: 1.4rem 0; - border-top: 1px solid $community-hairline; - - &:first-child { - padding-top: 0; - border-top: 0; - } - - &:last-child { - padding-bottom: 0; - } - - &:hover .homepage-blog-card-title { - text-decoration: underline; - } -} - -.homepage-blog-card-title { - margin: 0 0 0.3rem; - color: $community-ink; - font-size: 1.7rem; - font-weight: 700; - line-height: 1.3; -} - -.homepage-blog-card-meta { - margin: 0 0 0.5rem; - color: $community-text-muted; - font-size: 1.3rem; -} - -.homepage-blog-card-description { - display: -webkit-box; - margin: 0; - overflow: hidden; - color: $community-text; - font-size: 1.4rem; - line-height: 1.45; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; -} - -// The kicker is the markdown heading in content/_index.md. It takes the -// label style by position, so the content needs no class. Flex keeps the -// inline-block kicker off the parent's line box, which would push it below -// the kickers in the other cards. -.homepage-learn-intro { - display: flex; - flex-direction: column; - align-items: flex-start; - - > h2 { - @extend .community-home-kicker; - } - - p { - margin: 1.2rem 0 0; - color: $community-text; - font-size: 1.6rem; - line-height: 1.6; - } -} - -.homepage-learn-grid { - display: grid; - gap: 2.4rem; - margin-top: 2.4rem; - - @include respond-min(600px) { - grid-template-columns: 1fr 1fr; - } - - @include respond-min(1100px) { - grid-template-columns: repeat(4, 1fr); - } -} - -.homepage-learn-item { - display: block; - padding: 1.8rem 2rem; - border-radius: 14px; - background: $community-tint; - transition: background 0.15s; - - &:hover { - background: $community-tint-hover; - - h3 { - text-decoration: underline; - } - } - - &:focus-visible { - outline: 2px solid $community-blue-500; - outline-offset: 2px; - } - - h3 { - margin: 0 0 0.8rem; - color: $community-ink; - font-size: 1.8rem; - font-weight: 700; - - // Same chevron as .link-readmore. inline-block keeps the hover underline - // off it. - &::after { - content: '\203A'; - display: inline-block; - margin-left: 0.4em; - } - } - - p { - margin: 0; - color: $community-text; - font-size: 1.5rem; - line-height: 1.5; - } -} - // Blog landing page (templates/blog.html, macros/blog.html) ------------------ // No banner: a big lead card for the newest featured post, then the type @@ -473,8 +268,8 @@ } } -// One white card; each row is a link, split from the next by the homepage's -// hairline. From 1100px the byline, type and date sit in columns, so they line +// One white card; each row is a link, split from the next by a hairline. +// From 1100px the byline, type and date sit in columns, so they line // up down the list. .blog-list { @include card; diff --git a/sass/_colors.scss b/sass/_colors.scss index 3e7af27e..8d88db39 100755 --- a/sass/_colors.scss +++ b/sass/_colors.scss @@ -103,7 +103,7 @@ $text-link-alternate: #0053b8; //pacific blue $text-link-alternate-lighter: #137cc1; //pacific blue tint 1 $text-link-alternate-darker: #00529e; -// Card pages: /community/ and the homepage (_cards.scss, _community.scss). +// Card pages: /blog/ and blog posts (_cards.scss). $community-purple-900: #2d2471; $community-purple-800: #35247e; $community-blue-500: #5b6fff; diff --git a/sass/_community.scss b/sass/_community.scss index 4f3a3c34..b5f20ec4 100644 --- a/sass/_community.scss +++ b/sass/_community.scss @@ -1,9 +1,12 @@ -// Community landing page (templates/community-home.html): participant logo -// strip, photo hero, connect bar, and photo carousel. The "Ways to -// contribute" tiles reuse the shared .community-card styles from -// _valkey.scss. The palette is in _colors.scss and the card surface in -// _cards.scss, whose pages reuse the canvas, section head, kicker and logo -// strip below. +// Community landing page (templates/community-home.html) +// The "Ways to contribute" tiles reuse the shared .community-card styles +// from _valkey.scss. Everything here is specific to the landing page: +// participant logo strip, photo hero, connect bar, and photo carousel. + +$community-purple-900: #2d2471; +$community-purple-800: #35247e; +$community-blue-500: #5b6fff; +$community-ink: #072150; // Shared pieces -------------------------------------------------------------- @@ -16,11 +19,10 @@ letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; -} -// Only labels that are links, such as "Valkey participants", change colour. -a.community-home-kicker:hover { - color: $community-purple-800; + &:hover { + color: $community-purple-800; + } } .community-home-btn { @@ -253,15 +255,14 @@ a.community-home-kicker:hover { } } -// Connect with us and photo carousel sit on a light blue canvas so the white -// Connect card and its shadow read against the page. The other card pages -// use the same canvas, so a change here changes them too. +// Connect with us and photo carousel sit on a faint blue canvas so the white +// Connect card and its shadow read against the page. .community-home-canvas { // 0.1px top/bottom keeps child margins inside the tinted area; the side // gutter is the single, page-wide rule so everything lines up with the // header/footer content column (--max-width). padding: 0.1px 2rem; - background: $community-canvas; + background: #f8faff; } // Connect with us ----------------------------------------------------------- @@ -273,7 +274,9 @@ a.community-home-kicker:hover { max-width: var(--max-width); margin: 3.4rem auto; padding: 2.7rem 3.4rem; - @include card; + background: #fff; + border-radius: 18px; + box-shadow: 0 10px 28px rgba(60, 60, 130, 0.08); @include respond-min(900px) { flex-direction: row; diff --git a/sass/_valkey.scss b/sass/_valkey.scss index 2abf6f6c..9f03eae6 100644 --- a/sass/_valkey.scss +++ b/sass/_valkey.scss @@ -299,8 +299,7 @@ p { display: flex; } - &:hover, - &:focus-within { + &:hover { > span { color: #04202a; } @@ -322,21 +321,6 @@ p { text-decoration: none; } } - - // Desktop only: below 1024px the submenu is always listed under its link. - @include respond-min(1024px) { - &::after { - content: ''; - display: inline-block; - width: 0.45em; - height: 0.45em; - margin-left: 0.5em; - border-right: 2px solid currentColor; - border-bottom: 2px solid currentColor; - vertical-align: 0.25em; - transform: rotate(45deg); - } - } } .submenu { @@ -1637,19 +1621,14 @@ html.banner-hidden .banner { .hero-section { position: relative; background-size: cover; - // Only the photo layer moves; the gradients fill the box either way. - background-position: center, center, 65% center; + background-position: right center; background-color: #30186e; - // The radial layer dims the photo behind the headline without hiding it. - background-image: - radial-gradient(ellipse 50% 60% at center, rgba(28, 18, 58, 0.6), rgba(28, 18, 58, 0)), - linear-gradient(to bottom, rgba(48, 24, 110, 0.15), rgba(48, 24, 110, 0.75)), - url('/img/hero-bg.webp'); + background-image: linear-gradient(to bottom, rgba(48, 24, 110, 0.15), rgba(48, 24, 110, 0.75)), url('/img/hero-bg.webp'); display: flex; align-items: center; justify-content: center; overflow: hidden; - padding: 3.5rem 2rem; + padding: 8rem 2rem; &::after { content: ""; @@ -1657,6 +1636,11 @@ html.banner-hidden .banner { background-image: linear-gradient(to bottom, rgba(48, 24, 110, 0), rgba(48, 24, 110, 100)); pointer-events: none; } + + @include respond-min(768px) { + padding: 10rem 2rem; + + } } .hero-content { @@ -1671,6 +1655,7 @@ html.banner-hidden .banner { font-weight: 700; margin: 0; line-height: 1; + letter-spacing: 2px; color: white; @include respond-min(768px) { @@ -1680,7 +1665,7 @@ html.banner-hidden .banner { .hero-subtitle { font-size: 1.8rem; - font-weight: 400; + font-weight: 700; max-width: 800px; margin: 2rem auto 4rem; line-height: 1.6; @@ -1751,6 +1736,196 @@ html.banner-hidden .banner { } } +// Documentation Section Styles +.documentation-section { + padding: 2rem 2rem 4rem; + + // Continues the .whats-new-section gradient, finishing on the #6983ff that + // .homepage-participants-section starts from. + background: linear-gradient(rgb(81, 85, 193), #6983FF); + position: relative; + text-align: center; + color: white; + + @include respond-min(768px) { + padding-bottom: 8rem; + } + + .col { + max-width: 890px; + margin: 0 auto; + } + + a { + color: white; + text-decoration: underline; + } + + h2 { + width: 100%; + line-height: 1.2; + font-size: 3.75rem; + text-align: center; + font-weight: 700; + margin-bottom: 1.75rem; + + @include respond-min(768px) { + font-size: 6rem; + } + } + + p { + margin-bottom: 2rem; + } +} + +.documentation-card-grid { + margin-top: 4rem; + + @media (max-width: 1100px) { + .col { + flex: 1 1 50%; + margin-bottom: 3rem; + } + } + + @media (max-width: 768px) { + .col { + flex: 1 1 100%; + } + } +} + +.documentation-card { + display: flex; + flex-direction: column; + + // Spaces title from description, and keeps the button off the description + // even when `margin-top: auto` has no slack left to push it down. + gap: 1.5rem; + padding: 4rem; + border-radius: 20px; + color: white; + background: #2d2471; + + @include respond-min(768px) { + min-height: 100%; + } + + h3 { + font-weight: 700; + font-size: 2rem; + line-height: 1.2; + text-align: center; + color: white; + margin: 0 0 .5rem; + } + + p { + text-align: left; + margin: 0; + } + + ul { + text-align: left; + padding: 0 0 0 18px; + margin: 10px 0 20px; + } + + a.btn { + color: white; + border-radius: 24px; + border: 1px solid currentcolor; + padding: 1rem; + margin-top: auto; + text-decoration: none; + } +} + +// What's New Section Styles +.whats-new-section { + padding-bottom: 4rem; + + // Stops short of the full #6983ff so the section doesn't end glaring bright. + // .documentation-section picks the gradient up from here. + background-image: linear-gradient(rgb(48, 23, 110), rgb(81, 85, 193)); + + @include respond-min(768px) { + padding: 0 0 4rem; + } + + h2 { + width: 100%; + line-height: 1.2; + font-size: 3.75rem; + color: white; + text-align: center; + font-weight: 700; + margin: 0 0 1.75rem; + + @include respond-min(768px) { + font-size: 6rem; + } + } +} + +.whats-new-inner { + display: flex; + width: 100%; + padding: 2rem; + border-radius: 20px; + background: rgba(255, 255, 255, 0.2); + + @include respond-min(768px) { + padding: 2.5rem; + } + + h3 { + color: white; + font-size: 2.75rem; + font-weight: 700; + width: 100%; + margin: 0 0 1rem; + } + + .inner-card { + background: white; + padding: 3rem; + border-radius: 10px; + margin: 0 0 3rem; + + // The panel's own padding closes out the column; a trailing card margin + // would stack on top of it. + &:last-child { + margin-bottom: 0; + } + + h4 { + margin: 0 0 1rem; + } + + hr { + margin: 2rem 0; + } + } +} + +.release-headline { + display: flex; + flex-wrap: wrap; + align-items: baseline; + gap: 1rem; + margin: 0 0 1.5rem; + font-size: 2rem; + font-weight: 700; + + small { + font-size: 1.3rem; + font-weight: 400; + color: #4a5568; + } +} + .release-highlights { ul { margin: 0 0 1rem; @@ -2202,6 +2377,378 @@ blockquote { } } +// Homepage blog cards: text-only cards stacked vertically, matching the release +// cards in the other column. +.homepage-blog-section { + display: flex; + flex-direction: column; + gap: 1.5rem; + margin-bottom: 3rem; +} + +// The card is itself an anchor, so it takes its colour from the global +// `a, a:visited` rule. That is the same rule the release links next to it use, +// which is the point: the two white cards in this panel cannot drift apart. +// Do not set a colour here or on the title. +.homepage-blog-card { + background: #fff; + border-radius: 10px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + padding: 2rem 2.5rem; + transition: box-shadow 0.2s ease; + display: block; + text-decoration: none; + + &:hover { + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); + } +} + +.homepage-blog-card-title { + margin: 0 0 0.5rem 0; + font-size: 1.8rem; + line-height: 1.3; + font-weight: 700; +} + +.homepage-blog-card-meta { + margin: 0 0 1rem; + font-size: 1.3rem; + color: #4a5568; +} + +.homepage-blog-card-description { + margin: 0; + font-size: 1.4rem; + line-height: 1.4; + color: #4a5568; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} + +// Sits on the heading row rather than under the cards, so the column ends on a +// card edge instead of a stray link. +.homepage-blog-heading { + display: flex; + align-items: baseline; + flex-wrap: wrap; + justify-content: space-between; + gap: 0 1.5rem; + + h3 { + width: auto; + } +} + +// `&:visited` is not redundant: the global `a:visited` is more specific than a +// bare class, so without it the link falls back to the blue link colour. +// Underlined rather than tinted to set it apart from the white heading: no tint +// distinct from white keeps 4.5:1 contrast where the gradient sits on mobile. +.homepage-blog-more { + &, + &:visited, + &:hover { + color: white; + } + + @include sans-serif; + font-size: 1.4rem; + font-weight: 700; + text-transform: uppercase; + text-decoration: underline; + white-space: nowrap; + + // inline-block keeps the underline off the chevron. + &:after { + content: '›'; + display: inline-block; + margin-left: 0.3em; + font-size: 1.2em; + } +} + +// Responsive adjustments for homepage blog cards +@media (max-width: 768px) { + .homepage-blog-card { + padding: 1.5rem 1.8rem; + } + + .homepage-blog-card-title { + font-size: 1.6rem; + } + + .homepage-blog-card-description { + font-size: 1.3rem; + } +} + +// Homepage Participant Carousel Styles +.homepage-participants-section { + background: linear-gradient(180deg, #6983FF 0%, #BCB5E7 100%); + padding: 8rem 0; + + .homepage-participants-container { + max-width: var(--max-width); + margin: 0 auto; + padding: 0 2rem; + } + + .homepage-participants-header { + text-align: center; + margin-bottom: 6rem; + } + + // Same scale as the "Learn more" h2 above it. + .homepage-participants-title { + color: $white; + font-size: 3.75rem; + font-weight: 700; + margin: 0 0 2rem 0; + letter-spacing: -1px; + + @include respond-min(768px) { + font-size: 6rem; + } + } + + .homepage-participants-description { + color: $white; + font-size: 1.8rem; + line-height: 1.6; + max-width: 80rem; + margin: 0 auto; + opacity: 0.95; + } + + .homepage-participants-error { + background: $white; + border-radius: 2rem; + padding: 4rem; + text-align: center; + + p { + color: $text-light; + font-size: 1.6rem; + margin: 0; + } + } + + .homepage-participants-carousel-container { + background: $white; + border-radius: 2rem; + position: relative; + overflow: hidden; + } + + .homepage-participants-carousel { + overflow: hidden; + position: relative; + + .homepage-participants-track { + display: flex; + transition: transform 0.5s ease-in-out; + width: 100%; + } + + .homepage-participant-card { + flex: 0 0 33.33%; + min-width: 0; + min-height: 100%; + border-radius: 1.2rem; + padding: 4rem; + transition: all 0.3s ease; + cursor: pointer; + + .homepage-participant-image-container { + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 2rem; + } + + .homepage-participant-image { + object-fit: contain; + max-height: 40px; + margin-inline: auto; + } + + .homepage-participant-image-placeholder { + width: 6rem; + height: 6rem; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + color: $white; + font-size: 2.4rem; + font-weight: 700; + text-transform: uppercase; + } + + .homepage-participant-name { + font-size: 2rem; + font-weight: 700; + color: $text; + text-align: center; + margin: 0 0 1.2rem 0; + line-height: 1.3; + } + + .homepage-participant-offering { + font-size: 1.4rem; + line-height: 1.5; + color: $text-light; + margin: 0; + text-align: center; + word-wrap: break-word; + overflow-wrap: break-word; + display: -webkit-box; + -webkit-line-clamp: 7; + -webkit-box-orient: vertical; + overflow: hidden; + + a { + color: $text-link-alternate; + text-decoration: none; + transition: color 0.2s ease; + + &:hover { + color: $text-link-alternate-lighter; + text-decoration: underline; + } + } + } + } + } + + .homepage-participants-navigation { + display: flex; + justify-content: center; + margin-top: 1.25rem; + + .homepage-participants-dots { + display: flex; + gap: 0.5rem; + align-items: center; + + .homepage-participant-dot { + width: 0.5rem; + height: 0.5rem; + border-radius: 50%; + border: none; + background: rgba($color: #000000, $alpha: 0.25); + cursor: pointer; + transition: all 0.2s ease; + padding: 0; + + &:hover, + &:focus { + background: #000; + transform: scale(1.1); + outline-offset: 2px; + } + + &[aria-current="true"], + &.active { + background: #000; + transform: scale(1.2); + } + } + } + } +} + +// Responsive design for homepage participant carousel +@media (max-width: 1200px) { + .homepage-participants-section { + .homepage-participants-carousel { + .homepage-participant-card { + flex: 0 0 50%; + } + } + } +} + +@media (max-width: 768px) { + .homepage-participants-section { + padding: 6rem 2rem; + + .homepage-participants-container { + padding: 0 1.5rem; + } + + .homepage-participants-description { + font-size: 1.6rem; + max-width: 100%; + } + + .homepage-participants-carousel { + .homepage-participant-card { + flex: 0 0 100%; + padding: 1.8rem; + + .homepage-participant-image-container { + margin-bottom: 1.5rem; + } + + .homepage-participant-name { + font-size: 1.8rem; + margin-bottom: 1rem; + } + + .homepage-participant-offering { + font-size: 1.3rem; + } + } + } + + .homepage-participants-navigation { + margin-top: 2rem; + + .homepage-participants-dots { + gap: 0.75rem; + + .homepage-participant-dot { + width: 0.75rem; + height: 0.75rem; + } + } + } + } +} + +@media (max-width: 480px) { + .homepage-participants-section { + .homepage-participants-carousel { + .homepage-participant-card { + padding: 1.5rem; + } + } + + .homepage-participants-title { + font-size: 3rem; + } + + .homepage-participants-description { + font-size: 1.5rem; + } + + .homepage-participants-navigation { + .homepage-participants-dots { + gap: 1rem; + + .homepage-participant-dot { + width: 1rem; + height: 1rem; + } + } + } + } +} + // Events Calendar .events-calendar { max-width: 800px; diff --git a/static/assets/js/carousel.js b/static/assets/js/carousel.js new file mode 100644 index 00000000..467cd9af --- /dev/null +++ b/static/assets/js/carousel.js @@ -0,0 +1,212 @@ +/** + * Homepage Participant Carousel Module + * + * Features: + * - Auto-scrolling carousel with pause on hover + * - Responsive design (1/2/3 cards per slide based on screen size) + * - Keyboard navigation support + * - Intersection Observer for performance optimization + * - Accessibility features with ARIA labels + * + */ + +(function() { + 'use strict'; + + // Cache DOM elements to avoid repeated queries + let carousel, track, dots, cards; + let currentSlide = 0; + let autoScrollInterval = null; + let dotButtons = []; + let isVisible = true; + let resizeTimeout; + + /** + * Get number of cards per slide based on screen size + * @returns {number} Number of cards to show per slide + */ + function getCardsPerSlide() { + const width = window.innerWidth; + if (width <= 768) { + return 1; // Mobile: 1 card per slide + } else if (width <= 1200) { + return 2; // Tablet: 2 cards per slide + } else { + return 3; // Desktop: 3 cards per slide + } + } + + /** + * Update dots based on current screen size + */ + function updateDotsForScreenSize() { + const cardsPerSlide = getCardsPerSlide(); + const totalSlides = Math.ceil(cards.length / cardsPerSlide); + + // Clear existing dots + dots.innerHTML = ''; + + // Create new dots + for (let i = 0; i < totalSlides; i++) { + const dot = document.createElement('button'); + dot.className = 'homepage-participant-dot'; + dot.setAttribute('data-slide', i); + dot.setAttribute('aria-label', `Go to slide ${i + 1}`); + dot.setAttribute('aria-current', 'false'); + + dot.addEventListener('click', () => { + goToSlide(i); + }); + + dots.appendChild(dot); + } + + // Update reference to dot buttons + dotButtons = dots.querySelectorAll('.homepage-participant-dot'); + + // Ensure current slide is valid + if (currentSlide >= totalSlides) { + currentSlide = totalSlides - 1; + } + + updateDots(); + } + + /** + * Start auto-scroll functionality + */ + function startAutoScroll() { + if (dotButtons.length <= 1 || !isVisible) return; // Don't auto-scroll if only one slide or not visible + + autoScrollInterval = setInterval(() => { + currentSlide = (currentSlide + 1) % dotButtons.length; + updateCarousel(); + }, 5000); // 5 seconds + } + + /** + * Update carousel position + */ + function updateCarousel() { + const slideWidth = carousel.offsetWidth; + const translateX = -currentSlide * slideWidth; + track.style.transform = `translateX(${translateX}px)`; + updateDots(); + } + + /** + * Update dot states + */ + function updateDots() { + dotButtons.forEach((dot, index) => { + if (index === currentSlide) { + dot.setAttribute('aria-current', 'true'); + dot.classList.add('active'); + } else { + dot.setAttribute('aria-current', 'false'); + dot.classList.remove('active'); + } + }); + } + + /** + * Go to specific slide + * @param {number} slideIndex - Index of slide to navigate to + */ + function goToSlide(slideIndex) { + currentSlide = Math.max(0, Math.min(slideIndex, dotButtons.length - 1)); + updateCarousel(); + } + + /** + * Add keyboard support for participant cards + */ + function setupKeyboardSupport() { + cards.forEach(card => { + card.addEventListener('keydown', (e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + card.click(); + } + }); + }); + } + + /** + * Setup event listeners + */ + function setupEventListeners() { + // Pause auto-scroll on hover + carousel.addEventListener('mouseenter', () => { + if (autoScrollInterval) { + clearInterval(autoScrollInterval); + autoScrollInterval = null; + } + }); + + carousel.addEventListener('mouseleave', () => { + startAutoScroll(); + }); + + // Handle window resize with debouncing + window.addEventListener('resize', () => { + clearTimeout(resizeTimeout); + resizeTimeout = setTimeout(() => { + updateDotsForScreenSize(); + updateCarousel(); + }, 250); + }); + + // Add Intersection Observer to pause carousel when not visible + if ('IntersectionObserver' in window) { + const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + isVisible = entry.isIntersecting; + if (isVisible) { + startAutoScroll(); + } else if (autoScrollInterval) { + clearInterval(autoScrollInterval); + autoScrollInterval = null; + } + }); + }, { threshold: 0.1 }); + + observer.observe(carousel); + } + } + + /** + * Initialize the carousel + */ + function init() { + carousel = document.getElementById('homepageParticipantsCarousel'); + track = document.getElementById('homepageParticipantsTrack'); + dots = document.getElementById('homepageParticipantsDots'); + + if (!carousel || !track || !dots) { + console.warn('Participant carousel elements not found'); + return; + } + + cards = track.querySelectorAll('.homepage-participant-card'); + + if (cards.length === 0) { + console.warn('No participant cards found'); + return; + } + + // Setup carousel functionality + updateDotsForScreenSize(); + setupKeyboardSupport(); + setupEventListeners(); + startAutoScroll(); + } + + // Initialize when DOM is ready + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', init); + } else { + init(); + } + +})(); diff --git a/static/assets/js/community.js b/static/assets/js/community.js index 735728d4..e3d8e4dd 100644 --- a/static/assets/js/community.js +++ b/static/assets/js/community.js @@ -1,12 +1,11 @@ /** - * Interactions for /community/ and the homepage + * Community page interactions * * 1. Participant logo marquee pause/play toggle (WCAG 2.2.2: auto-moving - * content lasting more than 5s needs a control to pause it). Both pages. - * 2. "Community in action" photo carousel, /community/ only: pages through - * photos three at a time on desktop, two on tablet, one on mobile. - * Prev/next buttons and a "current / total" status are the only controls; - * there is no auto-scroll. + * content lasting more than 5s needs a control to pause it). + * 2. "Community in action" photo carousel: pages through photos three at a + * time on desktop, two on tablet, one on mobile. Prev/next buttons and a + * "current / total" status are the only controls; there is no auto-scroll. */ (function () { diff --git a/templates/community-home.html b/templates/community-home.html index e2ddb4f1..cf0b8f33 100644 --- a/templates/community-home.html +++ b/templates/community-home.html @@ -9,7 +9,16 @@ {% if participants and participants | length > 0 %}
- {{< logo_strip participants={participants} />}} + +
+
+ {{< logo_set participants={participants} />}} + {{< logo_set participants={participants} duplicate={true} />}} +
+
{% endif %} diff --git a/templates/includes/head.html b/templates/includes/head.html index 63092592..62ff1171 100644 --- a/templates/includes/head.html +++ b/templates/includes/head.html @@ -88,6 +88,9 @@ + + + diff --git a/templates/includes/participant-carousel.html b/templates/includes/participant-carousel.html new file mode 100644 index 00000000..87a30a2c --- /dev/null +++ b/templates/includes/participant-carousel.html @@ -0,0 +1,61 @@ +{% set participants = load_data(path="_data/participants.yml") %} + +
+
+
+

Participants

+

+ The Valkey project participants are a diverse group of organizations that have come together to maintain and contribute to the project. Valkey participants are more than vendors, they are dedicated to continuously strengthening the long-term health and viability of this project so that everyone can benefit from it. Since its inception Valkey has enjoyed steady adoption demonstrating the industry's desire for an open, community-driven database solution. We look forward to seeing our list of participants grow as more companies work on our project. +

+
+ + {% if participants and participants | length > 0 %} + + +
+
+ {% set total_participants = participants | length %} + {% set total_slides = (total_participants / 3) | round(method="ceil") | int %} + {% if total_slides > 1 %} + {% for i in range(start=1, end=total_slides + 1) %} + + {% endfor %} + {% endif %} +
+
+ {% else %} +
+

Unable to load participant information at this time. Please try again later.

+
+ {% endif %} +
+ +
diff --git a/templates/index.html b/templates/index.html index 45535c09..46d578bb 100644 --- a/templates/index.html +++ b/templates/index.html @@ -20,123 +20,131 @@

{{ heading }}

{% endif %} -{# Below the hero, every block is a white card on the light canvas /community/ - uses. The styles are in _cards.scss. #} -
-
- {# The newest stable release on each major.minor line, newest line first. - A plain set inside a for loop is dropped when the loop ends, so the - loops add to these lists with set_global. #} - {% set release_section = get_section(path="download/releases/_index.md") %} - {% set keyed_lines = [] %} - {% set seen_lines = [] %} - {% for candidate in release_section.pages | sort(attribute="date") | reverse %} - {% if candidate.extra.tag is not matching(pat=".*-.*") %} - {% set candidate_parts = candidate.extra.tag | split(pat=".") %} - {% set candidate_line = candidate_parts[:2] | join(sep=".") %} - {% if candidate_line not in seen_lines %} - {% set_global seen_lines = [...seen_lines, candidate_line] %} - {% set_global keyed_lines = [...keyed_lines, {"version": (candidate_parts[0] | int) * 1000 + (candidate_parts[1] | int), "release": candidate}] %} - {% endif %} - {% endif %} - {% endfor %} +
+
+
+ {# The newest stable release on each major.minor line, newest line first. #} + {% set release_section = get_section(path="download/releases/_index.md") %} + {% set_global keyed_lines = [] %} + {% set_global seen_lines = [] %} + {% for candidate in release_section.pages | sort(attribute="date") | reverse %} + {% if candidate.extra.tag is not matching(pat=".*-.*") %} + {% set candidate_parts = candidate.extra.tag | split(pat=".") %} + {% set candidate_line = candidate_parts[:2] | join(sep=".") %} + {% if candidate_line not in seen_lines %} + {% set_global seen_lines = [...seen_lines, candidate_line] %} + {% set_global keyed_lines = [...keyed_lines, {"version": (candidate_parts[0] | int) * 1000 + (candidate_parts[1] | int), "release": candidate}] %} + {% endif %} + {% endif %} + {% endfor %} - {# Dates pick each line's newest patch but cannot order the lines: every - supported line usually ships a patch on the same day. #} - {% set release_lines = [] %} - {% for keyed in keyed_lines | sort(attribute="version") | reverse %} - {% set_global release_lines = [...release_lines, keyed.release] %} - {% endfor %} + {# Dates pick each line's newest patch but cannot order the lines: every + supported line usually ships a patch on the same day. #} + {% set_global release_lines = [] %} + {% for keyed in keyed_lines | sort(attribute="version") | reverse %} + {% set_global release_lines = [...release_lines, keyed.release] %} + {% endfor %} - {% set latest = release_lines | first %} - {% set latest_parts = latest.extra.tag | split(pat=".") %} - {% set latest_line = latest_parts[:2] | join(sep=".") %} + {% set latest = release_lines | first %} + {% set latest_parts = latest.extra.tag | split(pat=".") %} + {% set latest_line = latest_parts[:2] | join(sep=".") %} - {# Highlights and the line URL both come from the /download// page. - get_page fails the build if a release ships without its line page. #} - {% set latest_slug = latest_line | replace(from=".", to="-") %} - {% set latest_line_page = get_page(path="download/versions/" ~ latest_slug ~ ".md") %} + {# Highlights and the line URL both come from the /download// page. + get_page fails the build if a release ships without its line page. #} + {% set latest_slug = latest_line | replace(from=".", to="-") %} + {% set latest_line_page = get_page(path="download/versions/" ~ latest_slug ~ ".md") %} -
- +

Latest release

+
+

+ Valkey {{ latest.extra.tag }} + Released {{ latest.date | date(format="%B %-d, %Y") }} +

-
{{ latest_line_page.content | safe }}
- {% if latest_line_page.extra.blog_url %} - {{ latest_line_page.extra.blog_text }} - {% endif %} -
+
{{ latest_line_page.content | safe }}
+ {% if latest_line_page.extra.blog_url %} + {{ latest_line_page.extra.blog_text }} + {% endif %} +
-
-
-

Latest supported version of past releases

+

Latest supported version of past releases

+
+ + All releases +
- - All releases -
+
+
+

Latest Blog Posts

+ All blog posts +
+
+ {% set blog_post_section = get_section(path="blog/_index.md") %} + {% set blog_count = section.extra.latest_blog_posts %} + {% set blog_posts = blog_post_section.pages[:blog_count] %} + {% for post in blog_posts %} + {# The whole card is the link, so there is no separate call to action. + Featured images are 16:9 decoration; a thumbnail this narrow could only + show a crop of one, so the card is text instead. #} + +

{{ post.title }}

+

{{ post.date | date(format="%B %-d, %Y") }}

+

{{ post.description }}

+
+ {% endfor %} +
-
-
-

Latest blog posts

- All blog posts -
-
- {% set blog_post_section = get_section(path="blog/_index.md") %} - {% set blog_count = section.extra.latest_blog_posts %} - {% set blog_posts = blog_post_section.pages[:blog_count] %} - {% for post in blog_posts %} - {# The whole row is the link, so there is no separate call to action. - Featured images are 16:9 decoration; a thumbnail this narrow could only - show a crop of one, so the row is text instead. #} - -

{{ post.title }}

-

{{ post.date | date(format="%B %-d, %Y") }}

-

{{ post.description }}

-
- {% endfor %} + {% if section.extra and section.extra.sidebar %} + {% for sidebar_category in section.extra.sidebar %} +

{{sidebar_category.title}}

+
+ + {% if sidebar_category.more %} + {{sidebar_category.more.title}} + {% endif %} +
+ {% endfor %} + {% endif %}
-
+
+
-
-
+
+
+
{{ section.content | safe }}
+
+
{% if section.extra and section.extra.documentation_cards %} - {# The whole tile is the link, like the blog rows. #} -
{% for card in section.extra.documentation_cards %} - -

{{ card.title }}

-

{{ card.description }}

-
+
+
+

{{ card.title }}

+

{{ card.description }}

+ {{ card.button_text }} +
+
{% endfor %} -
{% endif %} -
- - {# Same order as the Participants page. The strip is below the fold here, - unlike /community/, so its logos load lazily. #} - {% set participants = load_data(path="_data/participants.yml") | sort(attribute="name") %} - {% if participants and participants | length > 0 %} -
- {{< logo_strip participants={participants} loading="lazy" />}} -
- {% endif %} -
+
- +{% include "includes/participant-carousel.html" %} {%- endblock content -%} diff --git a/templates/macros/community.html b/templates/macros/community.html index 01b30f17..0ca5cf28 100644 --- a/templates/macros/community.html +++ b/templates/macros/community.html @@ -1,5 +1,5 @@ {# - Participant logo strip helpers for the community page and the homepage. + Participant logo strip helpers for the community page. Logos come in very different shapes (square icons, tall lockups, long wordmarks). To give them similar visual weight, each logo is sized against @@ -29,7 +29,7 @@ already links to /participants/, where each logo is linked with a description. Rendering them as links here added ~20 tab stops with no skip link and let keyboard focus scroll the marquee off-track. #} -{% component logo_set(participants, duplicate=false, loading="eager") %} +{% component logo_set(participants, duplicate=false) %} {% endcomponent logo_set %} - -{# The whole strip: kicker, pause control, and the marquee. Each page supplies - its own wrapper. community.js finds the track and button by id, so a page - holds at most one strip. Logos load eagerly by default, for /community/ - where the strip is above the fold; a page with the strip further down - passes loading="lazy". #} -{% component logo_strip(participants, loading="eager") -%} -
- Valkey participants - -
-
-
- {{< logo_set participants={participants} loading={loading} />}} - {{< logo_set participants={participants} duplicate={true} loading={loading} />}} -
-
-{%- endcomponent logo_strip %}