mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
perf(repo-card): load CSS once globally instead of per card
This commit is contained in:
@@ -46,12 +46,7 @@
|
||||
</p>
|
||||
|
||||
<div class="m-0 mt-2 flex items-center">
|
||||
{{ $languageDotColor := cond .language (index $repoColors .language) "#0077b6" }}
|
||||
{{ $css := resources.FromString (printf "css/%s.css" $id) (printf ".language-dot-%s{background-color:%s}" $id $languageDotColor)
|
||||
| minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512")
|
||||
}}
|
||||
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
|
||||
<span class="mr-1 inline-block h-3 w-3 rounded-full language-dot-{{ $id }}"></span>
|
||||
<span class="mr-1 inline-block h-3 w-3 rounded-full language-dot" data-language="{{ .language | default "default" }}"></span>
|
||||
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user