Blog posts are useable
This commit is contained in:
parent
b11114b002
commit
bab955aaff
|
@ -1,7 +1,9 @@
|
||||||
{{ template "base.html" . }}
|
{{ template "base-2024.html" . }}
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
<div class="mw7 m-center tl post ph3 ph0-ns">
|
<div class="flex justify-center pa3">
|
||||||
|
<div class="mw-site post-content flex flex-column g2">
|
||||||
|
<div>
|
||||||
<h1>{{ .Thread.Title }}</h1>
|
<h1>{{ .Thread.Title }}</h1>
|
||||||
{{ with .MainPost }}
|
{{ with .MainPost }}
|
||||||
<div class="flex justify-between items-center mt2 mb3">
|
<div class="flex justify-between items-center mt2 mb3">
|
||||||
|
@ -10,15 +12,16 @@
|
||||||
<div class="flex flex-column ml2">
|
<div class="flex flex-column ml2">
|
||||||
<div>
|
<div>
|
||||||
<a class="username" href="{{ .Author.ProfileUrl }}" target="_blank">{{ .Author.Name }}</a>
|
<a class="username" href="{{ .Author.ProfileUrl }}" target="_blank">{{ .Author.Name }}</a>
|
||||||
|
</div>
|
||||||
|
<div class="c--dim f7">{{ timehtml (absoluteshortdate .PostDate) .PostDate }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="di ph1">
|
<div class="di ph1">
|
||||||
{{ if .Author.IsStaff }}
|
{{ if .Author.IsStaff }}
|
||||||
<div class="badge staff"></div>
|
<div class="badge staff"></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="flex-grow-1"></div>
|
||||||
<div class="c--dim f7">{{ timehtml (absoluteshortdate .PostDate) .PostDate }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
{{ if and $.User $.Project.HasBlog }}
|
{{ if and $.User $.Project.HasBlog }}
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
@ -44,15 +47,16 @@
|
||||||
{{ .MainPost.Content }}
|
{{ .MainPost.Content }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ if not .IsProjectPage }}
|
{{ if not .IsProjectPage }}
|
||||||
{{ template "newsletter_signup.html" . }}
|
{{ template "newsletter_signup.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="optionbar"></div>
|
<div class="bb ba1"></div>
|
||||||
|
|
||||||
{{ range .Comments }}
|
{{ range .Comments }}
|
||||||
<div class="pa3 flex items-start background-even">
|
<div class="pa2 flex items-start background-even">
|
||||||
<div>
|
<div>
|
||||||
<div class="avatar contain bg-center" style="background-image:url('{{ .Author.AvatarUrl }}');"></div>
|
<div class="avatar contain bg-center" style="background-image:url('{{ .Author.AvatarUrl }}');"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -60,17 +64,9 @@
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<a class="username" href="{{ .Author.ProfileUrl }}" target="_blank">{{ .Author.Username }}</a>
|
<a class="username" href="{{ .Author.ProfileUrl }}" target="_blank">{{ .Author.Name }}</a>
|
||||||
<div class="di ph1">
|
|
||||||
{{ if .Author.IsStaff }}
|
|
||||||
<div class="badge staff"></div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="c--dim f7">
|
<div class="c--dim f7">
|
||||||
{{ if and .Author.Name (ne .Author.Name .Author.Username) }}
|
|
||||||
{{ .Author.Name }},
|
|
||||||
{{ end }}
|
|
||||||
{{ timehtml (relativedate .PostDate) .PostDate }}
|
{{ timehtml (relativedate .PostDate) .PostDate }}
|
||||||
{{ if .Editor }}
|
{{ if .Editor }}
|
||||||
<span class="pl3">
|
<span class="pl3">
|
||||||
|
@ -84,6 +80,12 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="di ph1">
|
||||||
|
{{ if .Author.IsStaff }}
|
||||||
|
<div class="badge staff"></div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<div class="flex-grow-1"></div>
|
||||||
<div>
|
<div>
|
||||||
{{ if and $.User $.Project.HasBlog }}
|
{{ if and $.User $.Project.HasBlog }}
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
@ -113,13 +115,14 @@
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="optionbar bottom">
|
<div class="bb ba1"></div>
|
||||||
<div class="options">
|
|
||||||
|
<div>
|
||||||
{{ if .Project.HasBlog }}
|
{{ if .Project.HasBlog }}
|
||||||
{{ if $.User }}
|
{{ if $.User }}
|
||||||
<a class="button" href="{{ .ReplyLink }}"><span class="big pr1">+</span> Add Comment</a>
|
<a href="{{ .ReplyLink }}"><span class="big pr1">+</span> Add Comment</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a class="button" href="{{ .LoginLink }}">Log in to comment</a>
|
<a href="{{ .LoginLink }}">Log in to comment</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="pv3 flex flex-column g2 items-center">
|
<div class="hmn-form pv3 flex flex-column g2 items-center">
|
||||||
<form id="newsletter-form" class="flex flex-column items-center">
|
<form id="newsletter-form" class="flex flex-column items-center">
|
||||||
<div class="b pv2">Sign up for our email newsletter:</div>
|
<div class="b pv2">Sign up for our email newsletter:</div>
|
||||||
<div class="flex g2 justify-center">
|
<div class="flex g2 justify-center">
|
||||||
<input id="newsletter-email" type="email" class="input--jam flex-grow-1 flex-grow-0-ns" placeholder="me@example.com">
|
<input id="newsletter-email" type="email" class="input--jam flex-grow-1 flex-grow-0-ns" placeholder="me@example.com">
|
||||||
<button id="newsletter-button" class="white">Sign up</button>
|
<button id="newsletter-button" class="btn-primary white">Sign up</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="newsletter-message" class="f7 pt1">
|
<div id="newsletter-message" class="f7 pt1">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue