mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
fix(repo-card): manually revert to the version in 2.87.0
The md5 method has severe performance degradation It is approximately 2x slower without cache and 5x slower with cache Reverted due to lack of a better option
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{{ $id := delimit (slice "codeberg" (partial "functions/uid.html" .)) "-" }}
|
||||
{{- $codebergURL := print "https://codeberg.org/api/v1/repos/" (.Get "repo") -}}
|
||||
{{- $codebergColors := .Site.Data.repoColors -}}
|
||||
{{- $codebergData := dict -}}
|
||||
{{- with try (resources.GetRemote $codebergURL) -}}
|
||||
{{- with .Err -}}
|
||||
@@ -32,10 +33,13 @@
|
||||
</p>
|
||||
|
||||
<div class="m-0 mt-2 flex items-center">
|
||||
{{ $language := .language | default "fallback" }}
|
||||
{{ $className := printf "background-color-%s" (md5 $language) }}
|
||||
<span
|
||||
class="mr-1 inline-block h-3 w-3 rounded-full {{ $className }}"></span>
|
||||
class="mr-1 inline-block h-3 w-3 rounded-full"
|
||||
style="background-color: {{ if .language }}
|
||||
{{- index $codebergColors .language -}}
|
||||
{{ else }}
|
||||
#0077b6
|
||||
{{ end }}"></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