opengist/templates/pages/forks.html
Thomas Miceli 4a75a50370
Disable Gravatar (#37)
* Disable Gravatar
* Lowercase emails
* Add migration
2023-05-26 09:15:37 +02:00

39 lines
2.7 KiB
HTML
Vendored

{{ template "header" .}}
{{ template "gist_header" .}}
{{ if ne (len .forks) 0 }}
<div class="mx-auto max-w-xl">
<h3 class="text-xl font-bold leading-tight break-all py-2">Forks</h3>
<ul role="list" class="divide-y divide-gray-700">
{{ range $gist := .forks }}
<li class="flex py-4">
<a href="/{{ $gist.User.Username }}">
<img class="h-12 w-12 rounded-md mr-2 border border-gray-700" src="{{ avatarUrl $gist.User $.DisableGravatar }}" alt="">
</a>
<div>
<a href="/{{ $gist.User.Username }}" class="text-sm font-medium text-slate-300">{{ $gist.User.Username }}</a>
<p class="text-sm text-slate-500">Forked <span class="moment-timestamp">{{ $gist.CreatedAt }}</span></p>
</div>
<div class="ml-auto">
<a class="ml-auto text-slate-300 relative inline-flex items-center space-x-2 rounded-md border border-gray-600 bg-gray-800 px-2 py-1.5 text-xs font-medium text-slate-300 hover:bg-gray-700 hover:border-gray-500 hover:text-slate-300 focus:border-primary-500 focus:outline-none focus:ring-1 focus:ring-primary-500 leading-3" href="/{{ $gist.User.Username }}/{{ $gist.Uuid }}">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z" />
</svg>
View fork
</a>
</div>
</li>
{{ end }}
</ul>
</div>
{{ else }}
<div class="text-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="mx-auto h-12 w-12 text-slate-400">
<path stroke-linecap="round" stroke-linejoin="round" d="M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z" />
</svg>
<h3 class="mt-2 text-sm font-medium text-slate-300">No public forks</h3>
</div>
{{ end }}
{{ template "gist_footer" .}}
{{ template "footer" .}}