Files

59 lines
2.6 KiB
HTML

{{ define "user-starred" }}
<!DOCTYPE html>
<html lang="en">
<head>
{{ template "head" . }}
{{ template "meta" .Meta }}
</head>
<body>
{{ template "nav" . }}
<main id="main-content" class="container mx-auto px-4 py-8">
<div class="flex flex-col items-center gap-8">
<div class="flex flex-col items-center gap-4">
{{ if .ViewedUser.Avatar }}
<div class="avatar">
<div class="w-20 rounded-full shadow">
<img src="{{ resizeImage .ViewedUser.Avatar 160 }}" alt="" aria-hidden="true" width="80" height="80" fetchpriority="high" />
</div>
</div>
{{ else if .HasProfile }}
<div class="avatar avatar-placeholder" role="img" aria-label="Avatar for {{ .ViewedUser.Handle }}">
<div class="bg-neutral text-neutral-content w-20 rounded-full shadow">
<span aria-hidden="true" class="text-3xl">{{ firstChar .ViewedUser.Handle }}</span>
</div>
</div>
{{ else }}
<div class="avatar avatar-placeholder" role="img" aria-label="Unknown user avatar">
<div class="bg-neutral text-neutral-content/60 w-20 rounded-full shadow">
<span aria-hidden="true" class="text-3xl">?</span>
</div>
</div>
{{ end }}
<div class="flex flex-col items-center gap-1">
<h1 class="text-2xl md:text-3xl font-display font-bold tracking-tight break-all min-w-0">
<a href="/u/{{ .ViewedUser.Handle }}" class="link link-hover">{{ .ViewedUser.Handle }}</a>
<span class="text-base-content/60 font-normal"> / starred</span>
</h1>
</div>
</div>
{{ if .HasError }}
{{ template "state-error" (dict
"Title" "We couldn't load their stars"
"Subtext" "The database had trouble fetching this list. Try refreshing in a moment."
"RetryURL" (printf "/u/%s/starred" .ViewedUser.Handle)
) }}
{{ else }}
<div class="w-full">
{{ template "card-grid" (dict "Repositories" .Repositories "Columns" 4 "EmptyMessage" "No starred repositories yet.") }}
</div>
{{ end }}
</div>
</main>
{{ template "footer" . }}
</body>
</html>
{{ end }}