Perf: self-host fonts (drop render-blocking Google Fonts) + defer Cal + viewport-aware lighter mobile hero
Self-hosted woff2 (8 latin faces, subset, font-display swap), preload H1/body; removed Google Fonts link. Cal embed loads on first interaction. New 0.31MB mobile hero served at <=760px (was one 0.8MB file to all viewports). A11y: eyebrow up to 0.72rem. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+22
-7
@@ -5,9 +5,10 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>Shop Wisdom | Keep What Your Best People Know — for Canadian Manufacturers</title>
|
<title>Shop Wisdom | Keep What Your Best People Know — for Canadian Manufacturers</title>
|
||||||
<meta name="description" content="Your best people are retiring. I help Canadian manufacturers capture the know-how that lives in a few heads, build it into systems the whole shop can run on, and stay on to keep it that way. You own everything — and it stays in Canada.">
|
<meta name="description" content="Your best people are retiring. I help Canadian manufacturers capture the know-how that lives in a few heads, build it into systems the whole shop can run on, and stay on to keep it that way. You own everything — and it stays in Canada.">
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preload" href="assets/fonts/playfair-400.woff2" as="font" type="font/woff2" crossorigin>
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preload" href="assets/fonts/playfair-400i.woff2" as="font" type="font/woff2" crossorigin>
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Lora:ital,wght@0,400;0,500;1,400&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap">
|
<link rel="preload" href="assets/fonts/dmsans-400.woff2" as="font" type="font/woff2" crossorigin>
|
||||||
|
<link rel="preload" href="assets/fonts/lora-400.woff2" as="font" type="font/woff2" crossorigin>
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
<meta name="robots" content="index,follow">
|
<meta name="robots" content="index,follow">
|
||||||
<meta name="theme-color" content="#f7f4ef">
|
<meta name="theme-color" content="#f7f4ef">
|
||||||
@@ -139,9 +140,7 @@
|
|||||||
<main id="top">
|
<main id="top">
|
||||||
|
|
||||||
<section class="hero band light" data-bg="light">
|
<section class="hero band light" data-bg="light">
|
||||||
<video class="hero-video" autoplay muted loop playsinline poster="assets/hero/hero-poster.jpg" aria-hidden="true">
|
<video class="hero-video" autoplay muted loop playsinline preload="none" poster="assets/hero/hero-poster.jpg" aria-hidden="true" data-src-desktop="assets/hero/hero.mp4" data-src-mobile="assets/hero/hero-mobile.mp4"></video>
|
||||||
<source src="assets/hero/hero.mp4" type="video/mp4" />
|
|
||||||
</video>
|
|
||||||
<div class="wrap hero-wrap"><div class="hero-col">
|
<div class="wrap hero-wrap"><div class="hero-col">
|
||||||
<p class="eyebrow">Knowledge continuity · for Canadian manufacturers</p>
|
<p class="eyebrow">Knowledge continuity · for Canadian manufacturers</p>
|
||||||
<h1>Your best people are retiring. Their know‑how doesn't <em>have to.</em></h1>
|
<h1>Your best people are retiring. Their know‑how doesn't <em>have to.</em></h1>
|
||||||
@@ -515,10 +514,26 @@
|
|||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!-- Hero ambient loop: viewport-aware source (light mobile encode), poster-first; skipped on Save-Data / reduced-motion -->
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
var hv = document.querySelector('.hero-video');
|
||||||
|
if (!hv) return;
|
||||||
|
var conn = navigator.connection || {};
|
||||||
|
if (conn.saveData === true) return;
|
||||||
|
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
|
||||||
|
var isMobile = window.matchMedia('(max-width: 760px)').matches;
|
||||||
|
var src = hv.getAttribute(isMobile ? 'data-src-mobile' : 'data-src-desktop');
|
||||||
|
if (!src) return;
|
||||||
|
var s = document.createElement('source'); s.src = src; s.type = 'video/mp4'; hv.appendChild(s);
|
||||||
|
hv.load();
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
<!-- Cal.com booking embed (opens the booking popup on-brand; href is the no-JS fallback) -->
|
<!-- Cal.com booking embed (opens the booking popup on-brand; href is the no-JS fallback) -->
|
||||||
<script>
|
<script>
|
||||||
(function (C, A, L) { let p = function (a, ar) { a.q.push(ar); }; let d = C.document; C.Cal = C.Cal || function () { let cal = C.Cal; let ar = arguments; if (!cal.loaded) { cal.ns = {}; cal.q = cal.q || []; d.head.appendChild(d.createElement("script")).src = A; cal.loaded = true; } if (ar[0] === L) { const api = function () { p(api, arguments); }; const namespace = ar[1]; api.q = api.q || []; if (typeof namespace === "string") { cal.ns[namespace] = cal.ns[namespace] || api; p(cal.ns[namespace], ar); p(cal, ["initNamespace", namespace]); } else p(cal, ar); return; } p(cal, ar); }; })(window, "https://cal.shopwisdom.ca/embed/embed.js", "init");
|
(function (C, A, L) { let p = function (a, ar) { a.q.push(ar); }; let d = C.document; C.Cal = C.Cal || function () { let cal = C.Cal; let ar = arguments; if (!cal.loaded) { cal.ns = {}; cal.q = cal.q || []; d.head.appendChild(d.createElement("script")).src = A; cal.loaded = true; } if (ar[0] === L) { const api = function () { p(api, arguments); }; const namespace = ar[1]; api.q = api.q || []; if (typeof namespace === "string") { cal.ns[namespace] = cal.ns[namespace] || api; p(cal.ns[namespace], ar); p(cal, ["initNamespace", namespace]); } else p(cal, ar); return; } p(cal, ar); }; })(window, "https://cal.shopwisdom.ca/embed/embed.js", "init");
|
||||||
Cal("init", { origin: "https://cal.shopwisdom.ca" });
|
(function(){var d=false;function go(){if(d)return;d=true;Cal("init",{origin:"https://cal.shopwisdom.ca"});}var ev=["pointerdown","mousemove","touchstart","scroll","keydown"];function on(){go();ev.forEach(function(e){window.removeEventListener(e,on);});}ev.forEach(function(e){window.addEventListener(e,on,{passive:true});});})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Motion: reveal-on-scroll + stagger + open-o divider + persistent CTA. Gated on html.has-motion. -->
|
<!-- Motion: reveal-on-scroll + stagger + open-o divider + persistent CTA. Gated on html.has-motion. -->
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
@font-face{font-family:'DM Sans';font-style:normal;font-weight:400;font-display:swap;src:url('assets/fonts/dmsans-400.woff2') format('woff2')}
|
||||||
|
@font-face{font-family:'DM Sans';font-style:normal;font-weight:500;font-display:swap;src:url('assets/fonts/dmsans-500.woff2') format('woff2')}
|
||||||
|
@font-face{font-family:'Lora';font-style:normal;font-weight:400;font-display:swap;src:url('assets/fonts/lora-400.woff2') format('woff2')}
|
||||||
|
@font-face{font-family:'Lora';font-style:normal;font-weight:500;font-display:swap;src:url('assets/fonts/lora-500.woff2') format('woff2')}
|
||||||
|
@font-face{font-family:'Lora';font-style:italic;font-weight:400;font-display:swap;src:url('assets/fonts/lora-400i.woff2') format('woff2')}
|
||||||
|
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:400;font-display:swap;src:url('assets/fonts/playfair-400.woff2') format('woff2')}
|
||||||
|
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:700;font-display:swap;src:url('assets/fonts/playfair-700.woff2') format('woff2')}
|
||||||
|
@font-face{font-family:'Playfair Display';font-style:italic;font-weight:400;font-display:swap;src:url('assets/fonts/playfair-400i.woff2') format('woff2')}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--paper: #f7f4ef;
|
--paper: #f7f4ef;
|
||||||
--paper-2: #efebe3;
|
--paper-2: #efebe3;
|
||||||
@@ -49,7 +58,7 @@ strong { font-weight: 500; color: var(--ink); }
|
|||||||
|
|
||||||
/* Eyebrow with steel dash */
|
/* Eyebrow with steel dash */
|
||||||
.eyebrow {
|
.eyebrow {
|
||||||
font-family: 'DM Sans', sans-serif; font-size: 0.66rem; font-weight: 400;
|
font-family: 'DM Sans', sans-serif; font-size: 0.72rem; font-weight: 400;
|
||||||
text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent);
|
text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent);
|
||||||
margin: 0 0 24px; display: flex; align-items: center;
|
margin: 0 0 24px; display: flex; align-items: center;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user