mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
Merge pull request #2466 from ZhenShuo2021/feat/repo-card-csp
✨ Feat(repo-card): remove inline style
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{{- $githubURL := print "https://api.github.com/repos/" (.Get "repo") -}}
|
||||
{{- $githubThumbnailURL := print "https://opengraph.githubassets.com/0/" (.Get "repo") -}}
|
||||
{{- $showThumbnail := .Get "showThumbnail" | default true -}}
|
||||
{{- $githubColors := .Site.Data.repoColors -}}
|
||||
{{- $repoColors := .Site.Data.repoColors -}}
|
||||
{{- $githubData := dict -}}
|
||||
{{- with try (resources.GetRemote $githubURL) -}}
|
||||
{{- with .Err -}}
|
||||
@@ -46,13 +46,12 @@
|
||||
</p>
|
||||
|
||||
<div class="m-0 mt-2 flex items-center">
|
||||
{{ $language := cond .language .language "default" }}
|
||||
{{ $currentLangs := $.Page.Store.Get "repoCardLanguages" | default slice }}
|
||||
{{ $.Page.Store.Set "repoCardLanguages" ($currentLangs | append $language) }}
|
||||
<span
|
||||
class="mr-1 inline-block h-3 w-3 rounded-full"
|
||||
style="background-color: {{ if .language }}
|
||||
{{- index $githubColors .language -}}
|
||||
{{ else }}
|
||||
#0077b6
|
||||
{{ end }}"></span>
|
||||
class="mr-1 inline-block h-3 w-3 rounded-full language-dot"
|
||||
data-language="{{ $language }}"></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