Add topics for Gists (#413)

This commit is contained in:
Thomas Miceli
2025-01-24 14:39:42 +01:00
committed by GitHub
parent 8369cbf2f0
commit f5b8881d35
25 changed files with 278 additions and 59 deletions

View File

@ -95,6 +95,13 @@
{{ if .gist.Private }} • <span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 dark:bg-gray-700 text-slate-700 dark:text-slate-300"> {{ visibilityStr .gist.Private false }} </span>{{ end }}
</p>
<p class="mt-1 text-sm max-w-2xl text-slate-600 dark:text-slate-400">{{ .gist.Description }}</p>
{{ if .gist.Topics }}
<div class="mt-2">
{{ range .gist.Topics }}
<a href="{{ $.c.ExternalUrl }}/topics/{{ .Topic }}" class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-primary-200 text-primary-900 hover:bg-primary-300 dark:bg-primary-950 dark:text-primary-200 dark:hover:bg-primary-900">{{ .Topic }}</a>
{{ end }}
</div>
{{ end }}
</header>
<main class="mt-4">