opengist/templates/pages/likes.html

32 lines
2 KiB
HTML
Raw Normal View History

2023-03-14 15:22:52 +00:00
{{ template "header" .}}
{{ template "gist_header" .}}
{{ if ne (len .likers) 0 }}
<h3 class="text-xl font-bold leading-tight break-all py-2">Likes</h3>
<div class="grid grid-cols-1 gap-4 sm:grid-cols-5">
{{ range $user := .likers }}
2023-05-27 11:58:08 +00:00
<div class="relative flex items-center space-x-3 rounded-lg border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 px-6 py-5 shadow-sm focus-within:ring-1 focus-within:border-primary-500 focus-within:ring-primary-500 hover:border-gray-600 dark:hover:border-gray-400">
2023-03-20 12:30:25 +00:00
<div class="min-w-0 flex">
<img class="h-12 w-12 rounded-md mr-2 border border-gray-200 dark:border-gray-700" src="{{ avatarUrl $user $.DisableGravatar }}" alt="{{ $user.Username }}'s Avatar">
<a href="{{ $.c.ExternalUrl }}/{{ $user.Username }}" class="focus:outline-none">
2023-03-14 15:22:52 +00:00
<span class="absolute inset-0" aria-hidden="true"></span>
2023-05-27 11:58:08 +00:00
<p class="text-sm font-medium text-slate-700 dark:text-slate-300 align-middle">{{ $user.Username }}</p>
2023-03-14 15:22:52 +00:00
</a>
</div>
</div>
{{ end }}
</div>
2023-03-15 00:26:56 +00:00
<div class="flex justify-center space-x-2 mt-4">
{{ template "pagination" . }}
</div>
2023-03-14 15:22:52 +00:00
{{ 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 15:22:52 +00:00
<path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z" />
</svg>
2023-05-27 11:58:08 +00:00
<h3 class="mt-2 text-sm font-medium text-slate-700 dark:text-slate-300">No likes yet</h3>
2023-03-14 15:22:52 +00:00
</div>
{{ end }}
{{ template "gist_footer" .}}
{{ template "footer" .}}