mirror of
https://github.com/frainfreeze/the-monospace-web-pandoc
synced 2025-12-30 02:59:50 -08:00
115 lines
4.0 KiB
HTML
115 lines
4.0 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="generator" content="pandoc-monospace-v1.0.1" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||
$for(author-meta)$
|
||
<meta name="author" content="$author-meta$" />
|
||
$endfor$
|
||
$if(date-meta)$
|
||
<meta name="dcterms.date" content="$date-meta$" />
|
||
$endif$
|
||
$if(keywords)$
|
||
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
|
||
$endif$
|
||
$if(description-meta)$
|
||
<meta name="description" content="$description-meta$" />
|
||
$endif$
|
||
<link rel="shortcut icon" href="/files/img/favicon.ico">
|
||
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
|
||
$for(css)$
|
||
<link rel="stylesheet" href="$css$" />
|
||
$endfor$
|
||
$for(header-includes)$
|
||
$header-includes$
|
||
$endfor$
|
||
$if(math)$
|
||
$math$
|
||
$endif$
|
||
</head>
|
||
<body>
|
||
$for(include-before)$
|
||
$include-before$
|
||
$endfor$
|
||
<table class="header">
|
||
<tr>
|
||
<td colspan="2" rowspan="2" class="width-auto">
|
||
<h1 class="title">$title$</h1>
|
||
<span class="subtitle">$subtitle$</span>
|
||
</td>
|
||
<th>Version</th>
|
||
<td class="width-min">$version$</td>
|
||
</tr>
|
||
<tr>
|
||
<th>Updated</th>
|
||
<td class="width-min"><time style="white-space: pre;">$date$</time></td>
|
||
</tr>
|
||
</table>
|
||
$if(abstract)$
|
||
<div class="abstract">
|
||
<div class="abstract-title">$abstract-title$</div>
|
||
$abstract$
|
||
</div>
|
||
$endif$
|
||
$if(toc)$
|
||
<nav id="$idprefix$TOC" role="doc-toc">
|
||
$if(toc-title)$
|
||
<h2 id="$idprefix$toc-title">$toc-title$</h2>
|
||
$endif$
|
||
$table-of-contents$
|
||
</nav>
|
||
$endif$
|
||
$body$
|
||
$for(include-after)$
|
||
$include-after$
|
||
$endfor$
|
||
|
||
<table>
|
||
<tr>
|
||
<td class="width-auto">
|
||
<a style="text-decoration: none;" href="">Home</a> •
|
||
<a style="text-decoration: none;" href="/blog/index.html">Blog</a> •
|
||
<a style="text-decoration: none;" href="">©Copyright $year$</a> •
|
||
<span onclick="toggleTheme()" class="theme-toggle" title="Toggle theme">
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-sun" viewBox="0 0 16 16">
|
||
<path d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6m0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708"/>
|
||
</svg>
|
||
</span>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<script>
|
||
document.addEventListener('DOMContentLoaded', function() {
|
||
// Check for saved theme preference, otherwise use system preference
|
||
const theme = localStorage.getItem('theme') ||
|
||
(window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
||
|
||
// Apply theme
|
||
document.documentElement.setAttribute('data-theme', theme);
|
||
|
||
// Add anchor links to headers
|
||
document.querySelectorAll('h1, h2, h3, h4, h5, h6').forEach(heading => {
|
||
if (heading.id) {
|
||
const anchor = document.createElement('a');
|
||
anchor.href = '#' + heading.id;
|
||
anchor.className = 'header-anchor';
|
||
anchor.textContent = '#';
|
||
const headingText = heading.textContent || '';
|
||
anchor.setAttribute('aria-label', 'Link to header' + headingText);
|
||
heading.appendChild(anchor);
|
||
}
|
||
});
|
||
});
|
||
|
||
function toggleTheme() {
|
||
const currentTheme = document.documentElement.getAttribute('data-theme');
|
||
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
|
||
document.documentElement.setAttribute('data-theme', newTheme);
|
||
localStorage.setItem('theme', newTheme);
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|