overhaul. blog taken down. links to Ebba
This commit is contained in:
parent
1b1f403f8d
commit
9a062fd815
37 changed files with 5416 additions and 982 deletions
429
docs/food.html
429
docs/food.html
|
|
@ -2,7 +2,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" lang="da" xml:lang="da"><head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="generator" content="quarto-1.3.450">
|
||||
<meta name="generator" content="quarto-1.4.554">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
|
||||
|
|
@ -51,7 +51,13 @@ ul.task-list li input[type="checkbox"] {
|
|||
"collapse-after": 3,
|
||||
"panel-placement": "end",
|
||||
"type": "overlay",
|
||||
"limit": 20,
|
||||
"limit": 50,
|
||||
"keyboard-shortcut": [
|
||||
"f",
|
||||
"/",
|
||||
"s"
|
||||
],
|
||||
"show-item-context": false,
|
||||
"language": {
|
||||
"search-no-results-text": "Ingen resultater",
|
||||
"search-matching-documents-text": "Matchende dokumenter",
|
||||
|
|
@ -60,6 +66,7 @@ ul.task-list li input[type="checkbox"] {
|
|||
"search-more-match-text": "andet resultat i dette dokument",
|
||||
"search-more-matches-text": "andre resultater i dette dokument",
|
||||
"search-clear-button-title": "Ryd",
|
||||
"search-text-placeholder": "",
|
||||
"search-detached-cancel-button-title": "Fortryd",
|
||||
"search-submit-button-title": "Indsend",
|
||||
"search-label": "Søg"
|
||||
|
|
@ -99,6 +106,33 @@ ul.task-list li input[type="checkbox"] {
|
|||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
const typesetMath = (el) => {
|
||||
if (window.MathJax) {
|
||||
// MathJax Typeset
|
||||
window.MathJax.typeset([el]);
|
||||
} else if (window.katex) {
|
||||
// KaTeX Render
|
||||
var mathElements = el.getElementsByClassName("math");
|
||||
var macros = [];
|
||||
for (var i = 0; i < mathElements.length; i++) {
|
||||
var texText = mathElements[i].firstChild;
|
||||
if (mathElements[i].tagName == "SPAN") {
|
||||
window.katex.render(texText.data, mathElements[i], {
|
||||
displayMode: mathElements[i].classList.contains('display'),
|
||||
throwOnError: false,
|
||||
macros: macros,
|
||||
fleqn: false
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
window.Quarto = {
|
||||
typesetMath
|
||||
};
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
|
||||
|
|
@ -106,9 +140,9 @@ ul.task-list li input[type="checkbox"] {
|
|||
|
||||
<div id="quarto-search-results"></div>
|
||||
<header id="quarto-header" class="headroom fixed-top">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark ">
|
||||
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
|
||||
<div class="navbar-container container-fluid">
|
||||
<div class="navbar-brand-container">
|
||||
<div class="navbar-brand-container mx-auto">
|
||||
<a class="navbar-brand" href="./index.html">
|
||||
<span class="navbar-title">Familien G Damsbo</span>
|
||||
</a>
|
||||
|
|
@ -120,28 +154,28 @@ ul.task-list li input[type="checkbox"] {
|
|||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
<ul class="navbar-nav navbar-nav-scroll me-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="./index.html" rel="" target="">
|
||||
<span class="menu-text">Start</span></a>
|
||||
<a class="nav-link" href="./index.html">
|
||||
<span class="menu-text">Start</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="./food.html" rel="" target="" aria-current="page">
|
||||
<span class="menu-text">Opskrifter</span></a>
|
||||
<a class="nav-link active" href="./food.html" aria-current="page">
|
||||
<span class="menu-text">Opskrifter</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="./blog.html" rel="" target="">
|
||||
<span class="menu-text">Blog</span></a>
|
||||
<a class="nav-link" href="https://ebba.gdamsbo.dk/">
|
||||
<span class="menu-text">Ebbas side</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="navbar-nav navbar-nav-scroll ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://github.com/agdamsbo/familien.gdamsbo" rel="" target="">
|
||||
<span class="menu-text">Kildekode</span></a>
|
||||
<a class="nav-link" href="https://github.com/agdamsbo/familien.gdamsbo">
|
||||
<span class="menu-text">Kildekode</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="quarto-navbar-tools">
|
||||
</div> <!-- /navcollapse -->
|
||||
<div class="quarto-navbar-tools">
|
||||
<a href="" class="quarto-color-scheme-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleColorScheme(); return false;" title="Skift mørk tilstand"><i class="bi"></i></a>
|
||||
</div>
|
||||
</div> <!-- /navcollapse -->
|
||||
</div> <!-- /container-fluid -->
|
||||
</nav>
|
||||
</header>
|
||||
|
|
@ -151,7 +185,7 @@ ul.task-list li input[type="checkbox"] {
|
|||
<!-- margin-sidebar -->
|
||||
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
|
||||
|
||||
<h5 class="quarto-listing-category-title">Kategorier</h5><div class="quarto-listing-category category-default"><div class="category" data-category="">Alle <span class="quarto-category-count">(5)</span></div><div class="category" data-category="Bagværk">Bagværk <span class="quarto-category-count">(3)</span></div><div class="category" data-category="Brød">Brød <span class="quarto-category-count">(2)</span></div><div class="category" data-category="Børnene med!">Børnene med! <span class="quarto-category-count">(3)</span></div><div class="category" data-category="Dansk">Dansk <span class="quarto-category-count">(1)</span></div><div class="category" data-category="Forår">Forår <span class="quarto-category-count">(1)</span></div><div class="category" data-category="Kage">Kage <span class="quarto-category-count">(2)</span></div><div class="category" data-category="Sødt">Sødt <span class="quarto-category-count">(1)</span></div></div></div>
|
||||
<h5 class="quarto-listing-category-title">Kategorier</h5><div class="quarto-listing-category category-default"><div class="category" data-category="">Alle <span class="quarto-category-count">(6)</span></div><div class="category" data-category="Bagværk">Bagværk <span class="quarto-category-count">(4)</span></div><div class="category" data-category="Brød">Brød <span class="quarto-category-count">(3)</span></div><div class="category" data-category="Børnene med!">Børnene med! <span class="quarto-category-count">(3)</span></div><div class="category" data-category="Dansk">Dansk <span class="quarto-category-count">(1)</span></div><div class="category" data-category="Forår">Forår <span class="quarto-category-count">(1)</span></div><div class="category" data-category="Kage">Kage <span class="quarto-category-count">(2)</span></div><div class="category" data-category="Sødt">Sødt <span class="quarto-category-count">(1)</span></div></div></div>
|
||||
<!-- main -->
|
||||
<main class="content" id="quarto-document-content">
|
||||
|
||||
|
|
@ -170,8 +204,10 @@ ul.task-list li input[type="checkbox"] {
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="topbr">
|
||||
<p>Vi er glade for at lave mad, og vi øver os i at have børnene med.</p>
|
||||
<p>Her deler vi nogle af vores yndlingsopskrifter. Så kan vi selv finde dem, og de kan deles.</p>
|
||||
|
|
@ -183,19 +219,55 @@ ul.task-list li input[type="checkbox"] {
|
|||
|
||||
<div class="quarto-listing quarto-listing-container-default" id="listing-listing">
|
||||
<div class="list quarto-listing-default">
|
||||
<div class="quarto-post image-right" data-index="0" data-categories="Sødt,Børnene med!" data-listing-date-sort="1687903200000" data-listing-file-modified-sort="1689099570381" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1">
|
||||
<div class="quarto-post image-right" data-index="0" data-categories="Bagværk,Brød" data-listing-date-sort="1718920800000" data-listing-file-modified-sort="1718975948377" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="3" data-listing-word-count-sort="402">
|
||||
<div class="thumbnail">
|
||||
<p><a href="./food/hyldesaft.html"> <div class="listing-item-img-placeholder card-img-top" > </div> </a></p>
|
||||
<p><a href="./food/rugbrød-i-træramme.html" class="no-external"></a></p><a href="./food/rugbrød-i-træramme.html" class="no-external">
|
||||
<div class="listing-item-img-placeholder card-img-top" > </div>
|
||||
</a><p><a href="./food/rugbrød-i-træramme.html" class="no-external"></a></p>
|
||||
</div>
|
||||
<div class="body">
|
||||
<a href="./food/hyldesaft.html">
|
||||
<h3 class="no-anchor listing-title">
|
||||
Hyldesaft
|
||||
<a href="./food/rugbrød-i-træramme.html" class="no-external">Rugbrødsopskrift til træramme</a>
|
||||
</h3>
|
||||
<div class="listing-subtitle">
|
||||
|
||||
<a href="./food/rugbrød-i-træramme.html" class="no-external"></a>
|
||||
</div>
|
||||
<div class="listing-categories">
|
||||
<div class="listing-category" onclick="window.quartoListingCategory('Bagværk'); return false;">
|
||||
Bagværk
|
||||
</div>
|
||||
<div class="listing-category" onclick="window.quartoListingCategory('Brød'); return false;">
|
||||
Brød
|
||||
</div>
|
||||
</div>
|
||||
<div class="listing-description">
|
||||
<a href="./food/rugbrød-i-træramme.html" class="no-external">Vi har skiftet de gamle brødforme ud med trærammer. Rugbrødsopskriften er let revideret. Det er blevet en vane, så det virker!</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="metadata">
|
||||
<a href="./food/rugbrød-i-træramme.html" class="no-external">
|
||||
<div class="listing-date">
|
||||
21. jun. 2024
|
||||
</div>
|
||||
<div class="listing-author">
|
||||
Andreas
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="quarto-post image-right" data-index="1" data-categories="Sødt,Børnene med!" data-listing-date-sort="1687903200000" data-listing-file-modified-sort="1689099570381" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="95">
|
||||
<div class="thumbnail">
|
||||
<p><a href="./food/hyldesaft.html" class="no-external"></a></p><a href="./food/hyldesaft.html" class="no-external">
|
||||
<div class="listing-item-img-placeholder card-img-top" > </div>
|
||||
</a><p><a href="./food/hyldesaft.html" class="no-external"></a></p>
|
||||
</div>
|
||||
<div class="body">
|
||||
<h3 class="no-anchor listing-title">
|
||||
<a href="./food/hyldesaft.html" class="no-external">Hyldesaft</a>
|
||||
</h3>
|
||||
<div class="listing-subtitle">
|
||||
<a href="./food/hyldesaft.html" class="no-external"></a>
|
||||
</div>
|
||||
<div class="listing-categories">
|
||||
<div class="listing-category" onclick="window.quartoListingCategory('Sødt'); return false;">
|
||||
Sødt
|
||||
|
|
@ -204,14 +276,12 @@ Sødt
|
|||
Børnene med!
|
||||
</div>
|
||||
</div>
|
||||
<a href="./food/hyldesaft.html">
|
||||
<div class="listing-description">
|
||||
<p>En klassiker i juni.</p>
|
||||
<a href="./food/hyldesaft.html" class="no-external">En klassiker i juni.</a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="metadata">
|
||||
<a href="./food/hyldesaft.html">
|
||||
<a href="./food/hyldesaft.html" class="no-external">
|
||||
<div class="listing-date">
|
||||
28. jun. 2023
|
||||
</div>
|
||||
|
|
@ -221,19 +291,19 @@ Andreas
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="quarto-post image-right" data-index="1" data-categories="Kage,Bagværk,Børnene med!,Dansk" data-listing-date-sort="1682632800000" data-listing-file-modified-sort="1687767650309" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1">
|
||||
<div class="quarto-post image-right" data-index="2" data-categories="Kage,Bagværk,Børnene med!,Dansk" data-listing-date-sort="1682632800000" data-listing-file-modified-sort="1687767650309" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="170">
|
||||
<div class="thumbnail">
|
||||
<p><a href="./food/banankage.html"> <div class="listing-item-img-placeholder card-img-top" > </div> </a></p>
|
||||
<p><a href="./food/banankage.html" class="no-external"></a></p><a href="./food/banankage.html" class="no-external">
|
||||
<div class="listing-item-img-placeholder card-img-top" > </div>
|
||||
</a><p><a href="./food/banankage.html" class="no-external"></a></p>
|
||||
</div>
|
||||
<div class="body">
|
||||
<a href="./food/banankage.html">
|
||||
<h3 class="no-anchor listing-title">
|
||||
Super nem banankage
|
||||
<a href="./food/banankage.html" class="no-external">Super nem banankage</a>
|
||||
</h3>
|
||||
<div class="listing-subtitle">
|
||||
|
||||
<a href="./food/banankage.html" class="no-external"></a>
|
||||
</div>
|
||||
</a>
|
||||
<div class="listing-categories">
|
||||
<div class="listing-category" onclick="window.quartoListingCategory('Kage'); return false;">
|
||||
Kage
|
||||
|
|
@ -248,33 +318,31 @@ Børnene med!
|
|||
Dansk
|
||||
</div>
|
||||
</div>
|
||||
<a href="./food/banankage.html">
|
||||
<div class="listing-description">
|
||||
<p>Der er aldrig nok banan i banankage. Sådan er det ikke her!</p>
|
||||
<a href="./food/banankage.html" class="no-external">Der er aldrig nok banan i banankage. Sådan er det ikke her!</a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="metadata">
|
||||
<a href="./food/banankage.html">
|
||||
<a href="./food/banankage.html" class="no-external">
|
||||
<div class="listing-date">
|
||||
28. apr. 2023
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="quarto-post image-right" data-index="2" data-categories="Kage,Forår,Børnene med!" data-listing-date-sort="1677970800000" data-listing-file-modified-sort="1689099570380" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1">
|
||||
<div class="quarto-post image-right" data-index="3" data-categories="Kage,Forår,Børnene med!" data-listing-date-sort="1677970800000" data-listing-file-modified-sort="1689099570380" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="159">
|
||||
<div class="thumbnail">
|
||||
<p><a href="./food/elses_vafler.html"> <div class="listing-item-img-placeholder card-img-top" > </div> </a></p>
|
||||
<p><a href="./food/elses_vafler.html" class="no-external"></a></p><a href="./food/elses_vafler.html" class="no-external">
|
||||
<div class="listing-item-img-placeholder card-img-top" > </div>
|
||||
</a><p><a href="./food/elses_vafler.html" class="no-external"></a></p>
|
||||
</div>
|
||||
<div class="body">
|
||||
<a href="./food/elses_vafler.html">
|
||||
<h3 class="no-anchor listing-title">
|
||||
Elses vafler
|
||||
<a href="./food/elses_vafler.html" class="no-external">Elses vafler</a>
|
||||
</h3>
|
||||
<div class="listing-subtitle">
|
||||
|
||||
<a href="./food/elses_vafler.html" class="no-external"></a>
|
||||
</div>
|
||||
</a>
|
||||
<div class="listing-categories">
|
||||
<div class="listing-category" onclick="window.quartoListingCategory('Kage'); return false;">
|
||||
Kage
|
||||
|
|
@ -286,14 +354,12 @@ Forår
|
|||
Børnene med!
|
||||
</div>
|
||||
</div>
|
||||
<a href="./food/elses_vafler.html">
|
||||
<div class="listing-description">
|
||||
<p>Verdens bedste vafler. Punktum.</p>
|
||||
<a href="./food/elses_vafler.html" class="no-external">Verdens bedste vafler. Punktum.</a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="metadata">
|
||||
<a href="./food/elses_vafler.html">
|
||||
<a href="./food/elses_vafler.html" class="no-external">
|
||||
<div class="listing-date">
|
||||
5. mar. 2023
|
||||
</div>
|
||||
|
|
@ -303,19 +369,19 @@ Andreas
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="quarto-post image-right" data-index="3" data-categories="Bagværk,Brød" data-listing-date-sort="1663797600000" data-listing-file-modified-sort="1689099570381" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
|
||||
<div class="quarto-post image-right" data-index="4" data-categories="Bagværk,Brød" data-listing-date-sort="1663797600000" data-listing-file-modified-sort="1689099570381" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2" data-listing-word-count-sort="323">
|
||||
<div class="thumbnail">
|
||||
<p><a href="./food/rugbrød.html"> <div class="listing-item-img-placeholder card-img-top" > </div> </a></p>
|
||||
<p><a href="./food/rugbrød.html" class="no-external"></a></p><a href="./food/rugbrød.html" class="no-external">
|
||||
<div class="listing-item-img-placeholder card-img-top" > </div>
|
||||
</a><p><a href="./food/rugbrød.html" class="no-external"></a></p>
|
||||
</div>
|
||||
<div class="body">
|
||||
<a href="./food/rugbrød.html">
|
||||
<h3 class="no-anchor listing-title">
|
||||
Rugbrød
|
||||
<a href="./food/rugbrød.html" class="no-external">Rugbrød</a>
|
||||
</h3>
|
||||
<div class="listing-subtitle">
|
||||
|
||||
<a href="./food/rugbrød.html" class="no-external"></a>
|
||||
</div>
|
||||
</a>
|
||||
<div class="listing-categories">
|
||||
<div class="listing-category" onclick="window.quartoListingCategory('Bagværk'); return false;">
|
||||
Bagværk
|
||||
|
|
@ -324,33 +390,31 @@ Bagværk
|
|||
Brød
|
||||
</div>
|
||||
</div>
|
||||
<a href="./food/rugbrød.html">
|
||||
<div class="listing-description">
|
||||
<p>Vores hverdagsrugbrød. Det er blevet en vane, så det virker!</p>
|
||||
<a href="./food/rugbrød.html" class="no-external">Vores hverdagsrugbrød. Det er blevet en vane, så det virker!</a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="metadata">
|
||||
<a href="./food/rugbrød.html">
|
||||
<a href="./food/rugbrød.html" class="no-external">
|
||||
<div class="listing-date">
|
||||
22. sep. 2022
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="quarto-post image-right" data-index="4" data-categories="Bagværk,Brød" data-listing-date-sort="1663797600000" data-listing-file-modified-sort="1689099570382" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1">
|
||||
<div class="quarto-post image-right" data-index="5" data-categories="Bagværk,Brød" data-listing-date-sort="1663797600000" data-listing-file-modified-sort="1689099570382" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="163">
|
||||
<div class="thumbnail">
|
||||
<p><a href="./food/surdej.html"> <div class="listing-item-img-placeholder card-img-top" > </div> </a></p>
|
||||
<p><a href="./food/surdej.html" class="no-external"></a></p><a href="./food/surdej.html" class="no-external">
|
||||
<div class="listing-item-img-placeholder card-img-top" > </div>
|
||||
</a><p><a href="./food/surdej.html" class="no-external"></a></p>
|
||||
</div>
|
||||
<div class="body">
|
||||
<a href="./food/surdej.html">
|
||||
<h3 class="no-anchor listing-title">
|
||||
Surdej
|
||||
<a href="./food/surdej.html" class="no-external">Surdej</a>
|
||||
</h3>
|
||||
<div class="listing-subtitle">
|
||||
|
||||
<a href="./food/surdej.html" class="no-external"></a>
|
||||
</div>
|
||||
</a>
|
||||
<div class="listing-categories">
|
||||
<div class="listing-category" onclick="window.quartoListingCategory('Bagværk'); return false;">
|
||||
Bagværk
|
||||
|
|
@ -359,14 +423,12 @@ Bagværk
|
|||
Brød
|
||||
</div>
|
||||
</div>
|
||||
<a href="./food/surdej.html">
|
||||
<div class="listing-description">
|
||||
<p>Det er ikke så svært endda.</p>
|
||||
<a href="./food/surdej.html" class="no-external">Det er ikke så svært endda.</a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="metadata">
|
||||
<a href="./food/surdej.html">
|
||||
<a href="./food/surdej.html" class="no-external">
|
||||
<div class="listing-date">
|
||||
22. sep. 2022
|
||||
</div>
|
||||
|
|
@ -421,6 +483,33 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
|||
}
|
||||
}
|
||||
}
|
||||
const toggleGiscusIfUsed = (isAlternate, darkModeDefault) => {
|
||||
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
|
||||
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
|
||||
let newTheme = '';
|
||||
if(darkModeDefault) {
|
||||
newTheme = isAlternate ? baseTheme : alternateTheme;
|
||||
} else {
|
||||
newTheme = isAlternate ? alternateTheme : baseTheme;
|
||||
}
|
||||
const changeGiscusTheme = () => {
|
||||
// From: https://github.com/giscus/giscus/issues/336
|
||||
const sendMessage = (message) => {
|
||||
const iframe = document.querySelector('iframe.giscus-frame');
|
||||
if (!iframe) return;
|
||||
iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app');
|
||||
}
|
||||
sendMessage({
|
||||
setConfig: {
|
||||
theme: newTheme
|
||||
}
|
||||
});
|
||||
}
|
||||
const isGiscussLoaded = window.document.querySelector('iframe.giscus-frame') !== null;
|
||||
if (isGiscussLoaded) {
|
||||
changeGiscusTheme();
|
||||
}
|
||||
}
|
||||
const toggleColorMode = (alternate) => {
|
||||
// Switch the stylesheets
|
||||
const alternateStylesheets = window.document.querySelectorAll('link.quarto-color-scheme.quarto-color-alternate');
|
||||
|
|
@ -487,13 +576,15 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
|||
return localAlternateSentinel;
|
||||
}
|
||||
}
|
||||
let localAlternateSentinel = 'alternate';
|
||||
const darkModeDefault = true;
|
||||
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
|
||||
// Dark / light mode switch
|
||||
window.quartoToggleColorScheme = () => {
|
||||
// Read the current dark / light value
|
||||
let toAlternate = !hasAlternateSentinel();
|
||||
toggleColorMode(toAlternate);
|
||||
setStyleSentinel(toAlternate);
|
||||
toggleGiscusIfUsed(toAlternate, darkModeDefault);
|
||||
};
|
||||
// Ensure there is a toggle, if there isn't float one in the top right
|
||||
if (window.document.querySelector('.quarto-color-scheme-toggle') === null) {
|
||||
|
|
@ -572,10 +663,32 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
|||
// clear code selection
|
||||
e.clearSelection();
|
||||
});
|
||||
function tippyHover(el, contentFn) {
|
||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||
var mailtoRegex = new RegExp(/^mailto:/);
|
||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
||||
var isInternal = (href) => {
|
||||
return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
|
||||
}
|
||||
// Inspect non-navigation links and adorn them if external
|
||||
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
|
||||
for (var i=0; i<links.length; i++) {
|
||||
const link = links[i];
|
||||
if (!isInternal(link.href)) {
|
||||
// undo the damage that might have been done by quarto-nav.js in the case of
|
||||
// links that we want to consider external
|
||||
if (link.dataset.originalHref !== undefined) {
|
||||
link.href = link.dataset.originalHref;
|
||||
}
|
||||
// target, if specified
|
||||
link.setAttribute("target", "_blank");
|
||||
if (link.getAttribute("rel") === null) {
|
||||
link.setAttribute("rel", "noopener");
|
||||
}
|
||||
}
|
||||
}
|
||||
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
|
||||
const config = {
|
||||
allowHTML: true,
|
||||
content: contentFn,
|
||||
maxWidth: 500,
|
||||
delay: 100,
|
||||
arrow: false,
|
||||
|
|
@ -585,8 +698,17 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
|||
interactive: true,
|
||||
interactiveBorder: 10,
|
||||
theme: 'quarto',
|
||||
placement: 'bottom-start'
|
||||
placement: 'bottom-start',
|
||||
};
|
||||
if (contentFn) {
|
||||
config.content = contentFn;
|
||||
}
|
||||
if (onTriggerFn) {
|
||||
config.onTrigger = onTriggerFn;
|
||||
}
|
||||
if (onUntriggerFn) {
|
||||
config.onUntrigger = onUntriggerFn;
|
||||
}
|
||||
window.tippy(el, config);
|
||||
}
|
||||
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
|
||||
|
|
@ -598,7 +720,130 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
|||
try { href = new URL(href).hash; } catch {}
|
||||
const id = href.replace(/^#\/?/, "");
|
||||
const note = window.document.getElementById(id);
|
||||
return note.innerHTML;
|
||||
if (note) {
|
||||
return note.innerHTML;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
});
|
||||
}
|
||||
const xrefs = window.document.querySelectorAll('a.quarto-xref');
|
||||
const processXRef = (id, note) => {
|
||||
// Strip column container classes
|
||||
const stripColumnClz = (el) => {
|
||||
el.classList.remove("page-full", "page-columns");
|
||||
if (el.children) {
|
||||
for (const child of el.children) {
|
||||
stripColumnClz(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
stripColumnClz(note)
|
||||
if (id === null || id.startsWith('sec-')) {
|
||||
// Special case sections, only their first couple elements
|
||||
const container = document.createElement("div");
|
||||
if (note.children && note.children.length > 2) {
|
||||
container.appendChild(note.children[0].cloneNode(true));
|
||||
for (let i = 1; i < note.children.length; i++) {
|
||||
const child = note.children[i];
|
||||
if (child.tagName === "P" && child.innerText === "") {
|
||||
continue;
|
||||
} else {
|
||||
container.appendChild(child.cloneNode(true));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (window.Quarto?.typesetMath) {
|
||||
window.Quarto.typesetMath(container);
|
||||
}
|
||||
return container.innerHTML
|
||||
} else {
|
||||
if (window.Quarto?.typesetMath) {
|
||||
window.Quarto.typesetMath(note);
|
||||
}
|
||||
return note.innerHTML;
|
||||
}
|
||||
} else {
|
||||
// Remove any anchor links if they are present
|
||||
const anchorLink = note.querySelector('a.anchorjs-link');
|
||||
if (anchorLink) {
|
||||
anchorLink.remove();
|
||||
}
|
||||
if (window.Quarto?.typesetMath) {
|
||||
window.Quarto.typesetMath(note);
|
||||
}
|
||||
// TODO in 1.5, we should make sure this works without a callout special case
|
||||
if (note.classList.contains("callout")) {
|
||||
return note.outerHTML;
|
||||
} else {
|
||||
return note.innerHTML;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var i=0; i<xrefs.length; i++) {
|
||||
const xref = xrefs[i];
|
||||
tippyHover(xref, undefined, function(instance) {
|
||||
instance.disable();
|
||||
let url = xref.getAttribute('href');
|
||||
let hash = undefined;
|
||||
if (url.startsWith('#')) {
|
||||
hash = url;
|
||||
} else {
|
||||
try { hash = new URL(url).hash; } catch {}
|
||||
}
|
||||
if (hash) {
|
||||
const id = hash.replace(/^#\/?/, "");
|
||||
const note = window.document.getElementById(id);
|
||||
if (note !== null) {
|
||||
try {
|
||||
const html = processXRef(id, note.cloneNode(true));
|
||||
instance.setContent(html);
|
||||
} finally {
|
||||
instance.enable();
|
||||
instance.show();
|
||||
}
|
||||
} else {
|
||||
// See if we can fetch this
|
||||
fetch(url.split('#')[0])
|
||||
.then(res => res.text())
|
||||
.then(html => {
|
||||
const parser = new DOMParser();
|
||||
const htmlDoc = parser.parseFromString(html, "text/html");
|
||||
const note = htmlDoc.getElementById(id);
|
||||
if (note !== null) {
|
||||
const html = processXRef(id, note);
|
||||
instance.setContent(html);
|
||||
}
|
||||
}).finally(() => {
|
||||
instance.enable();
|
||||
instance.show();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// See if we can fetch a full url (with no hash to target)
|
||||
// This is a special case and we should probably do some content thinning / targeting
|
||||
fetch(url)
|
||||
.then(res => res.text())
|
||||
.then(html => {
|
||||
const parser = new DOMParser();
|
||||
const htmlDoc = parser.parseFromString(html, "text/html");
|
||||
const note = htmlDoc.querySelector('main.content');
|
||||
if (note !== null) {
|
||||
// This should only happen for chapter cross references
|
||||
// (since there is no id in the URL)
|
||||
// remove the first header
|
||||
if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
|
||||
note.children[0].remove();
|
||||
}
|
||||
const html = processXRef(null, note);
|
||||
instance.setContent(html);
|
||||
}
|
||||
}).finally(() => {
|
||||
instance.enable();
|
||||
instance.show();
|
||||
});
|
||||
}
|
||||
}, function(instance) {
|
||||
});
|
||||
}
|
||||
let selectedAnnoteEl;
|
||||
|
|
@ -642,6 +887,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
|||
}
|
||||
div.style.top = top - 2 + "px";
|
||||
div.style.height = height + 4 + "px";
|
||||
div.style.left = 0;
|
||||
let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
|
||||
if (gutterDiv === null) {
|
||||
gutterDiv = window.document.createElement("div");
|
||||
|
|
@ -667,6 +913,32 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
|||
});
|
||||
selectedAnnoteEl = undefined;
|
||||
};
|
||||
// Handle positioning of the toggle
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
throttle(() => {
|
||||
elRect = undefined;
|
||||
if (selectedAnnoteEl) {
|
||||
selectCodeLines(selectedAnnoteEl);
|
||||
}
|
||||
}, 10)
|
||||
);
|
||||
function throttle(fn, ms) {
|
||||
let throttle = false;
|
||||
let timer;
|
||||
return (...args) => {
|
||||
if(!throttle) { // first call gets through
|
||||
fn.apply(this, args);
|
||||
throttle = true;
|
||||
} else { // all the others get throttled
|
||||
if(timer) clearTimeout(timer); // cancel #2
|
||||
timer = setTimeout(() => {
|
||||
fn.apply(this, args);
|
||||
timer = throttle = false;
|
||||
}, ms);
|
||||
}
|
||||
};
|
||||
}
|
||||
// Attach click handler to the DT
|
||||
const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
|
||||
for (const annoteDlNode of annoteDls) {
|
||||
|
|
@ -724,20 +996,6 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
|||
});
|
||||
}
|
||||
}
|
||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
||||
var isInternal = (href) => {
|
||||
return filterRegex.test(href) || localhostRegex.test(href);
|
||||
}
|
||||
// Inspect non-navigation links and adorn them if external
|
||||
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item)');
|
||||
for (var i=0; i<links.length; i++) {
|
||||
const link = links[i];
|
||||
if (!isInternal(link.href)) {
|
||||
// target, if specified
|
||||
link.setAttribute("target", "_blank");
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div> <!-- /content -->
|
||||
|
|
@ -746,7 +1004,9 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
|||
<div class="nav-footer-left">
|
||||
|
||||
</div>
|
||||
<div class="nav-footer-center">Lavet med <a href="https://quarto.org/">Quarto</a> i <a href="https://posit.co/download/rstudio-desktop/">RStudio</a> | <a href="LICENSE.html">Licens: CC-BY 4.0 <i class="fa-brands fa-creative-commons" aria-label="creative-commons"></i> <i class="fa-brands fa-creative-commons-by" aria-label="creative-commons-by"></i></a> | Statistik med <a href="https://analytics.gdamsbo.dk/share/DXB70SBStpd77c3Y/Familie-side">Umami</a></div>
|
||||
<div class="nav-footer-center">
|
||||
<p>Lavet med <a href="https://quarto.org/">Quarto</a> i <a href="https://posit.co/download/rstudio-desktop/">RStudio</a> | <a href="LICENSE.html">Licens: CC-BY 4.0</a> <i class="fa-brands fa-creative-commons" aria-label="creative-commons"></i> <i class="fa-brands fa-creative-commons-by" aria-label="creative-commons-by"></i> | Statistik med <a href="https://analytics.gdamsbo.dk/share/DXB70SBStpd77c3Y/Familie-side">Umami</a></p>
|
||||
</div>
|
||||
<div class="nav-footer-right">
|
||||
|
||||
</div>
|
||||
|
|
@ -755,4 +1015,5 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
|||
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue