1{{ define "repo/fragments/readme" }}
2<div class="mt-4 rounded bg-white dark:bg-gray-800 drop-shadow-sm w-full mx-auto overflow-hidden">
3 {{- if .ReadmeFileName -}}
4 <div class="px-4 py-2 border-b border-gray-200 dark:border-gray-600 flex items-center gap-2">
5 {{ i "file-text" "w-4 h-4" "text-gray-600 dark:text-gray-400" }}
6 <span class="font-mono text-sm text-gray-800 dark:text-gray-200">{{ .ReadmeFileName }}</span>
7 </div>
8 {{- end -}}
9 <section
10 class="px-6 pb-6 overflow-auto {{ if not .Raw }}
11 prose dark:prose-invert dark:[&_pre]:bg-gray-900
12 dark:[&_code]:text-gray-300 dark:[&_pre_code]:bg-gray-900
13 dark:[&_pre]:border dark:[&_pre]:border-gray-700
14 {{ end }}"
15 >
16 <article class="{{ if .Raw }}whitespace-pre{{ end }}">{{- if .Raw -}}<pre class="dark:bg-gray-800 dark:text-white overflow-x-auto">
17 {{- .Readme -}}
18 </pre>
19 {{- else -}}
20 {{ .HTMLReadme }}
21 {{- end -}}</article>
22 </section>
23</div>
24{{ end }}