update theme
This commit is contained in:
parent
fc43dba964
commit
93fea0ed81
183 changed files with 6015 additions and 6241 deletions
|
@ -3,55 +3,50 @@
|
|||
|
||||
{{- $gitLabData := resources.GetRemote $gitlabURL | transform.Unmarshal -}}
|
||||
{{- with $gitLabData -}}
|
||||
<div class="gitlab-card-wrapper">
|
||||
<a id="{{ $id }}" target="_blank" href="{{ .web_url }}" class="cursor-pointer">
|
||||
<div
|
||||
class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
|
||||
<div class="flex items-center">
|
||||
<span class="text-2xl text-neutral-800 dark:text-neutral mr-[10px]">
|
||||
{{ partial "icon.html" "gitlab" }}
|
||||
</span>
|
||||
<div
|
||||
id="{{ $id }}-name_with_namespace"
|
||||
class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
|
||||
{{ .name_with_namespace | markdownify }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a id="{{ $id }}" target="_blank" href="{{ .web_url }}" class="cursor-pointer">
|
||||
<div class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
|
||||
<p id="{{ $id }}-description" class="m-0 mt-2 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .description | markdownify }}
|
||||
</p>
|
||||
|
||||
<div class="flex items-center">
|
||||
<span class="text-2xl text-neutral-800 dark:text-neutral" style="margin-right:10px;">
|
||||
{{ partial "icon.html" "gitlab" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-name_with_namespace" class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
|
||||
{{ .name_with_namespace | markdownify }}
|
||||
<div class="m-0 mt-2 flex items-center">
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "star" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-star_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .star_count }}
|
||||
</div>
|
||||
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "fork" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .forks_count }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p id="{{ $id }}-description" class="m-0 mt-2 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .description | markdownify }}
|
||||
</p>
|
||||
|
||||
<div class="m-0 mt-2 flex items-center">
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "star" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-star_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .star_count }}
|
||||
</div>
|
||||
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "fork" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .forks_count }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
|
||||
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script
|
||||
async
|
||||
type="text/javascript"
|
||||
src="{{ $fetchRepo.RelPermalink }}"
|
||||
integrity="{{ $fetchRepo.Data.Integrity }}"
|
||||
data-repo-url="{{ $gitlabURL }}"
|
||||
data-repo-id="{{ $id }}"></script>
|
||||
</a>
|
||||
</div>
|
||||
<script>
|
||||
fetch({{ $gitlabURL }}, {
|
||||
headers: new Headers({
|
||||
'User-agent': 'Mozilla/4.0 Custom User Agent'
|
||||
})
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
document.getElementById('{{ $id }}-name_with_namespace').innerHTML = data.name_with_namespace;
|
||||
document.getElementById('{{ $id }}-description').innerHTML = data.description;
|
||||
document.getElementById('{{ $id }}-star_count').innerHTML = data.star_count;
|
||||
document.getElementById('{{ $id }}-forks_count').innerHTML = data.forks_count;
|
||||
})
|
||||
.catch(error => console.error(error))
|
||||
</script>
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue