Blog generator, publish manager, share scripts, theme CSS, highlight.js bundles, font, favicon, templates and generated-reference outputs, plus an English installation guide.
37 lines
1.8 KiB
JavaScript
37 lines
1.8 KiB
JavaScript
<script>
|
|
(function () {
|
|
var titleSvg = "api/notes/__TITLE_ICON_ID__/download";
|
|
|
|
var a = document.querySelector('#menu a[href="./ignis8"]');
|
|
if (a) {
|
|
var icon = a.querySelector(".tn-icon");
|
|
if (icon) {
|
|
var s = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
s.setAttribute("class", "tn-icon tn-image tn-image-svg");
|
|
s.setAttribute("viewBox", "0 0 420 560");
|
|
s.setAttribute("fill", "none");
|
|
s.setAttribute("stroke", "currentColor");
|
|
s.setAttribute("stroke-linecap", "round");
|
|
s.setAttribute("stroke-linejoin", "round");
|
|
s.setAttribute("aria-hidden", "true");
|
|
s.innerHTML = '<g transform="translate(7, -36)"><g transform="translate(-35, 35) scale(0.92)">' +
|
|
'<path d="M 256 120 C 200 110, 150 135, 110 155 C 95 245, 95 335, 120 395 C 145 455, 210 492, 256 507 C 302 492, 367 455, 392 395 C 417 335, 417 245, 402 155 C 362 135, 312 110, 256 120 Z" stroke-width="20"/>' +
|
|
'<path d="M 256 180 C 190 250, 150 290, 150 360 C 150 415, 190 435, 256 435 C 322 435, 362 415, 362 360 C 362 290, 322 250, 256 180 Z" stroke-width="15"/>' +
|
|
'<path d="M 256 310 C 228 310, 228 250, 256 250 C 284 250, 284 310, 256 310 C 220 310, 220 395, 256 395 C 292 395, 292 310, 256 310" stroke-width="24"/>' +
|
|
'</g></g>';
|
|
icon.replaceWith(s);
|
|
}
|
|
}
|
|
|
|
if (document.body.getAttribute("data-note-id") === "__CATEGORY_NOTE_ID__") {
|
|
var title = document.getElementById("title");
|
|
if (title) {
|
|
var t = document.createElement("img");
|
|
t.className = "title-image";
|
|
t.src = titleSvg;
|
|
t.alt = "ignis8";
|
|
title.insertBefore(t, title.firstChild);
|
|
}
|
|
}
|
|
})();
|
|
</script> |