From 3d09c23284089a7edaa4a45dc21807022c7878f6 Mon Sep 17 00:00:00 2001
From: rmdhnreza <23427492+rmdhnreza@users.noreply.github.com>
Date: Sat, 11 Jun 2022 09:04:20 +0000
Subject: [PATCH] feat(article): GitLab Snippets Shortcode (#627)
---
assets/scss/partials/layout/article.scss | 12 ++++++++++++
exampleSite/content/post/rich-content/index.md | 6 +++++-
layouts/shortcodes/gitlab.html | 4 ++++
3 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 layouts/shortcodes/gitlab.html
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" >}}
@@ -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 @@
+
\ No newline at end of file