gitlin/views/gist.html

48 行
1.2 KiB
HTML
Raw 通常表示 履歴

2023-03-28 21:55:37 +09:00
{{ template "header" .}}
<main>
2023-03-30 04:01:15 +09:00
{{ if .gist }} {{ range $key, $value := .gist}}
2023-04-05 10:28:13 +09:00
<div class="button-parent">
2023-04-01 19:17:08 +09:00
<a href="/download/gist/{{.Refname}}/{{$value.Revision}}" class="button"
2023-03-30 04:01:15 +09:00
>Download (zip)</a
>
<a href="https://gist.github.com/{{.Refname}}" class="button"
>View on GitHub</a
>
</div>
2023-04-05 10:28:13 +09:00
<div class="user-profile">
2023-03-30 04:01:15 +09:00
<h1>{{.Fullname}}</h1>
{{ if .Parent }}
<p>This repository is a fork of <a href="/{{.Parent}}">{{.Parent}}</a>.</p>
{{ end }} {{ if .Description }}
<p>{{.Description}}</p>
2023-03-28 21:55:37 +09:00
{{ end }}
2023-03-30 04:01:15 +09:00
<p>⭐ {{.Stars}} 🍴 {{.Forks}}</p>
</div>
{{end}} {{ if .files}}
2023-04-05 10:28:13 +09:00
<div class="user-readme">
2023-03-30 04:01:15 +09:00
{{ range $key, $value := .files}}
<p><a id="{{.Name}}" href="#{{.Name}}">{{.Name}}</a></p>
<style>
// prettier-ignore
{{.Css}}
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
2023-03-30 04:01:15 +09:00
</style>
{{.File}} {{ end }}
</div>
{{ end }} {{ if .readme}}
2023-04-05 10:28:13 +09:00
<div class="user-readme">
2023-03-30 04:01:15 +09:00
{{ if .repo }} {{ range $key, $value := .repo}}
<h3>{{.Readme}}</h3>
{{end}} {{end}}
2023-04-05 10:28:13 +09:00
<div class="user-readme-text">{{ unescape .readme}}</div>
2023-03-30 04:01:15 +09:00
</div>
{{ end }} {{ else }}
<h2>Repository not found</h2>
<p>That repository doesn't exist.</p>
{{ end }}
2023-03-28 21:55:37 +09:00
</main>