feat: miller column browser, offline cache, search, breadcrumbs
- Dynamic miller column sizing with flexbox layout - Root column (160px), middle slices (48px), active column (flex) - Auto-scroll browser to rightmost column on navigation - Offline indicator UI and IndexedDB cache integration - /api/documents endpoint for client-side document caching - Breadcrumb navigation in document content area - FTS5 search with SQLite virtual table - Client-side Mermaid and KaTeX rendering via CDN - Deep sample content (advanced-topics/raft-deep-dive) - Border removal (only search button keeps radius) - Full viewport layout with proper borders between sidebar/content
This commit is contained in:
@@ -1,9 +1,23 @@
|
||||
{{ define "document.gohtml" }}{{ template "base" . }}{{ end }}
|
||||
|
||||
{{ define "document_content" }}
|
||||
<section class="workspace-shell">
|
||||
<section class="workspace-shell workspace-shell--document">
|
||||
{{ template "browser" .Browser }}
|
||||
<article class="document-shell" data-document-path="{{ .Path }}" data-document-hash="{{ .Hash }}">
|
||||
<nav class="breadcrumbs" aria-label="Breadcrumb">
|
||||
<ol>
|
||||
{{ $lastIdx := sub (len .Breadcrumbs) 1 }}
|
||||
{{ range $i, $crumb := .Breadcrumbs }}
|
||||
<li>
|
||||
{{ if eq $i $lastIdx }}
|
||||
<span aria-current="page">{{ $crumb.Name }}</span>
|
||||
{{ else }}
|
||||
<a href="{{ $crumb.URL }}">{{ $crumb.Name }}</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</nav>
|
||||
<div class="document-meta">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<dl class="meta-grid">
|
||||
@@ -40,17 +54,22 @@
|
||||
{{ define "browser" }}
|
||||
<nav class="miller-browser" aria-label="Documents">
|
||||
{{ range .Columns }}
|
||||
<section class="miller-column" aria-label="{{ .Title }}">
|
||||
<h2>{{ .Title }}</h2>
|
||||
<section class="miller-column {{ if eq .Title "Content" }}miller-column--root{{ end }}" aria-label="{{ .Title }}">
|
||||
<h2 title="{{ .Title }}">
|
||||
{{ if eq .Title "Content" }}
|
||||
<span class="browser-icon browser-icon--root" aria-hidden="true"></span>
|
||||
{{ end }}
|
||||
<span class="miller-column-title-text">{{ .Title }}</span>
|
||||
</h2>
|
||||
<ul>
|
||||
{{ range .Items }}
|
||||
<li>
|
||||
<a class="{{ if .Active }}is-active{{ end }} {{ if .IsFolder }}is-folder{{ end }}" href="{{ .URL }}">
|
||||
<a class="{{ if .Active }}is-active{{ end }} {{ if .IsFolder }}is-folder{{ end }}" href="{{ .URL }}" title="{{ .Name }}">
|
||||
<span class="browser-item-label">
|
||||
<span class="browser-icon {{ if .IsFolder }}browser-icon--folder{{ else }}browser-icon--file{{ end }}" aria-hidden="true"></span>
|
||||
<span>{{ .Name }}</span>
|
||||
<span class="browser-icon {{ if .IsFolder }}browser-icon--folder{{ else }}browser-icon--page{{ end }}" aria-hidden="true"></span>
|
||||
<span class="browser-item-name">{{ .Name }}</span>
|
||||
</span>
|
||||
{{ if .IsFolder }}<span aria-hidden="true">›</span>{{ end }}
|
||||
{{ if .IsFolder }}<span class="browser-item-chevron" aria-hidden="true">›</span>{{ end }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user