Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5ff8ae0
add new landing page templates and navigation components with updated…
ostafinskim Nov 28, 2024
f07f60f
update logo and color scheme across components
ostafinskim Nov 29, 2024
49c0699
change quote and slide components to use purple color
ostafinskim Nov 29, 2024
aeee68a
Merge branch 'deployer7' into feature/update-logo
simonrjones Dec 17, 2024
908ad4e
update colors table
jean-gui Jan 9, 2025
7800f75
Merge branch 'refs/heads/main' into feature/update-logo
jean-gui Jan 10, 2025
65d7915
use logos from www.w3.org
jean-gui Jan 10, 2025
5366147
update deps
jean-gui Jan 10, 2025
b85532f
use new logo (circle version)
jean-gui Jan 10, 2025
73c6cf9
feat: update logo and global navigation styles
ostafinskim Jan 14, 2025
710b34b
del: remove v2 landing page and navigation v2 templates
ostafinskim Feb 26, 2025
975926e
feat: update name for navigation and landing page
ostafinskim Feb 26, 2025
5d45b7d
feat: update logo styles and adjust global navigation padding
ostafinskim Feb 26, 2025
5c0ff49
feat: adjust global navigation padding and add separator styles
ostafinskim Mar 14, 2025
e6b4009
feat: rem & em units add
ostafinskim Mar 18, 2025
09030a7
feat: remove separator styles from navigation
ostafinskim Mar 20, 2025
721c347
Cachebust css in head
JamieC24 May 12, 2025
7f07345
Add support for video in hero
JamieC24 Jun 26, 2025
cc7645e
Test adding a [0] to heroVideo call
JamieC24 Jun 26, 2025
62e76f7
Remove ghost class from button
NicolaSaunders Aug 5, 2025
8857d38
Refactor hero video
NicolaSaunders Aug 7, 2025
5af01c8
translate hero video
jean-gui Sep 2, 2025
714d948
Make play/pause button text use translatable strings
NicolaSaunders Sep 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions assets-src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {navigation} from "./main/navigation";
import {responsiveTables} from "./main/responsive-tables";
import {flashes} from "./main/flashes";
import {headingAnchors} from './main/heading-anchors';
import {videoHero} from './main/video-hero';

function domLoadedActions() {
accountMenu();
Expand All @@ -17,6 +18,7 @@ function domLoadedActions() {
responsiveTables();
flashes();
headingAnchors();
videoHero();

/* Create a navDoubleLevel object and initiate double-level navigation for a <ul> with the correct data-component attribute */
const navDoubleIntro = document.querySelector('ul[data-component="nav-double-intro"]');
Expand Down
81 changes: 81 additions & 0 deletions assets-src/js/main/video-hero.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
let videoHero = function () {
/* My refactored code */
var heroVid = document.querySelector('[data-video="hero"]');
var heroVidControl = document.querySelector('[data-video-control="hero"]');

if (heroVid && heroVidControl) {
// Remove native controls and show custom button
heroVid.removeAttribute("controls");
heroVidControl.removeAttribute("hidden");

// Media query for reduced motion preference
var motionQuery = window.matchMedia("(prefers-reduced-motion)");

// Helper to update button text
function updateButtonState(isPlaying) {
const label = isPlaying ? heroVidControl.dataset.videoPause : heroVidControl.dataset.videoPlay;
heroVidControl.querySelector("span").innerText = label;
heroVidControl.classList.toggle("js-play-video", isPlaying);
}

// Play video with error handling
function playHeroVid() {
heroVid.play().then(() => {
updateButtonState(true);
}).catch((error) => {
console.warn("Video play failed:", error);
updateButtonState(false);
});
}

// Pause video
function pauseHeroVid() {
heroVid.pause();
updateButtonState(false);
}

// Handle user motion preference
function handleReduceMotionChanged() {
if (motionQuery.matches) {
pauseHeroVid();
} else {
playHeroVid();
}
}

// Attempt to autoplay
var promise = heroVid.play();
if (promise !== undefined) {
promise
.then(() => {
updateButtonState(true);
})
.catch((error) => {
console.warn("Autoplay was prevented:", error);
updateButtonState(false);
});
}

// Media query listener
motionQuery.addEventListener("change", handleReduceMotionChanged);
handleReduceMotionChanged();

// Toggle video playback on control click
document.addEventListener("click", function (event) {
const button = event.target.closest('[data-video-control="hero"]');
if (button) {
if (heroVid.paused) {
playHeroVid();
} else {
pauseHeroVid();
}
}
});

// Unregister media query listener on page unload to prevent memory leaks
window.addEventListener("beforeunload", () => {
motionQuery.removeEventListener("change", handleReduceMotionChanged);
});
}
}
export {videoHero}
14 changes: 5 additions & 9 deletions assets-src/styles/sass/00-settings/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $teal: #39cccc;
$aqua: #7fdbff;
$blue: #0073d8;
$navy: #001f3f;
$purple: #920ba6;
$purple: #75336c;
$fuchsia: #f012be;
$grey: #aaa;
$mercury-grey: #e5e5e5;
Expand All @@ -38,21 +38,17 @@ $red: #e93737;
$light-red: #ec7070;
$coral: #fc7750;
$light-coral: #fea78d;
$deep-yellow: #f9c818;
$yellow: #f9dc4a;
$deep-green: #0a4343;
$teal-green: #237978;
$aqua: #1bc0d7;
$light-blue: #cbe0fb;
$sky-blue: #6bc8fe;
$azure: #0075ff;
$w3c-blue: #005a9c;
$blue: #005797;
$deep-blue: #024488;
$deep-blue: #002a56;
$pink: #ddb0c8;
$light-pink: #eeccdc;
$storm-gray: #545454;
$twiki-gray: #bdbdbd;
$twiki-gray: #cac9c9;
$mist-gray: #f8f8fb;


Expand All @@ -63,12 +59,12 @@ $border-color: $twiki-gray;
$input-border-color: $storm-gray;
$focus-color: $yellow;

$link-color: $blue;
$link-color: $w3c-blue;
$link-color--visited: $purple;
$link-color--hover: $deep-blue;

$success-color: #046704;
$info-color: $w3c-blue;
$info-color: $deep-blue;
$warning-color: #c28605;
$error-color: #a82615;

Expand Down
2 changes: 1 addition & 1 deletion assets-src/styles/sass/50-core-components/_cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}

&.talk {
border-color: $deep-yellow;
border-color: $deep-blue;
}

&.workshop {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}

.component--evangelists__list {
background-color: $w3c-blue;
background-color: $deep-blue;
border-radius: rem(6);
color: $white;
overflow: hidden;
Expand Down
14 changes: 14 additions & 0 deletions assets-src/styles/sass/50-core-components/_hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,21 @@
}

.hero .button {
align-items: center;
align-self: flex-start;
display: inline-flex;
justify-content: center;
}


.hero--video .sidebar__video {
margin-inline: auto;
max-inline-size: rem(500);
position: relative;
}

.hero--video video {
display: block;
}

.hero--listing {
Expand Down
12 changes: 3 additions & 9 deletions assets-src/styles/sass/50-core-components/_logo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@
\*------------------------------------*/

.logo {
display: block;
height: rem(44);
position: relative;
width: rem(66);

@include mq($bp-tab-large) {
height: rem(52);
width: rem(78);
}
display: block;
position: relative;
width: clamp(3.75rem, 2.51rem + 6.198vw, 7.5rem);
}

.logo--member {
Expand Down
18 changes: 5 additions & 13 deletions assets-src/styles/sass/50-core-components/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,18 @@
}

#global-nav {
border-bottom: solid 1px $border-color;
display: block;
padding-bottom: rem(18);
padding-top: rem(18);

@include mq($max-width) {
padding-bottom: 0;
padding-top: rem(20);
}
padding-bottom: em(26);
padding-top: em(26);
}

.global-nav__inner {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: em(48);

@include mq($max-width) {
align-items: flex-end;
flex-wrap: nowrap;
position: relative;
}
Expand Down Expand Up @@ -108,13 +102,11 @@ li.top-nav-item + li.top-nav-item {
}

@include mq($max-width) {
margin-inline-end: rem(25);
padding-bottom: rem(5);
position: relative;

&::before {
background-color: $w3c-blue;
bottom: 0;
bottom: rem(-3);
content:'';
display: none;
height: rem(3);
Expand Down
4 changes: 2 additions & 2 deletions assets-src/styles/sass/50-core-components/_quotes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

.component--quote {
@include txt-saturn;
color: $w3c-blue;
color: $purple;
font-weight: bold;
margin-inline-end: 0;
margin-inline-start: rem(10);
padding: rem(20);
position: relative;

&::before {
background-color: $w3c-blue;
background-color: $purple;
border-radius: rem(5);
left: rem(-10);
width: rem(10);
Expand Down
2 changes: 1 addition & 1 deletion assets-src/styles/sass/50-core-components/_slide.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}

&::before {
background-color: $w3c-blue;
background-color: $purple;
border-radius: rem(5);
content: '';
height: 100%;
Expand Down
2 changes: 1 addition & 1 deletion assets-src/styles/sass/50-core-components/_toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

// Only apply the border to the top level list
.toc > ul {
border-inline-start: solid 3px $deep-yellow;
border-inline-start: solid 3px $w3c-blue;
}

.toc ul {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
\*------------------------------------*/

.crosslinks {
background-color: $w3c-blue;
background-color: $deep-blue;
color: $white;
padding-bottom: rem(50);
padding-top: rem(50);
Expand Down
25 changes: 25 additions & 0 deletions assets-src/styles/sass/60-advanced-components/_hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,29 @@
h2 {
display: none;
}
}




.js .hero--video [data-video-control="hero"] {
margin-block-start: 1rem;
}

.js .hero--video [data-video-control="hero"] > * {
pointer-events: none;
}

.js .hero--video [data-video-control="hero"] .pause-icon {
display: none;
}

.js .hero--video [data-video-control="hero"].js-play-video {
.pause-icon {
display: block;
}

.play-icon {
display: none;
}
}
2 changes: 1 addition & 1 deletion assets-src/styles/sass/80-templates/_event.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}

&.talk::before {
background-color: $deep-yellow;
background-color: $deep-blue;
}

&.workshop::before {
Expand Down
Loading