From a3116eb3a9b18da98280bc454fec6b800f77cf21 Mon Sep 17 00:00:00 2001 From: dandimeo Date: Tue, 3 Oct 2023 17:26:57 +0200 Subject: [PATCH 01/12] first button shortcode implemenetation --- site/content/3.11/_index.md | 4 +++ .../layouts/shortcodes/button.html | 10 +++++++ .../arangodb-docs-theme/static/css/theme.css | 30 +++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 site/themes/arangodb-docs-theme/layouts/shortcodes/button.html diff --git a/site/content/3.11/_index.md b/site/content/3.11/_index.md index 1670162522..920c3d8e48 100644 --- a/site/content/3.11/_index.md +++ b/site/content/3.11/_index.md @@ -5,6 +5,10 @@ weight: 0 layout: default --- +{{< button text="Sign Up" color="green" link="https://docs.arangodb.com" position="right" >}} +Sign up +{{< /button >}} + {{< cloudbanner >}} {{< cards >}} diff --git a/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html b/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html new file mode 100644 index 0000000000..8ea62fc003 --- /dev/null +++ b/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html @@ -0,0 +1,10 @@ +{{ $link := .Get "link" }} +{{ $color := .Get "color" | default "green" }} +{{ $position := .Get "position" | default "left" }} + + +
+ + {{- .Inner | safeHTML -}} + +
\ No newline at end of file diff --git a/site/themes/arangodb-docs-theme/static/css/theme.css b/site/themes/arangodb-docs-theme/static/css/theme.css index 464f78eed8..095e317765 100644 --- a/site/themes/arangodb-docs-theme/static/css/theme.css +++ b/site/themes/arangodb-docs-theme/static/css/theme.css @@ -144,6 +144,36 @@ button, input, optgroup, select, textarea { margin-bottom: 15px; } +.button__wrapper { + border-radius: 4px; + text-align: center; + text-decoration: none; + border: none; + cursor: pointer; + width: fit-content; + height: 2rem; +} + +.button__wrapper__green { + background-color: var(--HEADERS-COLOR); +} + +.button__wrapper__grey { + background-color: var(--gray-200); +} + +.button__link { + padding: 5px 1em 5px 1em; + vertical-align: middle; + color: var(--gray-200); +} + +.button__wrapper:hover, +.button__wrapper:active { + color: var(--gray-950); + opacity: 0.8; + transition: 0.5s; +} ul, ol { margin-bottom: 20px; From 490a8e77b1a88554583ef30ceb5e407548155fbe Mon Sep 17 00:00:00 2001 From: dandimeo Date: Tue, 3 Oct 2023 17:38:16 +0200 Subject: [PATCH 02/12] button able to be put in middle of text --- site/content/3.11/_index.md | 7 +++++++ .../arangodb-docs-theme/layouts/shortcodes/button.html | 5 +++-- site/themes/arangodb-docs-theme/static/css/theme.css | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/site/content/3.11/_index.md b/site/content/3.11/_index.md index 920c3d8e48..9c745166e4 100644 --- a/site/content/3.11/_index.md +++ b/site/content/3.11/_index.md @@ -5,10 +5,17 @@ weight: 0 layout: default --- +Normal button + {{< button text="Sign Up" color="green" link="https://docs.arangodb.com" position="right" >}} Sign up {{< /button >}} +Some text we want button in {{< button text="Sign Up" color="green" link="https://docs.arangodb.com">}} +Sign up +{{< /button >}} +middle of it + {{< cloudbanner >}} {{< cards >}} diff --git a/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html b/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html index 8ea62fc003..697a00adc7 100644 --- a/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html +++ b/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html @@ -2,9 +2,10 @@ {{ $color := .Get "color" | default "green" }} {{ $position := .Get "position" | default "left" }} - + \ No newline at end of file diff --git a/site/themes/arangodb-docs-theme/static/css/theme.css b/site/themes/arangodb-docs-theme/static/css/theme.css index 095e317765..bec2906e8b 100644 --- a/site/themes/arangodb-docs-theme/static/css/theme.css +++ b/site/themes/arangodb-docs-theme/static/css/theme.css @@ -144,6 +144,10 @@ button, input, optgroup, select, textarea { margin-bottom: 15px; } +.button { + background: transparent; +} + .button__wrapper { border-radius: 4px; text-align: center; From a2b2dd52fc198a8c740a3770d7f9d677d5791bae Mon Sep 17 00:00:00 2001 From: dandimeo Date: Wed, 4 Oct 2023 10:53:52 +0200 Subject: [PATCH 03/12] deactivated class if no link in button --- site/content/3.11/_index.md | 2 +- .../arangodb-docs-theme/layouts/shortcodes/button.html | 6 +++--- site/themes/arangodb-docs-theme/static/css/theme.css | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/site/content/3.11/_index.md b/site/content/3.11/_index.md index 9c745166e4..4c197f57f1 100644 --- a/site/content/3.11/_index.md +++ b/site/content/3.11/_index.md @@ -7,7 +7,7 @@ layout: default Normal button -{{< button text="Sign Up" color="green" link="https://docs.arangodb.com" position="right" >}} +{{< button text="Sign Up" color="green" position="right" >}} Sign up {{< /button >}} diff --git a/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html b/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html index 697a00adc7..140ae69fc8 100644 --- a/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html +++ b/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html @@ -1,10 +1,10 @@ -{{ $link := .Get "link" }} +{{ $link := .Get "link" | default "" }} {{ $color := .Get "color" | default "green" }} {{ $position := .Get "position" | default "left" }} - \ No newline at end of file diff --git a/site/themes/arangodb-docs-theme/static/css/theme.css b/site/themes/arangodb-docs-theme/static/css/theme.css index 64f68134eb..501a74ce36 100644 --- a/site/themes/arangodb-docs-theme/static/css/theme.css +++ b/site/themes/arangodb-docs-theme/static/css/theme.css @@ -169,19 +169,18 @@ button, input, optgroup, select, textarea { .button__link { padding: 5px 1em 5px 1em; vertical-align: middle; - color: var(--gray-200); } -.button__wrapper:hover, -.button__wrapper:active { - color: var(--gray-950); - opacity: 0.8; - transition: 0.5s; +.button__text { + border-bottom: 2px solid var(--green-600); + font-weight: bold; + color: white; } .deactivated { pointer-events: none; cursor: none; + border-bottom: 0; } ul, ol { From 51f2c398e201e7b9ab1e116a4a19633cfe217373 Mon Sep 17 00:00:00 2001 From: dandimeo Date: Tue, 10 Oct 2023 15:14:41 +0200 Subject: [PATCH 05/12] delete text and position keys --- site/content/3.11/_index.md | 4 ++-- .../themes/arangodb-docs-theme/layouts/shortcodes/button.html | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/site/content/3.11/_index.md b/site/content/3.11/_index.md index 4c197f57f1..d5c4443ba1 100644 --- a/site/content/3.11/_index.md +++ b/site/content/3.11/_index.md @@ -7,11 +7,11 @@ layout: default Normal button -{{< button text="Sign Up" color="green" position="right" >}} +{{< button color="green" >}} Sign up {{< /button >}} -Some text we want button in {{< button text="Sign Up" color="green" link="https://docs.arangodb.com">}} +Some text we want button in {{< button color="green" link="https://docs.arangodb.com">}} Sign up {{< /button >}} middle of it diff --git a/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html b/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html index 29fe234d83..912a07bc89 100644 --- a/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html +++ b/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html @@ -1,9 +1,8 @@ {{ $link := .Get "link" | default "" }} {{ $color := .Get "color" | default "green" }} -{{ $position := .Get "position" | default "left" }} \ No newline at end of file diff --git a/site/themes/arangodb-docs-theme/static/css/theme.css b/site/themes/arangodb-docs-theme/static/css/theme.css index 630c2a598c..2de43ff174 100644 --- a/site/themes/arangodb-docs-theme/static/css/theme.css +++ b/site/themes/arangodb-docs-theme/static/css/theme.css @@ -177,12 +177,6 @@ button, input, optgroup, select, textarea { color: white; } -.deactivated { - pointer-events: none; - cursor: none; - border-bottom: 0; -} - ul, ol { margin-bottom: 20px; padding: 0; From dbcd1ee1d03a1658540f65f506f5bd2f716a34eb Mon Sep 17 00:00:00 2001 From: dandimeo Date: Mon, 16 Oct 2023 15:45:07 +0200 Subject: [PATCH 08/12] revert test 3.11 index content --- site/content/3.11/_index.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/site/content/3.11/_index.md b/site/content/3.11/_index.md index d5c4443ba1..1670162522 100644 --- a/site/content/3.11/_index.md +++ b/site/content/3.11/_index.md @@ -5,17 +5,6 @@ weight: 0 layout: default --- -Normal button - -{{< button color="green" >}} -Sign up -{{< /button >}} - -Some text we want button in {{< button color="green" link="https://docs.arangodb.com">}} -Sign up -{{< /button >}} -middle of it - {{< cloudbanner >}} {{< cards >}} From 39eaa5b6a667194c41bcc78873dd08057e5f04ac Mon Sep 17 00:00:00 2001 From: dandimeo Date: Tue, 17 Oct 2023 19:56:28 +0200 Subject: [PATCH 09/12] new button html and css --- site/content/3.11/_index.md | 14 +++++++ .../layouts/shortcodes/button.html | 8 +--- .../arangodb-docs-theme/static/css/theme.css | 38 +++++++++---------- 3 files changed, 34 insertions(+), 26 deletions(-) diff --git a/site/content/3.11/_index.md b/site/content/3.11/_index.md index 9b10d58b29..b35966faf6 100644 --- a/site/content/3.11/_index.md +++ b/site/content/3.11/_index.md @@ -4,6 +4,20 @@ menuTitle: '3.11' weight: 0 layout: default --- + + +Normal button + +{{< button color="green" >}} +Start Free +{{< /button >}} + +Some text we want button in {{< button color="green" link="https://docs.arangodb.com">}} +ArangoGraph Sign Up +{{< /button >}} +middle of it + + {{< cloudbanner >}} {{< cards >}} diff --git a/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html b/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html index a4de28c440..474cb4bf4a 100644 --- a/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html +++ b/site/themes/arangodb-docs-theme/layouts/shortcodes/button.html @@ -1,10 +1,4 @@ {{ $link := .Get "link" | default "" }} {{ $color := .Get "color" | default "green" }} - \ No newline at end of file + diff --git a/site/themes/arangodb-docs-theme/static/css/theme.css b/site/themes/arangodb-docs-theme/static/css/theme.css index a4dc5e26ae..d6f1504f54 100644 --- a/site/themes/arangodb-docs-theme/static/css/theme.css +++ b/site/themes/arangodb-docs-theme/static/css/theme.css @@ -146,35 +146,35 @@ button, input, optgroup, select, textarea { .button { background: transparent; -} - -.button > .wrapper { - border-radius: 4px; - text-align: center; - text-decoration: none; - border: none; - cursor: pointer; - width: fit-content; - height: 32px; -} - -.button > .wrapper.green { background-color: var(--HEADERS-COLOR); -} -.button > .wrapper.grey { - background-color: var(--gray-200); } .button__link { padding: 5px 16px 5px 16px; vertical-align: middle; + color: white; + font-weight: bold; + font-size: 14px; } -.button__text { - border-bottom: 2px solid var(--green-600); - font-weight: bold; +button { + border-radius: 4px; + font-weight: 700; + line-height: 16px; + min-height: 16px; + font-size: 14px; + padding: 12px 24px; color: white; + margin-bottom: 28px; +} + +button.green { + background-color: var(--HEADERS-COLOR); +} + +button.grey { + background-color: var(--gray-600); } ul, ol { From bc80649a13dbc1ae3cf963a9d9197c76f3cd8b5a Mon Sep 17 00:00:00 2001 From: dandimeo Date: Tue, 17 Oct 2023 20:10:26 +0200 Subject: [PATCH 10/12] delete old css --- .../arangodb-docs-theme/static/css/theme.css | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/site/themes/arangodb-docs-theme/static/css/theme.css b/site/themes/arangodb-docs-theme/static/css/theme.css index d6f1504f54..62f0e8a7b4 100644 --- a/site/themes/arangodb-docs-theme/static/css/theme.css +++ b/site/themes/arangodb-docs-theme/static/css/theme.css @@ -144,20 +144,6 @@ button, input, optgroup, select, textarea { margin-bottom: 15px; } -.button { - background: transparent; - background-color: var(--HEADERS-COLOR); - -} - -.button__link { - padding: 5px 16px 5px 16px; - vertical-align: middle; - color: white; - font-weight: bold; - font-size: 14px; -} - button { border-radius: 4px; font-weight: 700; From b89ab33721afae031844f65a2d3a71845378fd1e Mon Sep 17 00:00:00 2001 From: dandimeo Date: Wed, 18 Oct 2023 14:14:10 +0200 Subject: [PATCH 11/12] revert button example usage --- site/content/3.11/_index.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/site/content/3.11/_index.md b/site/content/3.11/_index.md index b35966faf6..4f07f8e91d 100644 --- a/site/content/3.11/_index.md +++ b/site/content/3.11/_index.md @@ -5,19 +5,6 @@ weight: 0 layout: default --- - -Normal button - -{{< button color="green" >}} -Start Free -{{< /button >}} - -Some text we want button in {{< button color="green" link="https://docs.arangodb.com">}} -ArangoGraph Sign Up -{{< /button >}} -middle of it - - {{< cloudbanner >}} {{< cards >}} From 7f0ac1f113321f763c173db004ff9a04b986b43b Mon Sep 17 00:00:00 2001 From: dandimeo Date: Wed, 18 Oct 2023 14:15:54 +0200 Subject: [PATCH 12/12] revert button example usage cut extra newline --- site/content/3.11/_index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/site/content/3.11/_index.md b/site/content/3.11/_index.md index 4f07f8e91d..9b10d58b29 100644 --- a/site/content/3.11/_index.md +++ b/site/content/3.11/_index.md @@ -4,7 +4,6 @@ menuTitle: '3.11' weight: 0 layout: default --- - {{< cloudbanner >}} {{< cards >}}