possibly first working draft

This commit is contained in:
2026-02-01 16:55:40 +01:00
parent e27aadc603
commit 92a6f84540
18 changed files with 450 additions and 270 deletions

View File

@ -1,3 +1,4 @@
{{ define "base" }}
<!doctype html>
<html class="no-js" lang="en">
<head>
@ -9,4 +10,5 @@
<body>
{{ template "content" . }}
</body>
</html>
</html>
{{ end }}

View File

@ -3,6 +3,6 @@
{{ template "noteList" . }}
{{/* Markdown notes rendering area */}}
<main>
{{ .Note }}
{{ .RenderedNote }}
</main>
{{ end }}
{{ end }}

View File

@ -24,15 +24,15 @@
{{ define "renderSearch" }}
{{ if ne .SearchTerm "" }}<h2>Matching results for query '{{ .SearchTerm }}'</h2>{{ end }}
<ul class="search-results">
{{ range .Nodes }}
{{ if .IsEnd }}
<li {{ if eq .Hash $.LastActive }}class="active-note"{{ end }}>
<input type="checkbox"/>
<a href="/notes/{{ .Hash }}" data-hash="{{ .Hash }}">{{ .Title }}</a>
<span class="last-modified">{{ .LastModified }}</span>
</li>
{{ end }}
{{ end }}
{{ range .Notes }}
<li {{ if eq .ID $.LastActive }}class="active-note"{{ end }}>
<div class="note-title">
<input type="checkbox"/>
<a href="/notes/{{ .ID }}" data-hash="{{ .ID }}">{{ if ge (len .Title) 30 }}{{printf "%.30s" .Title }}[...]{{ else }} {{ .Title }}{{ end }}</a>
</div>
<span class="last-modified">{{ .GetUpdateDateRep }}</span>
</li>
{{ end }}
</ul>
{{ end }}
@ -52,4 +52,4 @@
{{ end }}
{{ end }}
</ul>
{{ end }}
{{ end }}