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" }}
|
||||
<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>
|
||||
{{ with .MainPost }}
|
||||
<div class="flex justify-between items-center mt2 mb3">
|
||||
|
@ -10,15 +12,16 @@
|
|||
<div class="flex flex-column ml2">
|
||||
<div>
|
||||
<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">
|
||||
{{ if .Author.IsStaff }}
|
||||
<div class="badge staff"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="c--dim f7">{{ timehtml (absoluteshortdate .PostDate) .PostDate }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-grow-1"></div>
|
||||
<div>
|
||||
{{ if and $.User $.Project.HasBlog }}
|
||||
<div class="flex">
|
||||
|
@ -44,15 +47,16 @@
|
|||
{{ .MainPost.Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ if not .IsProjectPage }}
|
||||
{{ template "newsletter_signup.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<div class="optionbar"></div>
|
||||
<div class="bb ba1"></div>
|
||||
|
||||
{{ range .Comments }}
|
||||
<div class="pa3 flex items-start background-even">
|
||||
<div class="pa2 flex items-start background-even">
|
||||
<div>
|
||||
<div class="avatar contain bg-center" style="background-image:url('{{ .Author.AvatarUrl }}');"></div>
|
||||
</div>
|
||||
|
@ -60,17 +64,9 @@
|
|||
<div class="flex justify-between">
|
||||
<div>
|
||||
<div>
|
||||
<a class="username" href="{{ .Author.ProfileUrl }}" target="_blank">{{ .Author.Username }}</a>
|
||||
<div class="di ph1">
|
||||
{{ if .Author.IsStaff }}
|
||||
<div class="badge staff"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<a class="username" href="{{ .Author.ProfileUrl }}" target="_blank">{{ .Author.Name }}</a>
|
||||
</div>
|
||||
<div class="c--dim f7">
|
||||
{{ if and .Author.Name (ne .Author.Name .Author.Username) }}
|
||||
{{ .Author.Name }},
|
||||
{{ end }}
|
||||
{{ timehtml (relativedate .PostDate) .PostDate }}
|
||||
{{ if .Editor }}
|
||||
<span class="pl3">
|
||||
|
@ -84,6 +80,12 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="di ph1">
|
||||
{{ if .Author.IsStaff }}
|
||||
<div class="badge staff"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="flex-grow-1"></div>
|
||||
<div>
|
||||
{{ if and $.User $.Project.HasBlog }}
|
||||
<div class="flex">
|
||||
|
@ -113,13 +115,14 @@
|
|||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="optionbar bottom">
|
||||
<div class="options">
|
||||
<div class="bb ba1"></div>
|
||||
|
||||
<div>
|
||||
{{ if .Project.HasBlog }}
|
||||
{{ 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 }}
|
||||
<a class="button" href="{{ .LoginLink }}">Log in to comment</a>
|
||||
<a href="{{ .LoginLink }}">Log in to comment</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</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">
|
||||
<div class="b pv2">Sign up for our email newsletter:</div>
|
||||
<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">
|
||||
<button id="newsletter-button" class="white">Sign up</button>
|
||||
<button id="newsletter-button" class="btn-primary white">Sign up</button>
|
||||
</div>
|
||||
<div id="newsletter-message" class="f7 pt1">
|
||||
|
||||
|
|
Loading…
Reference in New Issue