diff --git a/src/css/nav.css b/src/css/nav.css index 569daf4..db7a857 100644 --- a/src/css/nav.css +++ b/src/css/nav.css @@ -52,7 +52,12 @@ cursor: pointer; } -@media screen and (min-width: 769px) and (max-width: 1023px) { +@media screen and (max-width: 1023px) { + .nav-container { + width: var(--nav-width); + top: calc(var(--navbar-height) + var(--announcement-bar-height)); + } + .nav-panel-explore { top: 20px !important; } @@ -110,11 +115,6 @@ .nav { box-shadow: 0.5px 0 3px var(--nav-border-color); } - - .nav-container { - width: var(--nav-width); - top: calc(var(--navbar-height) + var(--announcement-bar-height)); - } } @media screen and (min-width: 1024px) { diff --git a/src/helpers/get-module-announcement.js b/src/helpers/get-module-announcement.js deleted file mode 100644 index 8ca4ad8..0000000 --- a/src/helpers/get-module-announcement.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict' - -/** - * Gets module-specific announcement data for the current page - * Returns an object with all announcement properties or null if no announcement - * Usage: {{#with (get-module-announcement)}}{{this.text}}{{/with}} - * @param {object} context - Handlebars context - * @returns {object|null} Object with text, link, linkText properties or null - */ -module.exports = function ({ data: { root } }) { - const { page } = root - - if (!page || !page.module || !page.componentVersion || !page.componentVersion.asciidoc) { - return null - } - - const attributes = page.componentVersion.asciidoc.attributes - if (!attributes) return null - - const moduleKey = `announcement-${page.module}` - - // Check if module announcement exists - if (!attributes[moduleKey]) return null - - return { - text: attributes[`${moduleKey}-text`] || '', - link: attributes[`${moduleKey}-link`] || '', - linkText: attributes[`${moduleKey}-link-text`] || '', - } -} diff --git a/src/partials/announcement-bar.hbs b/src/partials/announcement-bar.hbs index eb77f8f..6d58247 100644 --- a/src/partials/announcement-bar.hbs +++ b/src/partials/announcement-bar.hbs @@ -1,23 +1,22 @@ -{{#if (and (ne page.component.name 'api') (or page.attributes.announcement page.componentVersion.asciidoc.attributes.announcement (get-module-announcement) site.keys.announcement))}} +{{#if (and (ne page.component.name 'api') (or page.attributes.announcement page.componentVersion.asciidoc.attributes.announcement site.keys.announcement))}}