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

benjobs pushed a commit to branch dev
in repository 
https://gitbox.apache.org/repos/asf/incubator-streampark-website.git


The following commit(s) were added to refs/heads/dev by this push:
     new 405b3b6  [Fix] Fix colortoggle not displaying and Misorganized 
document layout (#370)
405b3b6 is described below

commit 405b3b67829cc42cb8857ec779c41a311ee90c8e
Author: fengweixin <[email protected]>
AuthorDate: Tue May 7 11:13:47 2024 +0800

    [Fix] Fix colortoggle not displaying and Misorganized document layout (#370)
    
    * fix: fix colortoggle not displaying and misorganized document layout
    
    * refactor: remove console.log
    
    * update documentation name
---
 docusaurus.config.js                               |  2 +-
 i18n/zh-CN/docusaurus-theme-classic/navbar.json    |  2 +-
 src/css/custom/index.less                          | 51 +---------------------
 src/pages/user/index.jsx                           | 24 +++++-----
 src/theme/DocPage/Layout/Main/styles.module.css    |  8 ++--
 src/theme/Navbar/ColorModeToggle/styles.module.css |  4 +-
 src/theme/Navbar/Layout/styles.module.css          | 10 +++++
 .../NavbarItem/LocaleDropdownNavbarItem/index.js   |  1 -
 .../LocaleDropdownNavbarItem/styles.module.css     |  7 +++
 9 files changed, 39 insertions(+), 70 deletions(-)

diff --git a/docusaurus.config.js b/docusaurus.config.js
index 32d13b4..123c24a 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -111,7 +111,7 @@ const config = {
         items: [
           {
             to: '/docs/intro',
-            label: 'Documentation',
+            label: 'Docs',
             position: "right",
             activeBaseRegex: `/docs`,
           },
diff --git a/i18n/zh-CN/docusaurus-theme-classic/navbar.json 
b/i18n/zh-CN/docusaurus-theme-classic/navbar.json
index c69fbc4..376bf2a 100644
--- a/i18n/zh-CN/docusaurus-theme-classic/navbar.json
+++ b/i18n/zh-CN/docusaurus-theme-classic/navbar.json
@@ -3,7 +3,7 @@
     "message": "首页",
     "description": "Navbar item with label HOME"
   },
-  "item.label.Documentation": {
+  "item.label.Docs": {
     "message": "文档",
     "description": "Navbar item with label DOC"
   },
diff --git a/src/css/custom/index.less b/src/css/custom/index.less
index 587c7c4..ecdda6e 100644
--- a/src/css/custom/index.less
+++ b/src/css/custom/index.less
@@ -51,37 +51,15 @@
   width: 100%;
 }
 
-/* Rich's attempt to add scrollbar to nav */
-.sidebar_mhZE {
-  position: fixed !important;
-  padding-bottom: 33px;
-  height: 100% !important;
-}
-
-/* Make the navbar move with the page */
-/* 
.sidebarViewport_node_modules-\@docusaurus-theme-classic-lib-theme-DocPage-Layout-Sidebar-styles-module
 {
-  max-height: unset !important;
-}
-*/
-
 /* In the knowledgebase, the top nav sits on top of the article. This moves it 
down */
 .margin-bottom--xl {
   margin-top: 60px;
 }
 
-.hero__title,
-.title_f1Hy {
-  font-size: 32px !important;
-}
-
 
.title_node_modules-\@docusaurus-theme-classic-lib-theme-BlogPostItem-Header-Title-styles-module
 {
   font-size: 32px !important;
 }
 
-.sidebarViewport_Xe31 {
-  max-height: unset !important;
-}
-
 /* Docsearch from Algolia */
 [data-theme='light'] .DocSearch mark {
   --docsearch-highlight-color: black;
@@ -164,10 +142,6 @@
   line-height: 21px;
 }
 
-.title_node_modules-\@docusaurus-theme-classic-lib-theme-BlogPostItem-Header-Title-styles-module
 {
-  font-size: 2rem !important;
-}
-
 article[itemprop="blogPost"] {
   margin-top: 2rem;
 }
@@ -185,12 +159,6 @@ article[itemprop="blogPost"] {
   display: block !important;
 }
 
-.buttons_s0t3 {
-  display: flow-root !important;
-}
-
-
-
 code {
   font-weight: bold;
   background-color: var(--ifm-code-background) !important;
@@ -767,10 +735,6 @@ table td {
   .dropdown__link {
     padding: .5rem 1.5rem;
   }
-
-  .locale_menu {
-    width: 14px;
-  }
 }
 
 [data-theme='light'] .secondary-nav--items .navbar__link {
@@ -964,15 +928,6 @@ button.DocSearch {
   fill: white;
 }
 
-nav[aria-label='Docs sidebar'] {
-  overflow: hidden !important;
-}
-
-nav[aria-label='Docs sidebar']:hover {
-  overflow-y: auto !important;
-}
-
-
 // -- custom -- 
 
 /** global */
@@ -1135,7 +1090,7 @@ img {
   }
 
   // 手机端显示主题切换
-  
.colorModeButton_src-theme-Navbar-ColorModeToggle-styles-module.colorModeToggle_mobile
 {
+  .colorModeButton_yITp.colorModeToggle_mobile {
     display: flex;
   }
 
@@ -1150,10 +1105,6 @@ img {
     .navbar-sidebar__items {
       font-size: var(--navbar-font-size);
     }
-
-    .locale_menu {
-      width: var(--navbar-font-size);
-    }
   }
 }
 
diff --git a/src/pages/user/index.jsx b/src/pages/user/index.jsx
index 12ff333..4bc65a3 100644
--- a/src/pages/user/index.jsx
+++ b/src/pages/user/index.jsx
@@ -16,16 +16,16 @@ export default function () {
 
   return <Layout>
     <BrowserOnly>
-    {() => {
-      // AOS JS
-      AOS.init({
-        offset: 80,
-        duration: 500,
-        easing: "ease-out-quad",
-        once: !0
-      });
-      window.addEventListener('load', AOS.refresh);
-      return <div className='block user_page'>
+      {() => {
+        // AOS JS
+        AOS.init({
+          offset: 80,
+          duration: 500,
+          easing: "ease-out-quad",
+          once: !0
+        });
+        window.addEventListener('load', AOS.refresh);
+        return <div className='block user_page container'>
           <div className="user-main" style={{ padding: "10px 0 30px" }}>
             <h3 className="fs-2 mb-4 fw-bold 
text-center">{dataSource.common.ourUsers}</h3>
             <hr className="divider my-4 mx-auto" style={{ maxWidth: "10rem" 
}}></hr>
@@ -46,7 +46,7 @@ export default function () {
             </div>
           </div>
         </div>
-    }}
-  </BrowserOnly>
+      }}
+    </BrowserOnly>
   </Layout>
 }
diff --git a/src/theme/DocPage/Layout/Main/styles.module.css 
b/src/theme/DocPage/Layout/Main/styles.module.css
index 3331d59..d767108 100644
--- a/src/theme/DocPage/Layout/Main/styles.module.css
+++ b/src/theme/DocPage/Layout/Main/styles.module.css
@@ -3,11 +3,11 @@
   width: 100%;
   height: 100%;
   padding-bottom: 2rem;
+}
 
-  .container {
-    min-width: none!important;
-    max-width: none!important;
-  }
+.docMainContainer .container {
+  min-width: none!important;
+  max-width: none!important;
 }
 
 @media (min-width: 997px) {
diff --git a/src/theme/Navbar/ColorModeToggle/styles.module.css 
b/src/theme/Navbar/ColorModeToggle/styles.module.css
index d384151..5f4a384 100644
--- a/src/theme/Navbar/ColorModeToggle/styles.module.css
+++ b/src/theme/Navbar/ColorModeToggle/styles.module.css
@@ -16,8 +16,10 @@
   border: 0;
   border-radius: 4px;
   background: transparent;
+}
 
-  @media screen and (min-width: 997px) {
+@media screen and (min-width: 997px) {
+  .colorModeButton {
     display: flex; 
   }
 }
diff --git a/src/theme/Navbar/Layout/styles.module.css 
b/src/theme/Navbar/Layout/styles.module.css
index 8258c17..e629dae 100644
--- a/src/theme/Navbar/Layout/styles.module.css
+++ b/src/theme/Navbar/Layout/styles.module.css
@@ -5,6 +5,16 @@
  * LICENSE file in the root directory of this source tree.
  */
 
+
+.navbar {
+  overflow: hidden !important;
+}
+
+.navbar:hover {
+  overflow-y: auto !important;
+}
+
+
 .navbarHideable {
   transition: transform var(--ifm-transition-fast) ease;
 }
diff --git a/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.js 
b/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.js
index d400a25..a1e44fe 100644
--- a/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.js
+++ b/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.js
@@ -52,7 +52,6 @@ export default function LocaleDropdownNavbarItem({
     })
     : localeConfigs[currentLocale].label;
 
-  console.log(222, dropdownLabel)
   return (
     <DropdownNavbarItem
       {...props}
diff --git a/src/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css 
b/src/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css
index 8804a08..4406958 100644
--- a/src/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css
+++ b/src/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css
@@ -1,4 +1,11 @@
 .iconLanguage {
   vertical-align: text-bottom;
   margin-right: 5px;
+  width: 14px;
 }
+
+@media  screen and (max-width: 996px) {
+  .iconLanguage {
+    width: var(--navbar-font-size);
+  }
+}
\ No newline at end of file

Reply via email to