add github shortcode

This commit is contained in:
Nuno Coração 2023-01-14 11:39:17 +00:00
parent 4c5d367b12
commit 98b48ac6bb
5 changed files with 72 additions and 40 deletions

View file

@ -684,11 +684,6 @@ select {
max-width: 65ch;
}
.prose :where(p):not(:where([class~="not-prose"] *)) {
margin-top: 1.25em;
margin-bottom: 1.25em;
}
.prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) {
color: var(--tw-prose-lead);
font-size: 1.25em;
@ -1056,6 +1051,11 @@ select {
line-height: 1.75;
}
.prose :where(p):not(:where([class~="not-prose"] *)) {
margin-top: 1.25em;
margin-bottom: 1.25em;
}
.prose :where(video):not(:where([class~="not-prose"] *)) {
margin-top: 2em;
margin-bottom: 2em;
@ -1271,14 +1271,14 @@ select {
margin: 0.25rem;
}
.m-2 {
margin: 0.5rem;
}
.m-0 {
margin: 0px;
}
.m-2 {
margin: 0.5rem;
}
.-mx-2 {
margin-left: -0.5rem;
margin-right: -0.5rem;
@ -1409,6 +1409,14 @@ select {
margin-bottom: 2.5rem;
}
.mr-1 {
margin-right: 0.25rem;
}
.mr-5 {
margin-right: 1.25rem;
}
.\!mb-9 {
margin-bottom: 2.25rem !important;
}
@ -1485,6 +1493,10 @@ select {
height: 2rem;
}
.h-3 {
height: 0.75rem;
}
.h-full {
height: 100%;
}
@ -1545,6 +1557,10 @@ select {
width: 2rem;
}
.w-3 {
width: 0.75rem;
}
.w-6 {
width: 1.5rem;
}
@ -1893,6 +1909,10 @@ select {
padding: 0.25rem;
}
.p-5 {
padding: 1.25rem;
}
.p-0 {
padding: 0px;
}

1
assets/icons/fork.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M80 104c13.3 0 24-10.7 24-24s-10.7-24-24-24S56 66.7 56 80s10.7 24 24 24zm80-24c0 32.8-19.7 61-48 73.3V192c0 17.7 14.3 32 32 32H304c17.7 0 32-14.3 32-32V153.3C307.7 141 288 112.8 288 80c0-44.2 35.8-80 80-80s80 35.8 80 80c0 32.8-19.7 61-48 73.3V192c0 53-43 96-96 96H256v70.7c28.3 12.3 48 40.5 48 73.3c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-32.8 19.7-61 48-73.3V288H144c-53 0-96-43-96-96V153.3C19.7 141 0 112.8 0 80C0 35.8 35.8 0 80 0s80 35.8 80 80zm208 24c13.3 0 24-10.7 24-24s-10.7-24-24-24s-24 10.7-24 24s10.7 24 24 24zM248 432c0-13.3-10.7-24-24-24s-24 10.7-24 24s10.7 24 24 24s24-10.7 24-24z"/></svg>

After

Width:  |  Height:  |  Size: 691 B

1
assets/icons/star.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M287.9 0C297.1 0 305.5 5.25 309.5 13.52L378.1 154.8L531.4 177.5C540.4 178.8 547.8 185.1 550.7 193.7C553.5 202.4 551.2 211.9 544.8 218.2L433.6 328.4L459.9 483.9C461.4 492.9 457.7 502.1 450.2 507.4C442.8 512.7 432.1 513.4 424.9 509.1L287.9 435.9L150.1 509.1C142.9 513.4 133.1 512.7 125.6 507.4C118.2 502.1 114.5 492.9 115.1 483.9L142.2 328.4L31.11 218.2C24.65 211.9 22.36 202.4 25.2 193.7C28.03 185.1 35.5 178.8 44.49 177.5L197.7 154.8L266.3 13.52C270.4 5.249 278.7 0 287.9 0L287.9 0zM287.9 78.95L235.4 187.2C231.9 194.3 225.1 199.3 217.3 200.5L98.98 217.9L184.9 303C190.4 308.5 192.9 316.4 191.6 324.1L171.4 443.7L276.6 387.5C283.7 383.7 292.2 383.7 299.2 387.5L404.4 443.7L384.2 324.1C382.9 316.4 385.5 308.5 391 303L476.9 217.9L358.6 200.5C350.7 199.3 343.9 194.3 340.5 187.2L287.9 78.95z"/></svg>

After

Width:  |  Height:  |  Size: 889 B

View file

@ -40,6 +40,7 @@ The full list of built-in icons and their corresponding names can referenced bel
| facebook | {{< icon facebook >}} |
| fire | {{< icon fire >}} |
| flickr | {{< icon flickr >}} |
| fork | {{< icon fork >}} |
| foursquare | {{< icon foursquare >}} |
| ghost | {{< icon ghost >}} |
| github | {{< icon github >}} |
@ -87,6 +88,7 @@ The full list of built-in icons and their corresponding names can referenced bel
| snapchat | {{< icon snapchat >}} |
| soundcloud | {{< icon soundcloud >}} |
| stack-overflow | {{< icon stack-overflow >}} |
| star | {{< icon star >}} |
| steam | {{< icon steam >}} |
| stripe | {{< icon stripe >}} |
| sun | {{< icon sun >}} |

View file

@ -1,38 +1,46 @@
{{- $githubData := getJSON (print "https://api.github.com/repos/" (.Get "repo")) -}}
{{- $githubColors := .Site.Data.githubColors -}}
{{- with $githubData -}}
<a>
<div class="w-full md:w-auto border border-neutral-200 dark:border-neutral-700 border-2 rounded-md backdrop-blur">
<div class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
<span>{{ partial "icon.html" "github" }} </span>
{{ .full_name | emojify }}
<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">
<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>
<p class="m-0 mt-2 text-md text-neutral-800 dark:text-neutral">
{{ .description | markdownify | emojify }}
</p>
<div class="m-0 mt-2 flex items-center">
<span class="mr-1 inline-block h-3 w-3 rounded-full" style="background-color: {{- index $githubColors .language -}}"></span>
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ .language }}
</div>
<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 }}
</div>
<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 }}
</div>
</div>
</div>
</div>
</a>
<!--div class="github my-4 rounded border p-4 dark:border-darkBorder">
<div class="flex items-center text-xl">
<i class="eva eva-github mr-2"></i>
<a class="after:hidden" href="{{- .html_url -}}" target="_blank">{{- .full_name -}}</a>
</div>
<div class="my-2 leading-6">{{- .description -}}</div>
<div class="flex items-center">
<div class="mr-4 inline-flex items-center">
<span class="mr-1 inline-block h-3 w-3 rounded-full" style="background-color: {{- index $githubColors .language -}}"></span>
<span>{{- .language -}}</span>
</div>
<div class="mr-4 inline-flex items-center">
<i class="eva eva-star mr-1 text-amber-400"></i>
<span>{{- .stargazers_count -}}</span>
</div>
<div class="inline-flex items-center">
<i class="eva eva-shuffle-2 mr-1 text-blue-500"></i>
<span>{{- .forks -}}</span>
</div>
</div>
</div-->
{{- end -}}