Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrmdhnreza <23427492+rmdhnreza@users.noreply.github.com>2022-06-11 12:04:20 +0300
committerGitHub <noreply@github.com>2022-06-11 12:04:20 +0300
commit3d09c23284089a7edaa4a45dc21807022c7878f6 (patch)
tree0e71a8ba77ca83dce990b912ef82d27ab2c773df
parent7a38f3ad5089a35188273095e6669808753ba767 (diff)
feat(article): GitLab Snippets Shortcode (#627)
-rw-r--r--assets/scss/partials/layout/article.scss12
-rw-r--r--exampleSite/content/post/rich-content/index.md6
-rw-r--r--layouts/shortcodes/gitlab.html4
3 files changed, 21 insertions, 1 deletions
diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss
index a809f8d..6199118 100644
--- a/assets/scss/partials/layout/article.scss
+++ b/assets/scss/partials/layout/article.scss
@@ -387,6 +387,18 @@
}
}
+ .gitlab-embed-snippets {
+ margin: 0 !important;
+
+ .file-holder.snippet-file-content {
+ margin-block-end: 0 !important;
+ margin-block-start: 0 !important;
+ margin-left: calc((var(--card-padding)) * -1) !important;
+ margin-right: calc((var(--card-padding)) * -1) !important;
+ padding: 0 var(--card-padding) !important;
+ }
+ }
+
/// Negative margins
blockquote,
figure,
diff --git a/exampleSite/content/post/rich-content/index.md b/exampleSite/content/post/rich-content/index.md
index 1d45fba..1ebb564 100644
--- a/exampleSite/content/post/rich-content/index.md
+++ b/exampleSite/content/post/rich-content/index.md
@@ -23,7 +23,7 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
## Twitter Simple Shortcode
-{{< twitter_simple 1085870671291310081 >}}
+{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
<br>
@@ -41,6 +41,10 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
{{< gist spf13 7896402 >}}
+## Gitlab Snippets Shortcode
+
+{{< gitlab 2349278 >}}
+
## Quote Shortcode
Stack adds a `quote` shortcode. For example:
diff --git a/layouts/shortcodes/gitlab.html b/layouts/shortcodes/gitlab.html
new file mode 100644
index 0000000..b5a16cf
--- /dev/null
+++ b/layouts/shortcodes/gitlab.html
@@ -0,0 +1,4 @@
+<script
+ type="application/javascript"
+ src="https://gitlab.com/-/snippets/{{ index .Params 0 }}.js"
+></script> \ No newline at end of file