From eff353d9c20f5ac5a9cfa0dd9c2546fedba49b8d Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Tue, 8 Dec 2020 11:42:30 +0100 Subject: [PATCH 1/3] Update top navigation menu --- src/partials/header-content.hbs | 53 +++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/src/partials/header-content.hbs b/src/partials/header-content.hbs index 8a29a327..8de1e479 100644 --- a/src/partials/header-content.hbs +++ b/src/partials/header-content.hbs @@ -231,40 +231,55 @@ Docs {{/with}} From 5872d0b08153fe3d6dd2c6797365396b51379b03 Mon Sep 17 00:00:00 2001 From: Guillaume Grossetie Date: Tue, 8 Dec 2020 15:18:53 +0100 Subject: [PATCH 3/3] Use contextual driver manual URLs --- src/helpers/docs-driver-manual-url.js | 12 ++++++++++++ src/partials/header-content.hbs | 8 ++++---- src/partials/page-versions.hbs | 5 ----- 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 src/helpers/docs-driver-manual-url.js diff --git a/src/helpers/docs-driver-manual-url.js b/src/helpers/docs-driver-manual-url.js new file mode 100644 index 00000000..ee308b3b --- /dev/null +++ b/src/helpers/docs-driver-manual-url.js @@ -0,0 +1,12 @@ +'use strict' + +module.exports = (page, componentName) => { + let version = page.version + if (version === '3.5') { + version = '1.7' // Driver version 1.7 corresponds to Neo4j version 3.5 + } + if (page.attributes && page.attributes.theme === 'docs' && ['4.1', '4.0', '1.7'].includes(version)) { + return `/docs/driver-manual/${version}` + } + return `/docs/${componentName}/${version}` +} diff --git a/src/partials/header-content.hbs b/src/partials/header-content.hbs index 5e7be8fb..56f56ebe 100644 --- a/src/partials/header-content.hbs +++ b/src/partials/header-content.hbs @@ -216,10 +216,10 @@ diff --git a/src/partials/page-versions.hbs b/src/partials/page-versions.hbs index 229c5773..2c472002 100644 --- a/src/partials/page-versions.hbs +++ b/src/partials/page-versions.hbs @@ -9,11 +9,6 @@ {{~#if this.missing}} is-missing{{/if}}" href="{{{relativize this.url}}}">{{this.displayVersion}} {{/unless}} {{/each}} - {{#if (in page.component.name 'dotnet-manual' 'go-manual' 'java-manual' 'javascript-manual' 'python-manual')}} - 4.1 - 4.0 - 1.7 - {{/if}} {{/with}}