2022-12-27 22:31:07 -05:00
|
|
|
<!DOCTYPE html>
|
2022-12-28 11:49:14 -05:00
|
|
|
<html data-theme="{{ .theme }}">
|
2022-12-27 22:31:07 -05:00
|
|
|
<head>
|
2022-12-29 13:06:14 -05:00
|
|
|
<title>{{ .question.Title }}</title>
|
2022-12-27 22:46:31 -05:00
|
|
|
<link rel="stylesheet" href="/static/question.css" />
|
2022-12-28 18:51:14 -05:00
|
|
|
<link rel="stylesheet" href="/static/syntax.css" />
|
2022-12-30 18:18:13 -05:00
|
|
|
<link rel="stylesheet" href="/static/comments.css" />
|
2022-12-27 23:00:54 -05:00
|
|
|
<meta
|
|
|
|
http-equiv="Content-Security-Policy"
|
2022-12-28 00:10:09 -05:00
|
|
|
content="default-src 'none'; style-src 'self'; script-src 'none'; img-src {{ .imagePolicy }};"
|
2022-12-27 23:00:54 -05:00
|
|
|
/>
|
2022-12-29 13:06:14 -05:00
|
|
|
<meta name="description" content="{{ .question.ShortenedBody }}..." />
|
2022-12-29 13:17:50 -05:00
|
|
|
{{ template "sharedHead.html" }}
|
2022-12-27 22:31:07 -05:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="parent">
|
2022-12-28 11:56:17 -05:00
|
|
|
<div class="header">
|
|
|
|
<a href="/" class="logo-link">
|
|
|
|
<img
|
|
|
|
class="logo"
|
|
|
|
src="/static/codecircles.png"
|
|
|
|
alt="4 circles with alternating colors between green and white"
|
|
|
|
/>
|
|
|
|
</a>
|
2022-12-30 18:11:59 -05:00
|
|
|
{{ template "themeSwitcher.html" . }}
|
2022-12-28 11:56:17 -05:00
|
|
|
</div>
|
2022-12-27 22:31:07 -05:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
2022-12-29 13:06:14 -05:00
|
|
|
<h1>{{ .question.Title }}</h1>
|
2022-12-27 22:46:31 -05:00
|
|
|
<p class="timestamp">
|
2022-12-29 13:06:14 -05:00
|
|
|
Asked {{ .question.Timestamp }} by
|
2022-12-28 11:33:26 -05:00
|
|
|
<a
|
2023-02-20 14:17:24 -05:00
|
|
|
href="{{ .question.AuthorURL }}"
|
2022-12-28 11:33:26 -05:00
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
2022-12-29 13:06:14 -05:00
|
|
|
>{{ .question.AuthorName }}</a
|
2022-12-28 11:33:26 -05:00
|
|
|
>.
|
2022-12-27 22:46:31 -05:00
|
|
|
</p>
|
2022-12-27 22:31:07 -05:00
|
|
|
</div>
|
2022-12-29 13:06:14 -05:00
|
|
|
<div class="card-body">{{ .question.Body }}</div>
|
2023-02-04 13:40:57 -05:00
|
|
|
<div class="card-tags">
|
|
|
|
{{ range .question.Tags }}
|
|
|
|
<div class="tag">{{ . }}</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2023-02-04 12:58:50 -05:00
|
|
|
{{ if .question.Comments }} {{ template "comments.html"
|
|
|
|
.question }} {{end}}
|
2022-12-27 22:31:07 -05:00
|
|
|
</div>
|
2022-12-28 22:55:30 -05:00
|
|
|
<hr class="post-divider" />
|
2023-02-04 12:58:50 -05:00
|
|
|
<div class="answers-header">
|
|
|
|
<h2>Answers</h2>
|
|
|
|
<div class="sorting">
|
|
|
|
<form>
|
|
|
|
<select name="sort_by">
|
2023-02-04 13:05:10 -05:00
|
|
|
<option disabled value="">Sort answers by...</option>
|
|
|
|
<option value="votes"{{ if eq .sortValue "votes" }} selected{{ end }}>Votes</option>
|
|
|
|
<option value="trending"{{ if eq .sortValue "trending" }} selected{{ end }}>Trending</option>
|
2023-02-04 13:42:24 -05:00
|
|
|
<option value="newest"{{ if eq .sortValue "newest" }} selected{{ end }}>Date modified (newest first)</option>
|
|
|
|
<option value="oldest"{{ if eq .sortValue "oldest" }} selected{{ end }}>Date created (oldest first)</option>
|
2023-02-04 12:58:50 -05:00
|
|
|
</select>
|
|
|
|
<button type="submit">
|
|
|
|
<img
|
|
|
|
src="/static/icons/sort.svg"
|
|
|
|
alt="Sieve icon"
|
|
|
|
/>
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-27 22:50:38 -05:00
|
|
|
{{ range $answer := .answers }}
|
2023-02-14 19:55:17 -05:00
|
|
|
<div class="answer" id="{{ $answer.ID }}">
|
2022-12-29 13:06:14 -05:00
|
|
|
<div
|
|
|
|
class="answer-meta{{ if $answer.IsAccepted }} accepted{{end}}"
|
|
|
|
>
|
2023-02-14 20:12:49 -05:00
|
|
|
<p>
|
2022-12-29 13:06:14 -05:00
|
|
|
{{ if $answer.IsAccepted }} Accepted - {{ end }}
|
|
|
|
{{$answer.Upvotes}} Votes
|
2023-02-14 20:12:49 -05:00
|
|
|
</p>
|
|
|
|
<a href="#{{ $answer.ID }}" class="answer-link">
|
|
|
|
<div class="icon">
|
|
|
|
<img src="/static/icons/link.svg" alt="Paperclip icon" />
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</div>
|
2022-12-29 13:06:14 -05:00
|
|
|
{{ $answer.Body }}
|
|
|
|
<div class="answer-author-parent">
|
|
|
|
<div class="answer-author">
|
|
|
|
Answered {{ $answer.Timestamp }} by
|
|
|
|
<a
|
2023-02-20 14:17:24 -05:00
|
|
|
href="{{ $answer.AuthorURL }}"
|
2022-12-29 13:06:14 -05:00
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
>{{ $answer.AuthorName }}</a
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-02-04 12:58:50 -05:00
|
|
|
{{ if $answer.Comments }} {{ template "comments.html" $answer }}
|
2022-12-29 13:06:14 -05:00
|
|
|
{{end}}
|
|
|
|
</div>
|
2022-12-27 22:50:38 -05:00
|
|
|
{{ end }}
|
2022-12-27 22:31:07 -05:00
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|