Restore assets deleted by mistake

This commit is contained in:
hermes committed 2026-12-05 00:23:28 +00:00
1 parent ebe659c6e7
commit c5e361c1c5
2 files changed
+77

No files matched your search

+76
View File
@@ -0,0 +1,76 @@
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=`https://advent-of-slop.quesma.com`,t=`
nav {
position: fixed;
top: 0;
right: 0;
z-index: 2147483647;
display: flex;
flex-wrap: wrap;
gap: 0 0.35em;
max-width: 100vw;
box-sizing: border-box;
padding: 0.35rem 0.7rem;
border-bottom-left-radius: 0.5rem;
background: #b8232f;
font: 700 0.8125rem/1.2 system-ui, sans-serif;
}
a {
color: #f6ecd6;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
`,n=(e,t)=>{let n=document.createElement(`a`);return n.href=e,n.textContent=t,n},r=class extends HTMLElement{connectedCallback(){let r=Number(this.getAttribute(`day`));if(!Number.isInteger(r)||r<1||r>24)throw Error(`<advent-badge> needs day="1" to day="24", got ${this.getAttribute(`day`)}`);let i=this.getAttribute(`name`);if(i===null||i.trim()===``)throw Error(`<advent-badge> needs name="...", the title of its day, such as name="Living fishtank"`);let a=document.createElement(`style`);a.textContent=t;let o=document.createElement(`nav`);o.append(n(`${e}/`,`Advent of AI Slop`),n(`${e}/day/${r}/`,`[Day ${r}] ${i}`)),this.attachShadow({mode:`open`}).append(a,o)}};customElements.define(`advent-badge`,r);var i=[{title:`Dry the crackling`,danish:`Sværen skal være tør`,minutes:0,phase:`dry`,text:`Pat the skin of a 1.5 kg pork roast bone-dry and score it in a crosshatch, knife tip down to the fat — never through it. Rub coarse salt deep into every cut. Grandma’s trick: leave it uncovered in the fridge overnight. Dry skin is crispy skin; there is no shortcut.`},{title:`Make its bed`,danish:`On the rack, fat side up`,minutes:0,phase:`bed`,text:`Set the roast fat side up on a rack over a roasting pan with 2 dl of water in the bottom. The water stops the drippings from burning — those drippings become gravy, and gravy is the whole point of the pan.`},{title:`Into the oven`,danish:`200 °C, mid-rack`,minutes:90,phase:`oven`,text:`Roast at 200 °C, roughly 1 hour per 500 g. Every 20 minutes, baste the meat with the pan juices — do not wet the crackling. The kitchen will start to smell like December; that is your timer.`},{title:`Simmer the red cabbage`,danish:`Rødkål med æble`,minutes:40,phase:`cabbage`,text:`Simmer the rødkål with a quartered apple, a knob of butter and a pinch of sugar while the roast works. Old-school: braise your own cabbage for an hour. Honest-school: the good jarred kind, warmed properly. Grandma won’t tell.`},{title:`Boil the potatoes`,danish:`Små kartofler, let møre`,minutes:20,phase:`potatoes`,text:`Boil small potatoes in salted water until just tender — they still have to survive a roll in hot caramel. Drain well and keep them warm under a cloth.`},{title:`Brun the potatoes`,danish:`Brunede kartofler`,minutes:8,phase:`caramel`,text:`Melt sugar in a pan until it turns the colour of a hazelnut, swirl in butter, then roll in the potatoes until every one wears an amber coat. Do not stir with a spoon — swirl with the pan, or you get sugar rocks.`},{title:`Crisp the crackling`,danish:`Sværen skal springe`,minutes:12,phase:`crisp`,text:`If the crackling is still pale and soft, turn the oven to 225 °C (or grill) for the last 10–15 minutes. Watch it like a hawk — it goes from perfect to charcoal in one phone call. Done right it cracks like a campfire.`},{title:`Rest, then gravy`,danish:`Brun sovs på faconen`,minutes:10,phase:`rest`,text:`Let the meat rest 10 minutes under foil. Pour the pan juices into a saucepan, skim off the fat, and build a dark brown gravy with a little browned roux. Salt, pepper, taste — it should taste like the roast’s own diary.`},{title:`Carve`,danish:`Sværen først, kødet tyndt`,minutes:0,phase:`carve`,text:`Carve the crackling into neat squares first, while it is still warm and brittle, then slice the meat thin. Every plate gets one square that cracks and one slice that doesn’t need a saw.`},{title:`Serve`,danish:`Velbekomme!`,minutes:0,phase:`serve`,text:`Roast and crackling on a warm plate, a spoonful of rødkål, the amber potatoes beside it, gravy in a jug that has been warmed too. Light the candles. It is Grandma’s recipe now — which means yours.`}],a=[{name:`Pork roast, skin on`,perServing:375,unit:`g`,step:1},{name:`Coarse salt`,perServing:5,unit:`g`,step:1},{name:`Water in the pan`,perServing:0,unit:``,step:2},{name:`Red cabbage`,perServing:125,unit:`g`,step:4},{name:`Apples`,perServing:.5,unit:``,step:4},{name:`Butter`,perServing:15,unit:`g`,step:4},{name:`Small potatoes`,perServing:375,unit:`g`,step:5},{name:`Sugar`,perServing:12,unit:`g`,step:6},{name:`Brown roux`,perServing:8,unit:`g`,step:8}];function o(e,t){if(e.name===`Water in the pan`)return`2 dl water in the pan`;if(e.unit===``){let n=Math.round(e.perServing*t*2)/2;return`${n%1==0?n:n.toFixed(1)} ${e.name.toLowerCase()}${n===1?``:`s`}`}let n=e.perServing*t;if(n>=1e3){let t=Math.round(n/50)*50/1e3;return`${t%1==0?t.toFixed(0):t} kg ${e.name.toLowerCase()}`}return`${n>=200?Math.round(n/25)*25:Math.round(n/5)*5} ${e.unit} ${e.name.toLowerCase()}`}var s=`#f6ecd6`,c=`#d9a441`,l=`#b8232f`,u=`#6b4226`,d=`#a4553f`,f=`#7c3d2c`,p=`#e8c98a`,m=`#6d3560`,h=`#3a352e`;function g(e,t,n,r,i,a){e.beginPath(),e.roundRect(t,n,r,i,a)}function _(e,t,n,r,i,a,o){for(let c=0;c<i;c++){let l=(r*.32+c/i)%1,u=n-l*o,d=t+Math.sin((l*5+c)*2.1)*a*l;e.globalAlpha=(1-l)*.35,e.fillStyle=s,e.beginPath(),e.arc(d,u,3+l*9,0,Math.PI*2),e.fill()}e.globalAlpha=1}function ee(e,t,n,r,i,a){e.fillStyle=a;for(let Line truncated
<header>
<h1>Bedstemors Flæskesteg</h1>
<p class="sub">Grandma's roast pork with crackling, rødkål and brunede kartofler — ten steps,
one animated kitchen, and timers that actually run. The crackling must <em>crack</em>, not chew.</p>
</header>
<div id="controls">
<label class="ctl">Servings
<input id="servings" type="range" min="1" max="10" step="1" />
<span id="servings-val"></span>
</label>
<label class="ctl toggle">Demo timers (60×)
<input id="demo" type="checkbox" />
</label>
<button id="reset" class="ghost">Reset kitchen</button>
<div id="progress-wrap">
<div id="progress-bar"></div>
<span id="progress-text"></span>
</div>
</div>
<div id="stage">
<section id="left">
<canvas id="scene" width="640" height="440"></canvas>
<div id="now">
<div id="now-title"></div>
<div id="timer-box">
<span id="timer-display">--:--</span>
<button id="timer-btn">Start timer</button>
</div>
</div>
<div id="ingredients">
<h2>Indkøb — shopping list</h2>
<ul id="ing-list"></ul>
</div>
</section>
<section id="steps-col">
<ol id="steps"></ol>
</section>
</div>
<footer>Bedstemors recipe, more or less. Which means it is yours now. <span class="da">Velbekomme!</span></footer>
<div id="win" hidden>
<div id="win-card">
<h2>Middagen er klar!</h2>
<p>Ten steps, one roast, zero shortcuts. The crackling cracked — Grandma would nod.</p>
<button id="win-close">Back to the kitchen</button>
</div>
</div>
`;var P=document.getElementById(`scene`),F=P.getContext(`2d`);if(!F)throw Error(`canvas 2d unavailable`);var I=Math.min(2,window.devicePixelRatio||1);P.width=640*I,P.height=440*I;var L=document.getElementById(`servings`),R=document.getElementById(`servings-val`),z=document.getElementById(`demo`),B=document.getElementById(`reset`),V=document.getElementById(`progress-bar`),H=document.getElementById(`progress-text`),U=document.getElementById(`now-title`),W=document.getElementById(`timer-display`),G=document.getElementById(`timer-btn`),K=document.getElementById(`timer-box`),ue=document.getElementById(`ing-list`),de=document.getElementById(`steps`),q=document.getElementById(`win`),fe=document.getElementById(`win-close`),J=[];function pe(e){let t=Math.max(0,Math.ceil(e)),n=Math.floor(t/60),r=t%60;return`${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`}function me(e,t){let n=document.createElement(`li`);n.className=`step`;let r=document.createElement(`div`);r.className=`step-head`;let i=document.createElement(`span`);i.className=`num`,i.textContent=String(t+1);let a=document.createElement(`div`);a.className=`ttl`;let o=document.createElement(`strong`);o.textContent=e.title;let s=document.createElement(`span`);if(s.className=`da`,s.textContent=e.danish,a.append(o,s),r.append(i,a),e.minutes>0){let t=document.createElement(`span`);t.className=`mins`,t.textContent=e.minutes>=60?`${(e.minutes/60).toFixed(e.minutes%60==0?0:1)} h`:`${e.minutes} min`,r.append(t)}let c=document.createElement(`input`);c.type=`checkbox`,c.className=`done`,c.checked=A.done[t]===!0,c.title=`Mark step done`,r.append(c);let l=document.createElement(`p`);return l.className=`step-text`,l.textContent=e.text,n.append(r,l),n.addEventListener(`click`,e=>{e.target.closest(`.done`)||Y(t)}),c.addEventListener(`change`,()=>{A.done[t]=c.checked,n.classList.toggle(`is-done`,c.checked),c.checked&&A.done.every(Boolean)&&ge(),M(),Z()}),n.classList.toggle(`is-done`,c.checked),n}i.forEach((e,t)=>{let n=me(e,t),r=n.querySelector(`.done`);J.push({li:n,check:r}),de.append(n)});function Y(e){A.current=e,J.forEach((t,n)=>t.li.classList.toggle(`active`,n===e)),J[e].li.scrollIntoView({block:`nearest`,behavior:`smooth`}),he(),M()}function he(){let e=i[A.current];U.innerHTML=`<strong>${e.title}</strong> <span class="da">${e.danish}</span>`,e.minutes===0?(K.classList.add(`no-timer`),W.textContent=`no timer`,G.disabled=!0,G.textContent=`eyeball it`):(K.classList.remove(`no-timer`),j.step!==A.current&&(j.step=A.current,j.remaining=e.minutes*60,j.running=!1,j.finished=!1),G.disabled=!1,X())}function X(){i[A.current].minutes!==0&&(j.finished?(W.textContent=`færdig!`,G.textContent=`Restart`):(W.textContent=pe(j.remaining),G.textContent=j.running?`Pause`:`Start timer`),W.classList.toggle(`running`,j.running),W.classList.toggle(`demo`,A.demo))}G.addEventListener(`click`,()=>{let e=i[A.current];e.minutes!==0&&(j.finished&&=(j.remaining=e.minutes*60,!1),j.running=!j.running,X())}),setInterval(()=>{j.running&&(j.remaining-=.2*(A.demo?ce:1),j.remaining<=0&&(j.remaining=0,j.running=!1,j.finished=!0,J[j.step]?.li.classList.add(`ding`),setTimeout(()=>J[j.step]?.li.classList.remove(`ding`),4e3)),X())},200);function Z(){let e=A.done.filter(Boolean).length;V.style.width=`${e/i.length*100}%`,H.textContent=`${e} / ${i.length} steps`}function Q(){R.textContent=String(A.servings),ue.replaceChildren(...a.map(e=>{let t=document.createElement(`li`);t.textContent=o(e,A.servings);let n=document.createElement(`span`);return n.className=`ing-step`,n.textContent=`step ${e.step}`,t.append(n),t}))}L.value=String(A.servings),z.checked=A.demo,L.addEventListener(`input`,()=>{A.servings=Number(L.value),Q(),M()}),z.addEventListener(`change`,()=>{A.demo=z.checked,X(),M()}),B.addEventListener(`click`,()=>{localStorage.removeItem(k),location.reload()}),fe.addEventListener(`click`,()=>{q.hidden=!0});function ge(){q.hidden=!1;let e=[`#b8232f`,`#d9a441`,`#5a8f5a`,`#f6ecd6`,`#6d3560`];for(let t=0;t<70;t++){let n=document.createElement(`i`);n.className=`confetti`,n.style.left=`${Math.random()*100}%`,n.style.background=e[t%e.length],n.style.animationDuration=`${2+Math.random()*2.5}s`,n.style.animationDelay=`${Math.random()*1.2}s`,n.style.transform=`rotate(${Math.random()*360}deg)`,q.append(n),setTimeout(()=>n.remove(),6e3)}}document.addEventListener(`keydown`,e=>{e.key===`ArrowRight`&&Y(Math.min(i.length-1,A.current+1)),e.key===`ArrowLeft`&&Y(Math.max(0,A.current-1))});var _e=performance.now();function $(e){let t=(e-_e)/1e3;F.save(),F.scale(I,I),O(F,640,440,i[A.current].phase,t,j.running),F.restore(),requestAnimationFrame($)}Y(A.current),Q(),Z(),requestAnimationFrame($);