apps/posts/starters/post.html 1.4 K raw
1
<div class="post-header">
2
  {{if .Post.HasTitle}}
3
  <h1>{{.Post.TitleStr}}</h1>
4
  {{end}}
5
  {{if .Post.MetaDescription}}
6
  <p class="post-description">{{.Post.MetaDescriptionStr}}</p>
7
  {{end}}
8
  <div class="post-weather">
9
    {{if .Post.PublishedDate}}
10
    <span>
11
      <time class="post-date">{{.Post.PublishedDateStr}}</time>
12
    </span>
13
    <span>•</span>
14
    {{end}}
15
    {{if .Post.Weather}}
16
    {{.Weather.Icon}}
17
    <p class="weather-conditions">{{.Weather.Conditions}}</p>
18
    <p class="weather-temp">{{.Weather.Temperature}}</p>
19
    •
20
    <div class="weather-location">
21
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="currentColor" d="M128 68a36 36 0 1 0 36 36a36 36 0 0 0-36-36m0 64a28 28 0 1 1 28-28a28 28 0 0 1-28 28m0-112a84.09 84.09 0 0 0-84 84c0 30.42 14.17 62.79 41 93.62a250 250 0 0 0 40.73 37.66a4 4 0 0 0 4.58 0A250 250 0 0 0 171 197.62c26.81-30.83 41-63.2 41-93.62a84.09 84.09 0 0 0-84-84m37.1 172.23A254.6 254.6 0 0 1 128 227a254.6 254.6 0 0 1-37.1-34.81C73.15 171.8 52 139.9 52 104a76 76 0 0 1 152 0c0 35.9-21.15 67.8-38.9 88.23"></path></svg>
22
      <p>{{.Weather.Location}}</p>
23
    </div>
24
    {{end}}
25
  </div>
26
  {{if .Post.TagList}}
27
  <div class="post-tags">
28
    {{range .Post.TagList}}
29
    <span class="tag">{{.}}</span>
30
    {{end}}
31
  </div>
32
  {{end}}
33
</div>
34
<article class="markdown-body">
35
  {{.RenderedContent}}
36
</article>