feat: add miller document layout
This commit is contained in:
@@ -1,22 +1,58 @@
|
||||
{{ define "document.gohtml" }}{{ template "base" . }}{{ end }}
|
||||
|
||||
{{ define "document_content" }}
|
||||
<article class="document-shell" data-document-path="{{ .Path }}" data-document-hash="{{ .Hash }}">
|
||||
<div class="document-meta">
|
||||
<p class="eyebrow">{{ .Path }}</p>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ if .Tags }}
|
||||
<ul class="tag-list">
|
||||
{{ range .Tags }}
|
||||
<li><a href="/?tag={{ . }}">#{{ . }}</a></li>
|
||||
<section class="workspace-shell">
|
||||
{{ template "browser" .Browser }}
|
||||
<article class="document-shell" data-document-path="{{ .Path }}" data-document-hash="{{ .Hash }}">
|
||||
<div class="document-meta">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<dl class="meta-grid">
|
||||
<div>
|
||||
<dt>File</dt>
|
||||
<dd><code>{{ .Path }}</code></dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>Hash</dt>
|
||||
<dd><code>{{ .Hash }}</code></dd>
|
||||
</div>
|
||||
{{ if .Tags }}
|
||||
<div>
|
||||
<dt>Tags</dt>
|
||||
<dd>
|
||||
<ul class="tag-list">
|
||||
{{ range .Tags }}
|
||||
<li><a href="/?tag={{ . }}">#{{ . }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</dd>
|
||||
</div>
|
||||
{{ end }}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="markdown-body">
|
||||
{{ .HTML }}
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ define "browser" }}
|
||||
<nav class="miller-browser" aria-label="Documents">
|
||||
{{ range .Columns }}
|
||||
<section class="miller-column" aria-label="{{ .Title }}">
|
||||
<h2>{{ .Title }}</h2>
|
||||
<ul>
|
||||
{{ range .Items }}
|
||||
<li>
|
||||
<a class="{{ if .Active }}is-active{{ end }} {{ if .IsFolder }}is-folder{{ end }}" href="{{ .URL }}">
|
||||
<span>{{ .Name }}</span>
|
||||
{{ if .IsFolder }}<span aria-hidden="true">›</span>{{ end }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
<p class="hash">SHA-256: <code>{{ .Hash }}</code></p>
|
||||
</div>
|
||||
|
||||
<div class="markdown-body">
|
||||
{{ .HTML }}
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,23 +1,11 @@
|
||||
{{ define "index.gohtml" }}{{ template "base" . }}{{ end }}
|
||||
|
||||
{{ define "index_content" }}
|
||||
<section class="hero-panel">
|
||||
<p class="eyebrow">Foundation</p>
|
||||
<h1>Server-rendered Markdown, secure attachments, and a clean base for sync.</h1>
|
||||
<p class="lede">This milestone focuses on a fast read path. Documents are synchronized from the content directory into content-addressed storage and rendered to HTML on demand.</p>
|
||||
</section>
|
||||
|
||||
<section class="doc-list">
|
||||
<h2>Documents</h2>
|
||||
<ul>
|
||||
{{ range .Documents }}
|
||||
<li>
|
||||
<a href="/docs/{{ trimMd .Path }}">{{ .Title }}</a>
|
||||
<code>{{ .Path }}</code>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>No documents found.</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<section class="workspace-shell workspace-shell--empty">
|
||||
{{ template "browser" .Browser }}
|
||||
<section class="empty-preview">
|
||||
<p class="eyebrow">Documents</p>
|
||||
<h1>MD Hub Secure</h1>
|
||||
</section>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user