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 7500598c35 fix theme selector (#1364)
7500598c35 is described below
commit 7500598c352116d58be88f758cd1b0dc3f5f4604
Author: Yeonguk Choo <[email protected]>
AuthorDate: Thu Jan 1 02:07:10 2026 +0900
fix theme selector (#1364)
---
landing-pages/site/layouts/_partials/navbar.html | 78 ------------------------
landing-pages/site/layouts/partials/navbar.html | 15 ++---
2 files changed, 5 insertions(+), 88 deletions(-)
diff --git a/landing-pages/site/layouts/_partials/navbar.html
b/landing-pages/site/layouts/_partials/navbar.html
deleted file mode 100644
index 882374cb8c..0000000000
--- a/landing-pages/site/layouts/_partials/navbar.html
+++ /dev/null
@@ -1,78 +0,0 @@
-{{/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/}}
-
-{{ $cover := .HasShortcode "blocks/cover" }}
-<nav class="js-navbar-scroll navbar">
-
- <div class="navbar__icon-container">
- <a href="{{ .Site.Home.RelPermalink }}">
- {{ with resources.Get "icons/airflow-logo.svg" }}{{ .Content |
safeHTML }}{{ end }}
- </a>
- </div>
- <div class="desktop-only navbar__menu-container">
- {{ template "menu-content" . }}
- </div>
- <div class="no-desktop navbar__drawer-container">
- {{ if .Site.Params.ui.showLightDarkModeMenu -}}
- <div class="navbar__theme-toggle">
- {{ partial "theme-toggler" . }}
- </div>
- {{ end -}}
- <button class="navbar__toggle-button" id="navbar-toggle-button">
- {{ with resources.Get "icons/hamburger-icon.svg" }}
- <div id="hamburger-icon" class="navbar__toggle-button--icon
visible">
- {{ .Content | safeHTML }}
- </div>
- {{ end }}
- {{ with resources.Get "icons/close-icon.svg" }}
- <div id="close-icon" class="navbar__toggle-button--icon">
- {{ .Content | safeHTML }}
- </div>
- {{ end }}
- </button>
- <div class="navbar__drawer" id="navbar-drawer">{{ template
"menu-content" . }}</div>
- </div>
-</nav>
-
-{{ define "menu-content" }}
- <div class="navbar__menu-content" id="main_navbar">
- {{ $p := . }}
- {{ $menusLen := len .Site.Menus.main }}
- <div class="navbar__links-container">
- {{ range $index, $el := .Site.Menus.main }}
- {{ $active := or ($p.IsMenuCurrent "main" $el)
($p.HasMenuCurrent "main" $el) }}
- {{ with $el.Page }}
- {{ $active = or $active ( $.IsDescendant .) }}
- {{ end }}
- {{ $url := urls.Parse $el.URL }}
- {{ $baseurl := urls.Parse $.Site.Params.Baseurl }}
- <a class="navbar__text-link {{if $active }}active{{end}}"
- href="{{ with $el.Page }}{{ .RelPermalink }}{{ else }}{{
$el.URL | relLangURL }}{{ end }}"
- {{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end
}}>
- {{ $el.Name }}
- </a>
- {{ end }}
- {{ if .Site.Params.ui.showLightDarkModeMenu -}}
- <div class="navbar__theme-toggle">
- {{ partial "theme-toggler" . }}
- </div>
- {{ end -}}
- </div>
- </div>
-{{ end }}
diff --git a/landing-pages/site/layouts/partials/navbar.html
b/landing-pages/site/layouts/partials/navbar.html
index 84e037a310..92851169b6 100644
--- a/landing-pages/site/layouts/partials/navbar.html
+++ b/landing-pages/site/layouts/partials/navbar.html
@@ -27,18 +27,13 @@
</div>
<div class="desktop-only navbar__menu-container">
{{ template "menu-content" . }}
- {{ if .Site.Params.ui.showLightDarkModeMenu -}}
- <div class="navbar__theme-toggle">
- {{ partial "theme-toggler" . }}
- </div>
- {{ end -}}
</div>
+ {{ if .Site.Params.ui.showLightDarkModeMenu -}}
+ <div class="navbar__theme-toggle">
+ {{ partial "theme-toggler" . }}
+ </div>
+ {{ end -}}
<div class="no-desktop navbar__drawer-container">
- {{ if .Site.Params.ui.showLightDarkModeMenu -}}
- <div class="navbar__theme-toggle">
- {{ partial "theme-toggler" . }}
- </div>
- {{ end -}}
<button class="navbar__toggle-button" id="navbar-toggle-button">
{{ with resources.Get "icons/hamburger-icon.svg" }}
<div id="hamburger-icon" class="navbar__toggle-button--icon
visible">