2023-03-14 22:26:39 +00:00
|
|
|
{{ template "header" .}}
|
|
|
|
{{ template "gist_header" .}}
|
|
|
|
{{ if ne (len .forks) 0 }}
|
|
|
|
<div class="mx-auto max-w-xl">
|
2023-09-22 15:26:09 +00:00
|
|
|
<h3 class="text-xl font-bold leading-tight break-all py-2">{{ .locale.Tr "gist.forks" }}</h3>
|
2023-03-14 22:26:39 +00:00
|
|
|
|
2023-05-27 11:58:08 +00:00
|
|
|
<ul role="list" class="divide-y divide-gray-300 dark:divide-gray-700">
|
2023-03-14 22:26:39 +00:00
|
|
|
{{ range $gist := .forks }}
|
|
|
|
<li class="flex py-4">
|
2023-07-03 14:31:12 +00:00
|
|
|
<a href="{{ $.c.ExternalUrl }}/{{ $gist.User.Username }}">
|
2023-09-06 21:36:44 +00:00
|
|
|
<img class="h-12 w-12 rounded-md mr-2 border border-gray-200 dark:border-gray-700" src="{{ avatarUrl $gist.User $.DisableGravatar }}" alt="{{ $gist.User.Username }}'s Avatar">
|
2023-03-20 12:30:25 +00:00
|
|
|
</a>
|
2023-03-14 22:26:39 +00:00
|
|
|
<div>
|
2023-07-03 14:31:12 +00:00
|
|
|
<a href="{{ $.c.ExternalUrl }}/{{ $gist.User.Username }}" class="text-sm font-medium text-slate-700 dark:text-slate-300">{{ $gist.User.Username }}</a>
|
2023-09-22 15:26:09 +00:00
|
|
|
<p class="text-sm text-slate-500">{{ $.locale.Tr "gist.list.forked" }} <span class="moment-timestamp">{{ $gist.CreatedAt }}</span></p>
|
2023-03-14 22:26:39 +00:00
|
|
|
</div>
|
|
|
|
<div class="ml-auto">
|
2023-07-03 14:31:12 +00:00
|
|
|
<a class="ml-auto text-slate-700 dark:text-slate-300 relative inline-flex items-center space-x-2 rounded-md border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 px-2 py-1.5 text-xs font-medium text-slate-700 dark:text-slate-300 hover:bg-gray-200 dark:hover:bg-gray-700 hover:border-gray-500 hover:text-slate-700 dark:hover:text-slate-300 focus:border-primary-500 focus:outline-none focus:ring-1 focus:ring-primary-500 leading-3" href="{{ $.c.ExternalUrl }}/{{ $gist.User.Username }}/{{ $gist.Uuid }}">
|
2023-03-14 22:26:39 +00:00
|
|
|
<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>
|
2023-09-22 15:26:09 +00:00
|
|
|
{{ $.locale.Tr "gist.forks.view" }}
|
2023-03-14 22:26:39 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{ else }}
|
|
|
|
<div class="text-center">
|
2023-05-27 11:58:08 +00:00
|
|
|
<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-600 dark:text-slate-400">
|
2023-03-14 22:26:39 +00:00
|
|
|
<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>
|
|
|
|
|
2023-09-22 15:26:09 +00:00
|
|
|
<h3 class="mt-2 text-sm font-medium text-slate-700 dark:text-slate-300">{{ .locale.Tr "gist.forks.no" }}</h3>
|
2023-03-14 22:26:39 +00:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ template "gist_footer" .}}
|
|
|
|
{{ template "footer" .}}
|