answer/ui/template/question.html

81 lines
3.1 KiB
HTML

{{template "header" . }}
<div class="pt-4 mt-2 mb-5 container">
<div class="justify-content-center row">
<div class="col-xxl-7 col-lg-8 col-sm-12">
<div>
<div class="mb-3 d-flex flex-wrap justify-content-between">
<h5 class="fs-5 text-nowrap mb-3 mb-md-0">
{{translator $.language "ui.question.all_questions"}}
</h5>
</div>
<div class="border-top border-bottom-0 list-group list-group-flush">
{{range .data}}
<div class="border-bottom pt-3 pb-2 px-0 list-group-item">
<h5 class="text-wrap text-break">
{{if $.useTitle }}
<a class="link-dark" href="/questions/{{.ID}}/{{urlTitle .Title}}"
>{{.Title}}</a
>
{{else}}
<a class="link-dark" href="/questions/{{.ID}}">{{.Title}}</a>
{{end}}
</h5>
<div
class="d-flex flex-column flex-md-row align-items-md-center fs-14 text-secondary"
>
<div class="d-flex">
<div class="text-secondary me-1">
<a href="/users/{{.Operator.Username}}"
><span class="me-1 text-break"
>{{.Operator.DisplayName}}</span
></a
><span class="fw-bold" title="Reputation"
>{{.Operator.Rank}}</span
>
</div>
<time
class="text-secondary ms-1"
datetime="{{timeFormatISO $.timezone .OperatedAt}}"
title="{{translatorTimeFormatLongDate $.language $.timezone .OperatedAt}}"
>{{translator $.language "ui.question.asked"}}
{{translatorTimeFormat $.language $.timezone .OperatedAt}}
</time>
</div>
<div class="ms-0 ms-md-3 mt-2 mt-md-0">
<span
><i class="br bi-hand-thumbs-up-fill"></i
><em class="fst-normal ms-1">{{.VoteCount}}</em></span
>
<span class="ms-3"
><i class="br bi-chat-square-text-fill"></i
><em class="fst-normal ms-1">{{.AnswerCount}}</em></span
>
<span class="summary-stat ms-3"
><i class="br bi-eye-fill"></i
><em class="fst-normal ms-1">{{.ViewCount}}</em></span
>
</div>
</div>
<div class="question-tags mx-n1 mt-2">
{{range .Tags }}
<a
href="/tags/{{.SlugName}}"
class="badge-tag rounded-1 {{if .Reserved}}badge-tag-reserved{{end}} {{if .Recommend}}badge-tag-required{{end}} m-1"
>
<span class="">{{.SlugName}}</span>
</a>
{{end}}
</div>
</div>
{{end}}
</div>
<div class="mt-4 mb-2 d-flex justify-content-center">
{{template "page" .}}
</div>
</div>
</div>
<div class="mt-5 mt-lg-0 col-xxl-3 col-lg-4 col-sm-12"></div>
</div>
</div>
{{template "footer" .}}