summaryrefslogtreecommitdiff
path: root/themes/blowfish/layouts/shortcodes/codeberg.html
diff options
context:
space:
mode:
authorChristoph Cullmann <christoph@cullmann.io>2024-08-28 22:54:34 +0200
committerChristoph Cullmann <christoph@cullmann.io>2024-08-28 22:54:34 +0200
commit8f3d03b1888fed23e6aa07d6077045e673357481 (patch)
treea914b8f43b8486380ccc1c35721b28da2ff7986a /themes/blowfish/layouts/shortcodes/codeberg.html
parent8db6bd0e555dca050d7d885582100c5ca5ba3aa2 (diff)
sync themeHEADmaster
Diffstat (limited to 'themes/blowfish/layouts/shortcodes/codeberg.html')
-rw-r--r--themes/blowfish/layouts/shortcodes/codeberg.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/themes/blowfish/layouts/shortcodes/codeberg.html b/themes/blowfish/layouts/shortcodes/codeberg.html
index bd52323..a6a8efa 100644
--- a/themes/blowfish/layouts/shortcodes/codeberg.html
+++ b/themes/blowfish/layouts/shortcodes/codeberg.html
@@ -1,6 +1,6 @@
{{ $id := delimit (slice "codeberg" (partial "functions/uid.html" .)) "-" }}
{{- $codebergURL := print "https://codeberg.org/api/v1/repos/" (.Get "repo") -}}
-{{- $codebergData := getJSON ($codebergURL) -}}
+{{- $codebergData := resources.GetRemote $codebergURL | transform.Unmarshal -}}
{{- $codebergColors := .Site.Data.codebergColors -}}
{{- with $codebergData -}}
@@ -34,14 +34,14 @@
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
{{ partial "icon.html" "star" }}
</span>
- <div id="{{ $id }}-stargazers" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
+ <div id="{{ $id }}-stars_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ .stars_count }}
</div>
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
{{ partial "icon.html" "fork" }}
</span>
- <div id="{{ $id }}-forks" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
+ <div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ .forks_count }}
</div>
@@ -58,7 +58,7 @@
.then(data => {
document.getElementById('{{ $id }}-full_name').innerHTML = data.full_name;
document.getElementById('{{ $id }}-description').innerHTML = data.description;
- document.getElementById('{{ $id }}-stars_count').innerHTML = data.starts_count;
+ document.getElementById('{{ $id }}-stars_count').innerHTML = data.stars_count;
document.getElementById('{{ $id }}-forks_count').innerHTML = data.forks_count;
})
.catch(error => console.error(error))