105 lines
4.4 KiB
HTML
105 lines
4.4 KiB
HTML
<!DOCTYPE html>
|
|
<html data-theme="{{ .theme }}">
|
|
<head>
|
|
<title>{{ .question.Title }}</title>
|
|
<link rel="stylesheet" href="/static/question.css" />
|
|
<link rel="stylesheet" href="/static/globals.css" />
|
|
<link rel="stylesheet" href="/static/syntax.css" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta
|
|
http-equiv="Content-Security-Policy"
|
|
content="default-src 'none'; style-src 'self'; script-src 'none'; img-src {{ .imagePolicy }};"
|
|
/>
|
|
<link rel="icon" href="/static/codecircles.png" />
|
|
<meta name="theme-color" content="#8CFFC1" />
|
|
<meta name="og:image" content="/static/codecircles.png" />
|
|
<meta name="description" content="{{ .question.ShortenedBody }}..." />
|
|
</head>
|
|
<body>
|
|
<div class="parent">
|
|
<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>
|
|
<div class="icon">
|
|
<a href="/options/theme?redirect_url={{ .currentUrl }}">
|
|
<img src="/static/icons/{{ if eq .theme "dark" }}sun{{
|
|
else }}moon{{ end }}.svg" alt="Toggle theme" />
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h1>{{ .question.Title }}</h1>
|
|
<p class="timestamp">
|
|
Asked {{ .question.Timestamp }} by
|
|
<a
|
|
href="https://stackoverflow.com{{ .question.AuthorURL }}"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>{{ .question.AuthorName }}</a
|
|
>.
|
|
</p>
|
|
</div>
|
|
<div class="card-body">{{ .question.Body }}</div>
|
|
</div>
|
|
<hr class="post-divider" />
|
|
<h2>Answers</h2>
|
|
{{ range $answer := .answers }}
|
|
<div class="answer">
|
|
<div
|
|
class="answer-meta{{ if $answer.IsAccepted }} accepted{{end}}"
|
|
>
|
|
{{ if $answer.IsAccepted }} Accepted - {{ end }}
|
|
{{$answer.Upvotes}} Votes
|
|
</div>
|
|
{{ $answer.Body }}
|
|
<div class="answer-author-parent">
|
|
<div class="answer-author">
|
|
Answered {{ $answer.Timestamp }} by
|
|
<a
|
|
href="https://stackoverflow.com{{ $answer.AuthorURL }}"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>{{ $answer.AuthorName }}</a
|
|
>
|
|
</div>
|
|
</div>
|
|
{{ if $answer.Comments }}
|
|
<details class="comments">
|
|
<summary>
|
|
Show <b>{{ (len $answer.Comments) }} comments</b>
|
|
</summary>
|
|
<div class="comments-parent">
|
|
{{ range $comment := $answer.Comments }}
|
|
<div class="comment-parent">
|
|
<div class="comment">
|
|
<div class="comment-body">
|
|
{{ $comment.Text }}
|
|
</div>
|
|
<div class="comment-author">
|
|
Commented {{ $comment.Timestamp }} by
|
|
<a
|
|
href="https://stackoverflow.com{{ $comment.AuthorURL }}"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>{{ $comment.AuthorName }}</a
|
|
>.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</details>
|
|
{{end}}
|
|
</div>
|
|
<hr class="answer-divider" />
|
|
{{ end }}
|
|
</div>
|
|
</body>
|
|
</html>
|