CSS cleanups and preparations

This commit is contained in:
りき萌 2025-10-03 16:01:58 +02:00
parent 72bddf3c9f
commit 0269ed5c60
18 changed files with 66 additions and 529 deletions

View file

@ -1,43 +0,0 @@
<!DOCTYPE html>
<html lang="en-US" prefix="og: https://ogp.me/ns#">
<head>
{{> components/_head.hbs }}
<link rel="stylesheet" href="{{ asset 'css/history.css' }}">
</head>
<body>
<span></span>
{{> components/_noscript.hbs }}
{{> components/_nav.hbs }}
{{> components/_header.hbs }}
<main class="version-history">
<p class="commit-count">{{ len page.commits }} commits</p>
<ul class="commits">
{{#each page.commits}}
<li>
<a class="revision-number" href="{{ ../config.site }}/{{ ../page.tree_path }}@{{ revision_number }}">#{{ revision_number }}</a>
<a href="{{ ../config.commit_base_url }}/{{ hash }}/content/{{ ../page.tree_path }}.tree"><code>{{ hash_short }}</code></a>
{{#if body}}
<details>
<summary class="summary">{{ summary }}</summary>
{{ body }}
</details>
{{else}}
<span class="summary">{{ summary }}</span>
{{/if}}
</li>
{{/each}}
</ul>
</main>
{{> components/_footer.hbs }}
</body>
</html>

View file

@ -11,7 +11,18 @@
<link rel="stylesheet" href="{{ asset (cat 'css/' this) }}">
{{/each}}
<script type="module">
<script type="module" async>
import "treehouse/spells.js";
import "treehouse/tree.js";
import "treehouse/ulid.js";
// We want to let the user have a selection on collapsible blocks without collapsing them when
// the user finishes marking their selection.
document.addEventListener("click", event => {
if (getSelection().type == "Range") {
event.preventDefault();
}
{{!-- Go through the import map for each script. --}}
{{#each page.scripts}}
import "{{ this }}";

View file

@ -7,11 +7,11 @@
<style>
@font-face {
font-family: "RecVar";
src: url("{{ asset 'font/Recursive_VF_1.085.woff2' }}");
src: url("{{{ asset 'font/Recursive_VF_1.085.woff2' }}}");
}
</style>
<link rel="stylesheet" href="{{ asset 'css/base.css' }}">
<link rel="stylesheet" href="{{ asset 'css/main.css' }}">
<link rel="stylesheet" href="{{ asset 'css/noncritical.css' }}">
<link rel="stylesheet" href="{{ asset 'css/icons.css' }}">
{{!--
@ -42,13 +42,6 @@ clever to do while browser vendors figure that out, we'll just have to do a cach
</script>
<script type="module" async>
import "treehouse/command-line.js";
import "treehouse/emoji.js";
import "treehouse/overlay.js";
import "treehouse/settings.js";
import "treehouse/spells.js";
import "treehouse/tree.js";
import "treehouse/ulid.js";
import "treehouse/usability.js";
</script>
<meta property="og:site_name" content="{{ config.user.title }}">

View file

@ -1,20 +0,0 @@
<noscript>
<div class="noscript" role="note">
<p>hey! looks like you have <strong>JavaScript disabled.</strong><br>
I respect that decision, but you may find the experience of browsing the treehouse… not great.<br>
for example, links to branches may not work properly. I cannot do anything about this; it's due to how
the <code>&lt;details&gt;</code> element works.<br>
(a <code>&lt;details&gt;</code> will not expand itself automatically to reveal the linked element to
you.)<br>
I did my best to at least keep the site readable in this state, but you can only do so much with plain
HTML and CSS.</p>
<p><strong>Pinky promise this website does not contain any malicious code such as trackers or cryptocurrency
miners.</strong><br>
if you don't believe me, you're free to inspect the source yourself! all the scripts are written
lovingly in vanilla JS (not minified!) by yours truly ❤️</p>
<small>and if this box is annoying, feel free to block it with uBlock Origin or something. I have no
way of remembering you closed it, and don't wanna add a database to this website. simplicity
rules!</small>
</div>
</noscript>