{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content repository wiki">
	{{template "repo/header" .}}
	<div class="ui container">
		<div class="repo-button-row tw-flex tw-items-center tw-gap-2 tw-mb-4">
			<div class="tw-flex-1">
				<a class="ui small button" href="{{.RepoLink}}/wiki/">
					{{svg "octicon-arrow-left" 14}} Back to wiki
				</a>
			</div>
		</div>

		<h2>{{svg "octicon-tag" 20}} Category: {{.CategoryName}}</h2>

		{{if .CategoryPages}}
		<div class="ui relaxed divided list">
			{{range .CategoryPages}}
			<div class="item">
				{{svg "octicon-file" 14}}
				<a href="{{$.RepoLink}}/wiki/{{.SubURL}}">{{.Name}}</a>
			</div>
			{{end}}
		</div>
		<p class="tw-mt-4 text grey">{{.CategoryCount}} {{if eq .CategoryCount 1}}page{{else}}pages{{end}} in this category.</p>
		{{else}}
		<div class="ui placeholder segment">
			<div class="ui icon header">
				{{svg "octicon-tag" 48}}
				<br>
				No pages in category "{{.CategoryName}}"
			</div>
		</div>
		{{end}}
	</div>
</div>
{{template "base/footer" .}}
