chore(github.html): move div into with syntax

This commit is contained in:
ZhenShuo Leo
2025-07-13 20:08:32 +08:00
parent d8bdf7e316
commit 237c90afa9

View File

@@ -4,9 +4,8 @@
{{- $githubThumbnailURL := print "https://opengraph.githubassets.com/0/" (.Get "repo") -}}
{{- $showThumbnail := .Get "showThumbnail" | default true -}}
<div class="github-card-wrapper">
{{- with $githubData -}}
{{- with $githubData -}}
<div class="github-card-wrapper">
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
<div
class="w-full md:w-auto p-0 m-0 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
@@ -71,7 +70,7 @@
data-repo-url="{{ $githubURL }}"
data-repo-id="{{ $id }}"></script>
</a>
{{- else -}}
</div>
{{- else -}}
{{ warnf "github shortcode: unable to fetch %q: %s" $githubURL .Position }}
{{- end -}}
</div>
{{- end -}}