-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.html
More file actions
42 lines (37 loc) · 1.07 KB
/
Copy pathdefault.html
File metadata and controls
42 lines (37 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
layout: compress
---
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
{% include header.html %}
<body data-theme="{{ site.mode }}">
<a class="skip-link" href="#main-content">Skip to content</a>
<script>
(function() {
const body = document.body;
const data = body.getAttribute("data-theme");
const initTheme = (state) => {
if (state === "dark") {
body.setAttribute("data-theme", "dark");
} else if (state === "light") {
body.removeAttribute("data-theme");
} else {
localStorage.setItem("theme", data);
}
};
initTheme(localStorage.getItem("theme"));
})();
</script>
{% include navbar.html %}
<div class="wrapper">
{% include breadcrumbs.html %}
{%- unless page.layout == 'home' -%}
{% include author.html %}
{%- endunless -%}
<main id="main-content" aria-label="Content">
{{ content | replace: '<img ', '<img loading="lazy" decoding="async" ' }}
</main>
{% include footer.html %}
</div>
</body>
</html>