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