From 242789f6d2073264c9f0b2699e1869a7ef42e180 Mon Sep 17 00:00:00 2001 From: DioDuPiMa Date: Wed, 29 Mar 2023 19:54:43 +0100 Subject: [PATCH] [add] PoC implementation of gitlab shortcut --- layouts/shortcodes/gitlab.html | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 layouts/shortcodes/gitlab.html diff --git a/layouts/shortcodes/gitlab.html b/layouts/shortcodes/gitlab.html new file mode 100644 index 00000000..196727db --- /dev/null +++ b/layouts/shortcodes/gitlab.html @@ -0,0 +1,40 @@ +{{- $githubData := getJSON (print "https://gitlab.com/api/v4/projects/" (.Get "repo_id")) -}} +{{- $githubColors := .Site.Data.githubColors -}} +{{- with $githubData -}} + + +
+ +
+ + {{ partial "icon.html" "gitlab" }} + +
+ {{ .name_with_namespace | markdownify | emojify }} +
+
+ +

+ {{ .description | markdownify | emojify }} +

+ +
+ + {{ partial "icon.html" "star" }} + +
+ {{ .star_count }} +
+ + + {{ partial "icon.html" "fork" }} + +
+ {{ .forks_count }} +
+ +
+ +
+
+{{- end -}}