133 lines
5.7 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html data-theme="{{ .theme }}">
<head>
<title>{{ .question.Title }}</title>
2022-12-27 22:46:31 -05:00
<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 }};"
/>
2022-12-28 00:34:15 -05:00
<link rel="icon" href="/static/codecircles.png" />
2022-12-28 00:58:41 -05:00
<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>
2022-12-27 22:46:31 -05:00
<p class="timestamp">
Asked {{ .question.Timestamp }} by
2022-12-28 11:33:26 -05:00
<a
href="https://stackoverflow.com{{ .question.AuthorURL }}"
2022-12-28 11:33:26 -05:00
target="_blank"
rel="noopener noreferrer"
>{{ .question.AuthorName }}</a
2022-12-28 11:33:26 -05:00
>.
2022-12-27 22:46:31 -05:00
</p>
</div>
<div class="card-body">{{ .question.Body }}</div>
2022-12-29 13:11:33 -05:00
{{ if .question.Comments }}
<details class="comments">
<summary>
Show <b>{{ (len .question.Comments) }} comments</b>
</summary>
<div class="comments-parent">
{{ range $comment := .question.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="post-divider" />
2022-12-27 22:46:31 -05:00
<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>
2022-12-28 11:33:26 -05:00
<hr class="answer-divider" />
{{ end }}
</div>
</body>
</html>