Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (54 sloc) 1.99 KB
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
<link rel="apple-touch-icon-precomposed" href="/favicon-152.png">
<meta name="msapplication-TileColor" content="#F9C72F">
<meta name="msapplication-TileImage" content="/favicon-152.png">
<script>
"use strict";
function getCookie(name) {
const cookies = document.cookie.split(";").map(it => it.trim().split("="));
for (let i = 0; i < cookies.length; i++) {
if (cookies[i][0] == name) {
return cookies[i][1];
}
}
return null;
}
function setCookie(name, val) {
const cookies = document.cookie.split(";").map(it => it.trim().split("="));
for (let i = 0; i < cookies.length; i++) {
if (cookies[i][0] == name) {
cookies[i][1] = val;
document.cookie = cookies.map(it => it.join("=") + ";").join("");
return;
}
}
document.cookie = `${name}=${val};` + document.cookie;
}
function removeCookie(name) {
document.cookie = document.cookie
.split(";")
.map(it => it.trim().split("="))
.filter(it => it[0] != name)
.map(it => it.join("=") + ";")
.join("");
}
(() => {
let theme = getCookie("theme");
if (theme == null) {
theme = "light";
setCookie("theme", "light");
}
document.write(`<link rel="stylesheet" href="/css/${theme}.css">`);
})();
</script>
<noscript>
<link rel="stylesheet" href="/css/light.css">
</noscript>
</head>