blowfish/layouts/shortcodes/github.html

46 lines
1.7 KiB
HTML
Raw Normal View History

2023-01-14 05:13:28 -06:00
{{- $githubData := getJSON (print "https://api.github.com/repos/" (.Get "repo")) -}}
{{- $githubColors := .Site.Data.githubColors -}}
{{- with $githubData -}}
2023-01-14 05:39:17 -06:00
<a target="_blank" href="{{ .html_url }}" class="cursor-pointer">
<div class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border-2 rounded-md backdrop-blur shadow-2xl">
2023-01-14 05:13:28 -06:00
2023-01-14 05:39:17 -06:00
<div class="flex items-center">
<span class="text-2xl text-neutral-800 dark:text-neutral" style="margin-right:10px;">
{{ partial "icon.html" "github" }}
</span>
<div class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
{{ .full_name | markdownify | emojify }}
</div>
</div>
2023-01-14 05:13:28 -06:00
2023-01-14 05:39:17 -06:00
<p class="m-0 mt-2 text-md text-neutral-800 dark:text-neutral">
{{ .description | markdownify | emojify }}
</p>
2023-01-14 05:13:28 -06:00
2023-01-14 05:39:17 -06:00
<div class="m-0 mt-2 flex items-center">
2023-02-03 15:53:17 -06:00
<span class="mr-1 inline-block h-3 w-3 rounded-full" style="background-color: {{ if .language }} {{- index $githubColors .language -}} {{ else }} #0077b6 {{ end }}"></span>
2023-01-14 05:39:17 -06:00
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
2023-02-03 15:53:17 -06:00
{{ if .language }} {{ .language }} {{ else }} null {{ end }}
2023-01-14 05:13:28 -06:00
</div>
2023-01-14 05:39:17 -06:00
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
{{ partial "icon.html" "star" }}
</span>
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ .stargazers_count }}
2023-01-14 05:13:28 -06:00
</div>
2023-01-14 05:39:17 -06:00
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
{{ partial "icon.html" "fork" }}
</span>
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ .forks }}
2023-01-14 05:13:28 -06:00
</div>
2023-01-14 05:39:17 -06:00
</div>
2023-01-14 05:13:28 -06:00
</div>
2023-01-14 05:39:17 -06:00
</a>
2023-01-14 05:13:28 -06:00
{{- end -}}