From bd42774b5362669657dd913e7793b2b14bafd1bd Mon Sep 17 00:00:00 2001
From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Date: Mon, 16 Oct 2023 12:57:52 -0400
Subject: [PATCH] Added container shortcode and fixed css around menu header
---
CHANGELOG.md | 3 +++
assets/css/goblin.css | 4 ++--
layouts/shortcodes/container.html | 3 +++
3 files changed, 8 insertions(+), 2 deletions(-)
create mode 100644 layouts/shortcodes/container.html
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 31f0d6f62..7005cf9eb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,9 @@
* Created type `page` and moved `/content/_index.md` to be that type. This
breaks backwards compatibility therefore we must bump major version
according to semantic versioning.
+* Minor improvement to CSS so `page` types dont get clipped by the menu header.
+* Added a container shortcode for use on `page` types to get left and right
+ margins.
## 1.1.0
diff --git a/assets/css/goblin.css b/assets/css/goblin.css
index 9cd9aadb2..c2d772593 100644
--- a/assets/css/goblin.css
+++ b/assets/css/goblin.css
@@ -1964,7 +1964,7 @@ hr:after {
:root {
--ifm-navbar-background-color: var(--ifm-background-surface-color);
- --ifm-navbar-height: 3.75rem;
+ --ifm-navbar-height: 4.75rem;
--ifm-navbar-item-padding-horizontal: 1rem;
--ifm-navbar-item-padding-vertical: 0.25rem;
--ifm-navbar-link-color: var(--ifm-font-base-color);
@@ -3461,7 +3461,7 @@ body > div {
}
.main-wrapper {
flex: 1 0 auto;
- margin-top: var(--ifm-navbar-height);
+ margin-top: calc(1em + var(--ifm-navbar-height));
}
@media (min-width:301px) {
.sidebar_25T_ {
diff --git a/layouts/shortcodes/container.html b/layouts/shortcodes/container.html
new file mode 100644
index 000000000..59c7e2aee
--- /dev/null
+++ b/layouts/shortcodes/container.html
@@ -0,0 +1,3 @@
+<div class="container">
+ {{ .Inner | markdownify }}
+</div>
--
GitLab