1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 19:41:17 -04:00
Files
jarv.is/layouts/_default/single.html
Jake Jarvis b755b66d19 use preact for common components across site (#663)
* convert GitHub cards grid from lit-html to preact

* give hit counter the preact treatment

* extract loading spinner component to a shared location

* move *some* loading spinner styles to its JSX

* Update .percy.yml

* pick up images in JS w/ webpack

* pull star/fork icons straight from @primer/octicons

* a bit of cleanup

* check `typeof window !== "undefined"` before rendering

* bump misc. deps

* silence missing license warnings for preact-hooks and preact-compat

* add source-map-loader

* Update loading.js
2021-11-24 13:51:29 -05:00

46 lines
1.2 KiB
HTML

{{ define "main" }}
<div class="layout layout-single">
<article>
<div id="meta">
<div id="meta-date">
<a href="{{ .Permalink }}" title="{{ .Date.Format "Mon, Jan 2 2006 3:04:05 PM MST" }}">
<span class="meta-icon">📅</span>
<span>{{ .Date.Format "January 2, 2006" }}</span>
</a>
</div>
{{ with .Params.tags }}
<div id="meta-tags">
<span class="meta-icon">🏷️</span>
{{ range first 5 . }}
<span class="meta-tag">{{ . }}</span>
{{ end }}
</div>
{{ end }}
{{ with .Scratch.Get "sourceURL" }}
<div id="meta-edit">
<a href="{{ . | safeURL }}" title="Edit this post on GitHub" target="_blank" rel="noopener">
<span class="meta-icon">✏️</span>
<span>Improve This Post</span>
</a>
</div>
{{ end }}
{{ if eq hugo.Environment "production" }}
<div id="meta-hits">
<span class="meta-icon">👀</span>
<div id="meta-hits-counter"></div>
</div>
{{ end }}
</div>
<h1 class="title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<div id="content">
{{ .Content }}
</div>
</article>
</div>
{{ end }}