Files
Arya K 30a68263e7 Merge dev into master (#107)
Co-authored-by: Odyssium <hi@odyssey346.dev>
Co-authored-by: Midou36O <facemioo4@gmail.com>
Co-authored-by: Arya Kiran <arya@projectsegfau.lt>
Co-authored-by: Odyssium <odyssium@noreply.codeberg.org>
Co-authored-by: medanisjbara <medanisjbara@proton.me>
Co-authored-by: Midou36O <midou36o@noreply.codeberg.org>
Co-authored-by: No-Logs.com <no-logs@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/gothub/gothub/pulls/107
2023-05-08 10:24:08 +00:00

48 lines
1.3 KiB
HTML

{{ template "header" .}}
<main>
{{ if .gist }} {{ range $key, $value := .gist}}
<div class="button-parent">
<a href="/download/gist/{{.Refname}}/{{$value.Revision}}" class="button"
>Download (zip)</a
>
<a href="https://gist.github.com/{{.Refname}}" class="button"
>View on GitHub</a
>
</div>
<div class="user-profile">
<h1>{{.Fullname}}</h1>
{{ if .Parent }}
<p>This repository is a fork of <a href="/{{.Parent}}">{{.Parent}}</a>.</p>
{{ end }} {{ if .Description }}
<p>{{.Description}}</p>
{{ end }}
<p>⭐ {{.Stars}} 🍴 {{.Forks}}</p>
</div>
{{end}} {{ if .files}}
<div class="user-readme">
{{ 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;
}
</style>
{{.File}} {{ end }}
</div>
{{ end }} {{ if .readme}}
<div class="user-readme">
{{ if .repo }} {{ range $key, $value := .repo}}
<h3>{{.Readme}}</h3>
{{end}} {{end}}
<div class="user-readme-text">{{ unescape .readme}}</div>
</div>
{{ end }} {{ else }}
<h2>Repository not found</h2>
<p>That repository doesn't exist.</p>
{{ end }}
</main>