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

shuai pushed a commit to branch ui-optimization
in repository https://gitbox.apache.org/repos/asf/answer.git


The following commit(s) were added to refs/heads/ui-optimization by this push:
     new 061f0403 style: Mobile navigation style optimization
061f0403 is described below

commit 061f0403e27852d4dc84491748aa4de466cba54d
Author: shuai <[email protected]>
AuthorDate: Thu Apr 10 15:58:58 2025 +0800

    style: Mobile navigation style optimization
---
 ui/src/components/Header/index.scss | 21 ++++++++++++---------
 ui/src/components/Header/index.tsx  |  4 ++--
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/ui/src/components/Header/index.scss 
b/ui/src/components/Header/index.scss
index 9f2dd799..0bc6e2e3 100644
--- a/ui/src/components/Header/index.scss
+++ b/ui/src/components/Header/index.scss
@@ -41,15 +41,6 @@
     }
   }
 
-  .nav-text {
-    flex: 1;
-    white-space: nowrap;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    padding: 0 10px;
-    min-width: 0;
-  }
-
   .search-mobile {
     color: var(--bs-nav-link-color);
   }
@@ -143,3 +134,15 @@
     }
   }
 }
+
+@media screen and (max-width: 767px) {
+  #header {
+    .nav-text {
+      flex: 1;
+      white-space: nowrap;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      min-width: 0;
+    }
+  }
+}
diff --git a/ui/src/components/Header/index.tsx 
b/ui/src/components/Header/index.tsx
index 58144808..52bd0922 100644
--- a/ui/src/components/Header/index.tsx
+++ b/ui/src/components/Header/index.tsx
@@ -141,7 +141,7 @@ const Header: FC = () => {
 
         <SearchInput className="d-none d-lg-block maxw-560" />
 
-        <Nav className="d-block d-lg-none me-2">
+        <Nav className="d-block d-lg-none me-2 ms-auto">
           <Button
             variant="link"
             onClick={() => {
@@ -155,7 +155,7 @@ const Header: FC = () => {
 
         {/* pc nav */}
         {user?.username ? (
-          <Nav className="d-flex align-items-center flex-nowrap flex-row 
ms-auto">
+          <Nav className="d-flex align-items-center flex-nowrap flex-row">
             <Nav.Item className="me-2 d-block d-xl-none">
               <NavLink
                 to={askUrl}

Reply via email to