Add notes list and integrate into templates

New partial templates/notes-list.html to render the notes list.
Add .notes-list CSS for styling and ensure contents areas use it.
Refactor site.hs: add loadNoteLinks and provide a "notes" listField
used by index and note pages.
This commit is contained in:
2026-03-24 14:56:45 +08:00
parent 71611b0641
commit 614de591ba
5 changed files with 39 additions and 11 deletions

View File

@@ -11,6 +11,7 @@ $partial("templates/head.html")$
that are big enough -->
<div id="contents-big">
<p class="mini-header">Notes <a id="up-arrow" href="/"></a></p>
$partial("templates/notes-list.html")$
<p class="mini-header">Contents <a id="up-arrow" href="#"></a></p>
$toc$
</div>
@@ -38,4 +39,4 @@ $partial("templates/head.html")$
</div>
</body>
</html>
</html>

View File

@@ -0,0 +1,7 @@
<ul class="notes-list">
$for(notes)$
<li>
<a href="$url$">$title$</a>
</li>
$endfor$
</ul>

View File

@@ -1,8 +1,2 @@
<h1 class="pagetitle">$title$</h1>
<ul>
$for(posts)$
<li>
<a href="$url$">$title$</a>
</li>
$endfor$
</ul>
$partial("templates/notes-list.html")$