repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

pico / prose / html
Eric Bower · 04 Dec 24

post.page.tmpl

 1{{template "base" .}}
 2
 3{{define "title"}}{{.PageTitle}}{{end}}
 4
 5{{define "meta"}}
 6{{if .Favicon}}
 7<link rel="icon" href="{{.Favicon}}">
 8{{else}}
 9<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
10{{end}}
11
12<meta name="description" content="{{.Description}}" />
13
14<meta property="og:type" content="website">
15<meta property="og:site_name" content="{{.Site.Domain}}">
16<meta property="og:url" content="{{.URL}}">
17<meta property="og:title" content="{{.Title}}">
18{{if .Description}}<meta property="og:description" content="{{.Description}}">{{end}}
19
20{{if .Image}}
21<meta itemprop="image" content="{{.Image}}" />
22<meta property="og:image" content="{{.Image}}" />
23
24<meta name="twitter:image" content="{{.Image}}" />
25{{else}}
26<meta property="og:image:width" content="300" />
27<meta property="og:image:height" content="300" />
28<meta itemprop="image" content="https://{{.Site.Domain}}/card.png" />
29<meta property="og:image" content="https://{{.Site.Domain}}/card.png" />
30
31<meta name="twitter:image" content="https://{{.Site.Domain}}/card.png" />
32{{end}}
33
34{{if .ImageCard}}
35<meta property="twitter:card" content="{{.ImageCard}}">
36{{else}}
37<meta property="twitter:card" content="summary">
38{{end}}
39<meta property="twitter:url" content="{{.URL}}">
40<meta property="twitter:title" content="{{.Title}}">
41{{if .Description}}<meta property="twitter:description" content="{{.Description}}">{{end}}
42
43<link rel="stylesheet" href="/syntax.css" />
44{{if .WithStyles}}
45  <link rel="stylesheet" href="/smol.css" />
46{{else}}
47{{end}}
48{{if .HasCSS}}<link rel="stylesheet" href="{{.CssURL}}" />{{end}}
49{{end}}
50
51{{define "attrs"}}id="post" class="{{.Slug}}"{{end}}
52
53{{define "body"}}
54<header>
55    <h1 class="text-2xl font-bold">{{.Title}}</h1>
56    <p class="font-bold m-0">
57        <time datetime="{{.PublishAtISO}}">{{.PublishAt}}</time>
58        <span>&middot;<span>
59        <a href="{{.BlogURL}}">{{.BlogName}}</a>
60    </p>
61    {{if .Description}}<blockquote>{{.Description}}</blockquote>{{end}}
62    <hr />
63</header>
64<main>
65    <article class="md">
66        {{.Contents}}
67
68        <div class="tags">
69        {{range .Tags}}
70            <code class="pill tag"><a href="{{$.BlogURL}}?tag={{.}}">#{{.}}</a></code>
71        {{end}}
72        </div>
73
74        <div id="post-footer">{{.Footer}}</div>
75    </article>
76</main>
77{{template "footer" .}}
78{{end}}