To gitea and beyond, let's go(-yco)

This commit is contained in:
2025-11-10 19:12:09 +01:00
parent 8f6133392d
commit 71a031342b
245 changed files with 83994 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
{{define "content"}}
<article class="post-detail">
<header>
{{if .Post.URL}}
<h1><a href="{{.Post.URL}}" target="_blank" rel="noopener">{{.Post.Title}}</a></h1>
{{else}}
<h1>{{.Post.Title}}</h1>
{{end}}
<p class="post-meta">Shared by {{if .Post.AuthorName}}{{if eq .Post.AuthorName "(deleted)"}}(deleted){{else}}{{.Post.AuthorName}}{{end}}{{else if and .Post.AuthorID .Post.Author.Username}}{{.Post.Author.Username}}{{else}}unauthenticated user{{end}} · {{formatTime .Post.CreatedAt}}</p>
</header>
{{if .Post.Content}}
<section class="post-body">
<p>{{.Post.Content}}</p>
</section>
{{end}}
<section class="post-votes">
<div class="vote-strip">
<form action="/posts/{{.Post.ID}}/vote" method="post" class="vote-form">
{{if .CSRFToken}}<input type="hidden" name="csrf_token" value="{{.CSRFToken}}" />{{end}}
<input type="hidden" name="redirect" value="/posts/{{.Post.ID}}" />
<input type="hidden" name="action" value="{{if eq .CurrentVote "up"}}clear{{else}}up{{end}}" />
<button type="submit" class="vote-arrow{{if eq .CurrentVote "up"}} is-active{{end}}" aria-label="{{if eq .CurrentVote "up"}}Remove upvote{{else}}Upvote{{end}}">
<span aria-hidden="true">▲</span>
</button>
</form>
<div class="vote-totals">
<span class="vote-score">Score {{.Post.Score}}</span>
<span class="vote-breakdown">▲ {{.Post.UpVotes}} · ▼ {{.Post.DownVotes}}</span>
</div>
<form action="/posts/{{.Post.ID}}/vote" method="post" class="vote-form">
{{if .CSRFToken}}<input type="hidden" name="csrf_token" value="{{.CSRFToken}}" />{{end}}
<input type="hidden" name="redirect" value="/posts/{{.Post.ID}}" />
<input type="hidden" name="action" value="{{if eq .CurrentVote "down"}}clear{{else}}down{{end}}" />
<button type="submit" class="vote-arrow{{if eq .CurrentVote "down"}} is-active{{end}}" aria-label="{{if eq .CurrentVote "down"}}Remove downvote{{else}}Downvote{{end}}">
<span aria-hidden="true">▼</span>
</button>
</form>
</div>
</section>
</article>
{{end}}