Working template

This commit is contained in:
2025-04-02 16:47:51 +03:00
commit c9104c0563
22 changed files with 191 additions and 0 deletions

View File

@ -0,0 +1,31 @@
{{ $re := $.File.BaseFileName }} {{ $backlinks := slice }} {{ range where
.Site.RegularPages "Type" "page" }} {{ if and (findRE $re .RawContent) (not (eq
$re .File.BaseFileName)) }} {{ $backlinks = $backlinks | append . }} {{ end }}
{{ end }} {{ if gt (len $backlinks) 0 }}
<aside>
<h3>Backlinks</h3>
<div class="backlinks">
<ul>
{{ range $backlinks }}
<li class="capitalize"><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
</div>
</aside>
{{ else }}
<aside>
<h4>No notes link to this note</h4>
</aside>
{{ end }}
<aside class="related">
{{ $related := .Site.RegularPages.Related . | complement $backlinks | first 3
-}} {{ with $related -}}
<h3>slightly related</h3>
<ul>
{{ range . -}}
<li class="capitalize"><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end -}}
</ul>
{{ end -}}
</aside>

2
layouts/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /

View File

@ -0,0 +1,16 @@
<p class="error message js-hidden">{{ i18n "js_required" }}</p>
<p class="contact-submitted status message hidden">{{ i18n "contact_submitted" }}</p>
<p class="contact-error error message hidden">{{ i18n "contact_error" }}</p>
<form class="contact-form hidden" action="#" method="post" accept-charset="UTF-8">
<label for="edit-name">{{ i18n "contact_name" }}</label>
<input type="text" id="edit-name" name="name" placeholder="{{ i18n "contact_name_placeholder" }}" tabindex="1" required autofocus><span></span>
<label for="edit-mail">{{ i18n "contact_mail" }}</label>
<input type="email" id="edit-mail" name="email" placeholder="{{ i18n "contact_mail_placeholder" }}" tabindex="2" required><span></span>
<input type="text" id="edit-url" class="hidden" name="url" placeholder="{{ i18n "contact_honypot" }}">
<label for="edit-subject">{{ i18n "contact_subject" }}</label>
<input type="text" id="edit-subject" name="subject" placeholder="{{ i18n "contact_subject_placeholder" }}" tabindex="3" required><span></span>
<label for="edit-message">{{ i18n "contact_message" }}</label>
<textarea id="edit-message" name="message" rows="5" placeholder="{{ i18n "contact_message_placeholder" }}" tabindex="4" required></textarea><span></span>
<button type="submit" name="submit" class="form-submit" disabled>{{ i18n "contact_submit" }}</button>
</form>

View File

@ -0,0 +1,3 @@
<blockquote class="hint {{ .Get 0 }}">
{{ .Inner | $.Page.RenderString }}
</blockquote>

View File

@ -0,0 +1,3 @@
<mark>
{{ .Inner | $.Page.RenderString }}
</mark>

View File

@ -0,0 +1,3 @@
<div class="caution {{ .Get 0 }}">
{{ .Inner | $.Page.RenderString }}
</div>

View File

@ -0,0 +1,3 @@
<div class="example {{ .Get 0 }}">
{{ .Inner | $.Page.RenderString }}
</div>

View File

@ -0,0 +1,3 @@
<div class="important {{ .Get 0 }}">
{{ .Inner | $.Page.RenderString }}
</div>

View File

@ -0,0 +1,3 @@
<div class="note {{ .Get 0 }}">
{{ .Inner | $.Page.RenderString }}
</div>

View File

@ -0,0 +1,3 @@
<div class="pinned {{ .Get 0 }}">
{{ .Inner | $.Page.RenderString }}
</div>

View File

@ -0,0 +1,3 @@
<blockquote class="hint {{ .Get 0 }}">
{{ .Inner | $.Page.RenderString }}
</blockquote>

View File

@ -0,0 +1,3 @@
<div class="tip {{ .Get 0 }}">
{{ .Inner | $.Page.RenderString }}
</div>

View File

@ -0,0 +1,3 @@
<div class="warning {{ .Get 0 }}">
{{ .Inner | $.Page.RenderString }}
</div>

View File

@ -0,0 +1,22 @@
<p class="error message js-hidden">{{ i18n "js_required" }}</p>
<p class="search-loading status message hidden">{{ i18n "search_loading" }}</p>
<div class="search-input hidden">
<form id="search-form" class="search-form" action="#" method="post" accept-charset="UTF-8" role="search">
<label for="query" class="visually-hidden">{{ i18n "search_title" }}</label>
<input type="search" id="query" name="query" class="search-text" placeholder="{{ i18n "search_placeholder" }}" maxlength="128">
<button type="submit" name="submit" class="form-submit" >{{ i18n "search_title" }}</button>
</form>
</div>
<div class="search-results"></div>
<template>
<article class="search-result list-view">
<header>
<h2 class="title title-submitted"><a href="#">Title here</a></h2>
<div class="submitted"><time class="created-date">Date here</time></div>
</header>
<div class="content">Summary here</div>
</article>
</template>