From fe13b9232d121fc2de128ef1bb05a217336965fb Mon Sep 17 00:00:00 2001 From: Adam Cowley Date: Thu, 8 Aug 2024 10:52:24 +0100 Subject: [PATCH 1/5] add page-chatbot attribute to enable chatbot --- preview-src/driver.adoc | 1 + src/partials/footer-scripts.hbs | 9 +++++++-- src/partials/head-styles.hbs | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/preview-src/driver.adoc b/preview-src/driver.adoc index a8375e53..7566dd4b 100644 --- a/preview-src/driver.adoc +++ b/preview-src/driver.adoc @@ -1,6 +1,7 @@ = Neo4j & Python :page-theme: docs :page-role: code-walkthrough +:page-chatbot: http://localhost:3000/ :!toc: diff --git a/src/partials/footer-scripts.hbs b/src/partials/footer-scripts.hbs index 5133b1b1..53b37e41 100644 --- a/src/partials/footer-scripts.hbs +++ b/src/partials/footer-scripts.hbs @@ -10,7 +10,7 @@ {{/if}} {{#if (and (eq @root.page.attributes.theme "cheat-sheet") (not (eq @root.site.url "http://localhost:5252")))}} - + {{!-- --}} @@ -28,7 +28,12 @@ {{/if}} +{{#if page.attributes.chatbot}} +
+ +{{/if}} +
- \ No newline at end of file + diff --git a/src/partials/head-styles.hbs b/src/partials/head-styles.hbs index 33903c16..0366c568 100644 --- a/src/partials/head-styles.hbs +++ b/src/partials/head-styles.hbs @@ -19,3 +19,7 @@ + +{{#if page.attributes.chatbot}} + +{{/if}} \ No newline at end of file From 3c20c7ce7eafb1b948e01d88305de825f5dbd4a2 Mon Sep 17 00:00:00 2001 From: Adam Cowley Date: Thu, 8 Aug 2024 12:14:16 +0100 Subject: [PATCH 2/5] remove trailing slash from chatbot url --- preview-src/driver.adoc | 2 +- slash.diff | 38 +++++++++++++++++++++++++++++++++ src/partials/footer-scripts.hbs | 2 +- src/partials/head-styles.hbs | 2 +- 4 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 slash.diff diff --git a/preview-src/driver.adoc b/preview-src/driver.adoc index 7566dd4b..c5beb27e 100644 --- a/preview-src/driver.adoc +++ b/preview-src/driver.adoc @@ -1,7 +1,7 @@ = Neo4j & Python :page-theme: docs :page-role: code-walkthrough -:page-chatbot: http://localhost:3000/ +:page-chatbot: http://localhost:3000 :!toc: diff --git a/slash.diff b/slash.diff new file mode 100644 index 00000000..b1884c42 --- /dev/null +++ b/slash.diff @@ -0,0 +1,38 @@ +diff --git a/preview-src/driver.adoc b/preview-src/driver.adoc +index 7566dd4..c5beb27 100644 +--- a/preview-src/driver.adoc ++++ b/preview-src/driver.adoc +@@ -1,7 +1,7 @@ + = Neo4j & Python + :page-theme: docs + :page-role: code-walkthrough +-:page-chatbot: http://localhost:3000/ ++:page-chatbot: http://localhost:3000 + :!toc: + + +diff --git a/src/partials/footer-scripts.hbs b/src/partials/footer-scripts.hbs +index 53b37e4..c70e1ef 100644 +--- a/src/partials/footer-scripts.hbs ++++ b/src/partials/footer-scripts.hbs +@@ -30,7 +30,7 @@ + + {{#if page.attributes.chatbot}} +
+- ++ + {{/if}} + +
+diff --git a/src/partials/head-styles.hbs b/src/partials/head-styles.hbs +index 0366c56..cb256e3 100644 +--- a/src/partials/head-styles.hbs ++++ b/src/partials/head-styles.hbs +@@ -21,5 +21,5 @@ + + + {{#if page.attributes.chatbot}} +- ++ + {{/if}} +\ No newline at end of file diff --git a/src/partials/footer-scripts.hbs b/src/partials/footer-scripts.hbs index 53b37e41..c70e1ef5 100644 --- a/src/partials/footer-scripts.hbs +++ b/src/partials/footer-scripts.hbs @@ -30,7 +30,7 @@ {{#if page.attributes.chatbot}}
- + {{/if}}
diff --git a/src/partials/head-styles.hbs b/src/partials/head-styles.hbs index 0366c568..cb256e3d 100644 --- a/src/partials/head-styles.hbs +++ b/src/partials/head-styles.hbs @@ -21,5 +21,5 @@ {{#if page.attributes.chatbot}} - + {{/if}} \ No newline at end of file From a7bd6aea73191bceab1a77c71b16cc7f806ccabd Mon Sep 17 00:00:00 2001 From: Adam Cowley Date: Thu, 8 Aug 2024 12:14:32 +0100 Subject: [PATCH 3/5] remove diff --- slash.diff | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 slash.diff diff --git a/slash.diff b/slash.diff deleted file mode 100644 index b1884c42..00000000 --- a/slash.diff +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/preview-src/driver.adoc b/preview-src/driver.adoc -index 7566dd4..c5beb27 100644 ---- a/preview-src/driver.adoc -+++ b/preview-src/driver.adoc -@@ -1,7 +1,7 @@ - = Neo4j & Python - :page-theme: docs - :page-role: code-walkthrough --:page-chatbot: http://localhost:3000/ -+:page-chatbot: http://localhost:3000 - :!toc: - - -diff --git a/src/partials/footer-scripts.hbs b/src/partials/footer-scripts.hbs -index 53b37e4..c70e1ef 100644 ---- a/src/partials/footer-scripts.hbs -+++ b/src/partials/footer-scripts.hbs -@@ -30,7 +30,7 @@ - - {{#if page.attributes.chatbot}} -
-- -+ - {{/if}} - -
-diff --git a/src/partials/head-styles.hbs b/src/partials/head-styles.hbs -index 0366c56..cb256e3 100644 ---- a/src/partials/head-styles.hbs -+++ b/src/partials/head-styles.hbs -@@ -21,5 +21,5 @@ - - - {{#if page.attributes.chatbot}} -- -+ - {{/if}} -\ No newline at end of file From 31c0baa1b99359633d0b6e5e27fd9ab8e046c1bc Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Fri, 9 Aug 2024 13:37:46 +0100 Subject: [PATCH 4/5] link chatbot styles first --- src/partials/head-styles.hbs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/partials/head-styles.hbs b/src/partials/head-styles.hbs index cb256e3d..22016a2a 100644 --- a/src/partials/head-styles.hbs +++ b/src/partials/head-styles.hbs @@ -1,6 +1,11 @@ + +{{#if page.attributes.chatbot}} + +{{/if}} + {{#if page.attributes.cdn}} @@ -18,8 +23,3 @@ - - -{{#if page.attributes.chatbot}} - -{{/if}} \ No newline at end of file From 309f72a0ca1b0359896b2f12fa1558331819e957 Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Fri, 9 Aug 2024 13:38:18 +0100 Subject: [PATCH 5/5] update docs styles for chatbot --- src/css/base.css | 7 ++++++- src/css/neo4j-docs.css | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/css/base.css b/src/css/base.css index 034f4be6..0df1c325 100644 --- a/src/css/base.css +++ b/src/css/base.css @@ -1,6 +1,6 @@ html, body { - height: 100%; + height: fit-content; } *, @@ -29,6 +29,11 @@ body { margin: 0; } +h1, +h2 { + font-family: var(--body-font-family); +} + a { text-decoration: none; } diff --git a/src/css/neo4j-docs.css b/src/css/neo4j-docs.css index 4a48e89c..13560a9e 100644 --- a/src/css/neo4j-docs.css +++ b/src/css/neo4j-docs.css @@ -1,3 +1,10 @@ +/* chatbot */ +.docs .ndl-drawer.ndl-drawer-overlay { + position: fixed; + top: 4px; + box-shadow: -2px 1px 2px 1px rgba(var(--colors-neutral-20)); +} + .doc .paragraph .title { font-weight: var(--body-font-weight-bold); }