2021-09-03 04:31:27 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
2021-09-04 00:55:29 +00:00
|
|
|
<title>{{.Post.Title}}</title>
|
|
|
|
<link rel="icon" href="data:,">
|
2022-07-07 05:05:18 +00:00
|
|
|
<link rel="stylesheet" href="_/sakura.css"/>
|
2021-09-03 04:31:27 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2022-07-07 05:05:18 +00:00
|
|
|
<a style="position: absolute; left: 1em;" href="../../">Index</a>
|
|
|
|
{{.Post.Content}}
|
2021-09-03 04:31:27 +00:00
|
|
|
</body>
|
2021-09-04 00:55:29 +00:00
|
|
|
<script>
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
for (let level = 1; level <= 4; level++) {
|
|
|
|
let elems = document.getElementsByTagName("h" + level);
|
|
|
|
for (let i = 0; i < elems.length; i++) {
|
|
|
|
let elem = elems[i];
|
|
|
|
if (elem.id !== "undefined" && elem.id !== "") {
|
|
|
|
let anchorId = elem.id + "-anchor";
|
|
|
|
elem.addEventListener("mouseover", () => {
|
|
|
|
document.getElementById(anchorId).style.display = "initial";
|
|
|
|
});
|
|
|
|
elem.addEventListener("mouseout", () => {
|
|
|
|
document.getElementById(anchorId).style.display = "none";
|
|
|
|
});
|
|
|
|
let space = document.createElement("span");
|
|
|
|
space.innerText = " ";
|
|
|
|
elem.appendChild(space)
|
|
|
|
|
|
|
|
let anchor = document.createElement("a");
|
|
|
|
anchor.id = anchorId;
|
|
|
|
anchor.href = "#" + elem.id;
|
|
|
|
anchor.innerHTML = "<small>¶</small>";
|
|
|
|
anchor.style.display = "none";
|
|
|
|
elem.appendChild(anchor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
2021-09-03 04:31:27 +00:00
|
|
|
</html>
|