inline critical CSS

This commit is contained in:
りき萌 2025-10-06 14:43:02 +02:00
parent 5304273b28
commit 6b707587ef
6 changed files with 806 additions and 832 deletions

View file

@ -2,7 +2,6 @@
import { addSpell } from "treehouse/spells.js";
import * as ulid from "treehouse/ulid.js";
import { attachTooltip, Tooltip } from "treehouse/overlay.js";
/* Branch persistence */
@ -57,22 +56,6 @@ export class Branch {
this.namedID = element.id.replace(/^b-/, "");
Branch.branchesByNamedID.set(this.namedID, element);
let permalinkButton = this.buttonBar.querySelector("a[th-p]");
if (permalinkButton != null) {
permalinkButton.title = "copy permalink";
permalinkButton.addEventListener("click", (event) => {
event.preventDefault(); // do not navigate the link
navigator.clipboard.writeText(
new URL(permalinkButton.href, window.location).toString(),
);
attachTooltip(permalinkButton, () => {
let tooltip = new Tooltip(permalinkButton, "left");
tooltip.append("permalink copied to clipboard!");
return tooltip;
}).show();
});
}
// Adjust dates to fit the user's time zone.
let timestamp = null;
if (element.hasAttribute("th-ts")) {