-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdefault.html
More file actions
129 lines (121 loc) · 6.06 KB
/
default.html
File metadata and controls
129 lines (121 loc) · 6.06 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% if page.draft %}<meta name="robots" content="noindex,nofollow,noarchive">{% endif %}
{% seo %}
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
<!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.0/dist/katex.min.css" integrity="sha384-t5CR+zwDAROtph0PXGte6ia8heboACF9R5l/DiY+WZ3P2lxNgvJkQk5n7GPvLMYw" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.0/dist/katex.min.js" integrity="sha384-FaFLTlohFghEIZkw6VGwmf9ISTubWAVYW8tG8+w2LAIftJEULZABrF9PPFv+tVkH" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.0/dist/contrib/auto-render.min.js" integrity="sha384-bHBqxz8fokvgoJ/sc17HODNxa42TlaEhB+w8ZJXTc2nZf1VgEaFZeZvT4Mznfz0v" crossorigin="anonymous"></script>
<script defer>
document.addEventListener("DOMContentLoaded", function() {
// This is a workaround for `math_engine: mathjax` of GitHub Pages' Kramdown.
const inlines = [];
const displays = [];
for (const script of document.getElementsByTagName("script")) {
if (script.type == "math/tex") {
inlines.push(script);
} else if (script.type == "math/tex; mode=display") {
displays.push(script);
}
}
for (const script of inlines) {
// Kramdown sometimes converts `$$ ... $$` (not `$ ... $`) to `<script type="math/tex"> ... <\/script>` on local environments.
const text = "$$" + script.textContent + "$$";
script.parentNode.replaceChild(document.createTextNode(text), script);
}
for (const script of displays) {
const text = "$$" + script.textContent.replace('% <![CDATA[', '').replace('%]]>', '') + "$$";
script.parentNode.replaceChild(document.createTextNode(text), script);
}
// Use $...$ and $$...$$ for LaTeX.
const config = {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false},
{left: "\\(", right: "\\)", display: true}, // I don't know why, but Kramdown convert `$$ ... $$` to `\( ... \)` on GitHub Pages.
{left: "\\[", right: "\\]", display: true}, // Kramdown sometimes converts `$$ ... $$` to `\[ ... \]`.
],
};
renderMathInElement(document.body, config);
for (const code of document.getElementsByClassName("language-plaintext-katex")) {
renderMathInElement(code, config);
}
});
</script>
</head>
<body>
<div class="container-lg px-3 my-5 markdown-body">
<h1>
{% if page.title contains site.title %}
{{ page.title }}
{% elsif site.title %}
{% if page.algorithm.level %}<span class="rating-color-{{ page.algorithm.level }}">◉</span>{% endif %}
{{ page.title }}
<div class="mt-auto float-right">
<a class="toppage-link" href="{{ site.url | relative_url }}">{{ site.title }}</a>
</div>
{% endif %}
</h1>
<div id="staging-environment-warning" class="production-environment">
これはステージング環境です。5 秒後に自動的に本番環境 (<a href="{{ site.url }}">{{ site.url }}</a>) にリダイレクトされます。リダイレクトを抑止したい場合は <code>#noredirect</code> を付けた URL <a href="#noredirect">{{ page.url | relative_url }}#noredirect</a> を利用してください。
</div>
<script>
// Do redirect when it is a staging environment.
(function () {
if (!location.href.match("{{ site.url }}")) {
const div = document.getElementById("staging-environment-warning");
div.classList.remove("production-environment");
setTimeout(function () {
if (!location.href.match("noredirect")) {
location.href = "{{ site.url }}";
}
}, 5000);
}
})();
</script>
<main id="page-content" class="container-fluid">
{{ content }}
</main>
<script>
// Fix the internal links when it is a staging environment.
(function () {
if (!location.href.match("{{ site.url }}")) {
const main = document.getElementById("page-content");
const baseurl = location.origin + "{{ "/" | relative_url }}";
for (const a of main.getElementsByTagName("a")) {
if (new URL(baseurl).host == a.host && !a.href.startsWith(baseurl)) {
a.href = baseurl.replace(/\/$/, "") + a.pathname;
}
}
for (const img of main.getElementsByTagName("img")) {
if (new URL(baseurl).host == img.src.host && !img.src.startsWith(baseurl)) {
img.src = baseurl.replace(/\/$/, "") + img.src.pathname;
}
}
}
})();
</script>
<script>
// Update links about AtCoder IDs.
(function () {
for (const tag of document.getElementsByClassName("handle")) {
tag.classList.add("user-" + tag.textContent);
tag.href = "https://atcoder.jp/users/" + tag.textContent;
}
})();
</script>
{% if site.github.private != true and site.github.license %}
<div class="footer border-top border-gray-light mt-5 pt-3 text-right text-gray">
This site is open source. {% github_edit_link "Improve this page" %}.
</div>
{% endif %}
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
<script>anchors.add();</script>
</body>
</html>