huge blog refactor
tidying up data structures; improvements to blog admin UI/UX, etc.
This commit is contained in:
parent
eaa2f6587d
commit
0c2aaa0b38
18 changed files with 432 additions and 239 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<div class="blogpost">
|
||||
<h3 class="title"><a href="/admin/blogs/{{.ID}}">{{.Title}}</a>{{if not .Visible}} <small>(Not published)</small>{{end}}</h3>
|
||||
<p class="meta">
|
||||
<span class="author"><img src="/img/favicon.png" alt="{{.Author.Username}}'s avatar" width="32" height="32"/> {{.Author.Username}}</span>
|
||||
<span class="author"><img src="/img/favicon.png" alt="" width="32" height="32"/> {{.Author.DisplayName}}</span>
|
||||
<span class="date">• {{.PrintDate}}</span>
|
||||
</p>
|
||||
<p class="description">{{.Description}}</p>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
>{{.Post.Title}}</div>
|
||||
</h2>
|
||||
|
||||
<label for="publish-date">Publish Date</label>
|
||||
<input type="datetime-local" name="publish-date" id="publish-date" value="{{.Post.TextPublishDate}}">
|
||||
|
||||
<label for="description">Description</label>
|
||||
<textarea
|
||||
id="description"
|
||||
|
|
@ -43,20 +46,47 @@
|
|||
rows="30"
|
||||
>{{.Post.Markdown}}</textarea>
|
||||
|
||||
<label for="bluesky-actor">Bluesky Author DID</label>
|
||||
<input
|
||||
type="text"
|
||||
name="bluesky-actor"
|
||||
id="bluesky-actor"
|
||||
placeholder="did:plc:1234abcd..."
|
||||
value="{{if .Post.BlueskyActorID}}{{.Post.BlueskyActorID}}{{end}}">
|
||||
<label for="bluesky-post">Bluesky Post ID</label>
|
||||
<input
|
||||
type="text"
|
||||
name="bluesky-post"
|
||||
id="bluesky-post"
|
||||
placeholder="3m109a03..."
|
||||
value="{{if .Post.BlueskyPostID}}{{.Post.BlueskyPostID}}{{end}}">
|
||||
<div class="social-post-details">
|
||||
<div class="social-post-item">
|
||||
<label for="bluesky-actor">Bluesky Author DID</label>
|
||||
<input
|
||||
type="text"
|
||||
name="bluesky-actor"
|
||||
id="bluesky-actor"
|
||||
placeholder="did:plc:1234abcd..."
|
||||
value="{{if .Post.Bluesky}}{{.Post.Bluesky.ActorDID}}{{end}}">
|
||||
</div>
|
||||
<div class="social-post-item">
|
||||
<label for="bluesky-record">Bluesky Post ID</label>
|
||||
<input
|
||||
type="text"
|
||||
name="bluesky-record"
|
||||
id="bluesky-record"
|
||||
placeholder="3m109a03..."
|
||||
value="{{if .Post.Bluesky}}{{.Post.Bluesky.RecordID}}{{end}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="social-post-details">
|
||||
<div class="social-post-item">
|
||||
<label for="fediverse-account">Fediverse Account</label>
|
||||
<input
|
||||
type="text"
|
||||
name="fediverse-account"
|
||||
id="fediverse-account"
|
||||
placeholder="@me@my.fediverse.place"
|
||||
value="{{if .Post.Fediverse}}{{.Post.Fediverse.AccountID}}{{end}}">
|
||||
</div>
|
||||
<div class="social-post-item">
|
||||
<label for="fediverse-status">Fediverse Status ID</label>
|
||||
<input
|
||||
type="text"
|
||||
name="fediverse-status"
|
||||
id="fediverse-status"
|
||||
placeholder="never consistent ¯\_(ツ)_/¯"
|
||||
value="{{if .Post.Fediverse}}{{.Post.Fediverse.StatusID}}{{end}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label for="visibility">Visibility</label>
|
||||
<select name="visibility" id="visibility">
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@
|
|||
<h2><a href="/admin/blogs/">Latest Blog Post</a> <small>({{.BlogCount}} total)</small></h2>
|
||||
<a class="button new" id="create-post">Create New</a>
|
||||
</div>
|
||||
{{if .BlogPost}}
|
||||
{{block "blogpost" .BlogPost}}{{end}}
|
||||
{{if .LatestBlogPost}}
|
||||
{{block "blogpost" .LatestBlogPost}}{{end}}
|
||||
{{else}}
|
||||
<p>There are no blog posts.</p>
|
||||
{{end}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue