This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow-site.git


The following commit(s) were added to refs/heads/main by this push:
     new f947c61c80 Keep the main navigation visible on mid-size screens (#1758)
f947c61c80 is described below

commit f947c61c809715abaf6837e0260e110275c93597
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu Nov 26 20:50:51 2026 +0100

    Keep the main navigation visible on mid-size screens (#1758)
    
    Shorten the longest menu labels (Documentation -> Docs,
    Announcements -> News, Airflow Survey 2025 -> Survey) so they no
    longer wrap onto several lines, and show the full menu down to
    1025px wide instead of switching to the hamburger menu at 1280px.
    
    Generated-by: Claude Opus 5
---
 landing-pages/site/assets/scss/_navbar.scss        | 52 +++++++++++++++++++++-
 .../site/content/en/announcements/_index.md        |  1 +
 .../content/en/blog/airflow-survey-2025/index.md   |  1 +
 landing-pages/site/content/en/docs/_index.md       |  1 +
 landing-pages/site/layouts/_partials/navbar.html   |  4 +-
 5 files changed, 55 insertions(+), 4 deletions(-)

diff --git a/landing-pages/site/assets/scss/_navbar.scss 
b/landing-pages/site/assets/scss/_navbar.scss
index d72c1a9a31..80544256df 100644
--- a/landing-pages/site/assets/scss/_navbar.scss
+++ b/landing-pages/site/assets/scss/_navbar.scss
@@ -19,6 +19,10 @@
 @import "colors";
 @import "media";
 
+// The site-wide $tablet breakpoint (1280px) is too wide for the main menu: it
+// fits on one row down to ~1000px, so only collapse to the hamburger below 
that.
+$navbar-collapse: 1024px;
+
 .navbar {
   position: fixed;
   top: 0;
@@ -50,6 +54,7 @@
   &__text-link {
     @extend .bodytext__medium--greyish-brown;
     margin-right: 30px;
+    white-space: nowrap; // never break a multi-word label ("Use Cases") 
across lines
     position: relative;
     width: fit-content;
     transition: color 0.3s ease;
@@ -84,21 +89,64 @@
     align-items: center;
     margin-left: auto; // push to far right in the navbar flex layout
 
-    @media (max-width: $tablet) {
+    @media (max-width: $navbar-collapse) {
       margin-right: 12px;
     }
   }
 }
 
+// Large-but-not-wide screens: tighten the spacing so the menu stays on one 
row.
+@media (min-width: $tablet + 1) and (max-width: 1440px) {
+  .navbar {
+    padding-left: 30px;
+    padding-right: 30px;
+
+    &__menu-content {
+      padding-left: 32px;
+    }
+
+    &__text-link {
+      margin-right: 20px;
+    }
+  }
+}
+
+// Mid-size screens: compact header (its height matches 
$fixed-header-offset-mobile,
+// which the page body uses below $tablet), with the full menu still visible.
 @media (max-width: $tablet) {
   .navbar {
-    padding: 20px;
+    padding: 20px 24px;
 
     &__icon-container svg {
       width: 93px;
       height: auto;
     }
 
+    &__menu-content {
+      padding-left: 24px;
+    }
+
+    &__text-link {
+      margin-right: 16px;
+    }
+  }
+}
+
+// Show either the inline menu or the hamburger, never both.
+@media (min-width: $navbar-collapse + 1) {
+  .navbar__drawer-container {
+    display: none;
+  }
+}
+
+@media (max-width: $navbar-collapse) {
+  .navbar {
+    padding: 20px;
+
+    &__menu-container {
+      display: none;
+    }
+
     &__menu-content {
       flex-direction: column;
       align-items: flex-start;
diff --git a/landing-pages/site/content/en/announcements/_index.md 
b/landing-pages/site/content/en/announcements/_index.md
index 75a5f15974..bd0442a21a 100644
--- a/landing-pages/site/content/en/announcements/_index.md
+++ b/landing-pages/site/content/en/announcements/_index.md
@@ -4,6 +4,7 @@ date: 2020-08-08T05:30:20+05:30
 draft: false
 menu:
   main:
+    name: "News"
     weight: 25
 
 ---
diff --git a/landing-pages/site/content/en/blog/airflow-survey-2025/index.md 
b/landing-pages/site/content/en/blog/airflow-survey-2025/index.md
index f2601df105..7da12110a0 100644
--- a/landing-pages/site/content/en/blog/airflow-survey-2025/index.md
+++ b/landing-pages/site/content/en/blog/airflow-survey-2025/index.md
@@ -9,6 +9,7 @@ linkedin: "sunank200"
 description: "With more than 5,818 responses from 122 countries, this is the 
largest data engineering survey to date. Conducted annually, the Apache Airflow 
Survey offers valuable insights into Airflow usage and helps guide our future 
efforts."
 menu:
   main:
+    name: "Survey"
     weight: 30
 ---
 
diff --git a/landing-pages/site/content/en/docs/_index.md 
b/landing-pages/site/content/en/docs/_index.md
index 602c096e6a..e0f523e386 100644
--- a/landing-pages/site/content/en/docs/_index.md
+++ b/landing-pages/site/content/en/docs/_index.md
@@ -4,6 +4,7 @@ linkTitle: "Documentation"
 weight: 20
 menu:
     main:
+        name: "Docs"
         weight: 10
 ---
 
diff --git a/landing-pages/site/layouts/_partials/navbar.html 
b/landing-pages/site/layouts/_partials/navbar.html
index c66a42b5cc..e681b97997 100644
--- a/landing-pages/site/layouts/_partials/navbar.html
+++ b/landing-pages/site/layouts/_partials/navbar.html
@@ -25,7 +25,7 @@
             {{ with resources.Get "icons/airflow-logo.svg" }}{{ .Content | 
safeHTML }}{{ end }}
         </a>
     </div>
-    <div class="desktop-only navbar__menu-container">
+    <div class="navbar__menu-container">
         {{ template "menu-content" . }}
     </div>
     {{ if .Site.Params.ui.showLightDarkModeMenu -}}
@@ -33,7 +33,7 @@
         {{ partial "theme-toggler" . }}
     </div>
     {{ end -}}
-    <div class="no-desktop navbar__drawer-container">
+    <div class="navbar__drawer-container">
         <button class="navbar__toggle-button" id="navbar-toggle-button" 
aria-label="Open navigation menu" aria-expanded="false" 
aria-controls="navbar-drawer">
             {{ with resources.Get "icons/hamburger-icon.svg" }}
                 <div id="hamburger-icon" class="navbar__toggle-button--icon 
visible">

Reply via email to