You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by xi...@apache.org on 2022/06/01 07:09:24 UTC

[incubator-shenyu-dashboard] branch master updated: Titlelogo modify (#207)

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

xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 8c0d0f63 Titlelogo modify (#207)
8c0d0f63 is described below

commit 8c0d0f630a2d8b534c8afe041298ea96ed9fdb11
Author: Lidyaqf <10...@users.noreply.github.com>
AuthorDate: Wed Jun 1 15:09:19 2022 +0800

    Titlelogo modify (#207)
    
    * Titlelogo modify
    
    * Titlelogo modify
    
    Co-authored-by: lidya <16...@qq.com>
---
 src/assets/TitleLogo.svg              | 15 +++++++++++++++
 src/components/SiderMenu/SiderMenu.js | 20 ++++++--------------
 src/components/SiderMenu/index.less   |  4 ++++
 src/layouts/BasicLayout.js            |  2 ++
 src/layouts/UserLayout.js             |  5 ++---
 5 files changed, 29 insertions(+), 17 deletions(-)

diff --git a/src/assets/TitleLogo.svg b/src/assets/TitleLogo.svg
new file mode 100644
index 00000000..62d9db7b
--- /dev/null
+++ b/src/assets/TitleLogo.svg
@@ -0,0 +1,15 @@
+<svg width="1053" height="170" viewBox="0 0 1053 170" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M73.9973 35.0579C54.1616 69.8286 42.9756 83.2381 35.8964 77.1848C30.9901 72.9896 47.7987 41.7206 58.7276 21.3898C62.1781 14.9707 65.0426 9.64207 66.4524 6.60013C66.7845 5.88338 66.1105 5.51842 65.5618 6.11847C40.0106 34.0615 -21.3347 135.895 7.5775 162.983C8.93141 164.252 11.0512 163.631 11.7989 161.933L33.1473 113.459C34.035 111.443 36.5449 110.432 38.7533 111.201L48.8546 114.714C51.063 115.483 52.1337 117.739 51.246 119.755L31.2362 165.189C30.3407 167.223 31.8971 169.466 34.08 [...]
+<path d="M200.782 129.157H178.611L171.579 108.423H138.084L131.052 129.157H109L144.163 32.6779H165.5L200.782 129.157ZM154.533 60.2434L144.759 88.7678H164.904L155.249 60.2434H154.533Z" fill="black"/>
+<path d="M208.662 159V57.6067H228.806V66.1161H229.522C231.667 62.9201 234.409 60.4432 237.746 58.6854C241.084 56.8477 244.62 55.9288 248.355 55.9288C253.997 55.9288 258.924 57.4469 263.135 60.4832C267.426 63.4395 270.724 67.6742 273.029 73.1873C275.333 78.7004 276.485 85.1723 276.485 92.603C276.485 100.353 275.333 107.105 273.029 112.858C270.724 118.61 267.426 123.045 263.135 126.161C258.844 129.277 253.838 130.835 248.116 130.835C244.302 130.835 240.766 129.916 237.508 128.079C234.329 1 [...]
+<path d="M306.184 130.835C299.907 130.835 294.702 129.037 290.569 125.442C286.517 121.767 284.49 116.733 284.49 110.341C284.49 105.387 285.881 101.032 288.662 97.2772C291.443 93.5218 295.377 90.6454 300.463 88.6479C305.628 86.5705 311.628 85.5318 318.462 85.5318H324.898V83.7341C324.898 80.2185 323.905 77.5418 321.918 75.7041C320.011 73.7865 317.309 72.8277 313.813 72.8277C308.807 72.8277 304.277 75.3046 300.224 80.2584L287.113 70.191C294.821 60.6829 304.595 55.9288 316.435 55.9288C322.07 [...]
+<path d="M391.139 130.835C383.829 130.835 377.471 129.317 372.068 126.281C366.744 123.245 362.611 118.93 359.671 113.337C356.811 107.664 355.38 101.032 355.38 93.4419C355.38 85.8514 356.811 79.2197 359.671 73.5468C362.611 67.8739 366.744 63.5194 372.068 60.4832C377.471 57.4469 383.829 55.9288 391.139 55.9288C397.656 55.9288 403.576 57.8464 408.9 61.6816C414.224 65.5169 418.118 70.7104 420.581 77.2622L401.867 84.3333C400.834 81.377 399.205 79.0999 396.98 77.5019C394.835 75.9039 392.451 75 [...]
+<path d="M430.993 129.157V32.6779H451.138V66.9551H451.734C453.8 63.5194 456.502 60.8427 459.839 58.9251C463.256 56.9276 467.15 55.9288 471.52 55.9288C478.593 55.9288 484.076 58.2459 487.97 62.8801C491.943 67.4345 493.93 73.9463 493.93 82.4157V129.157H473.785V87.0899C473.785 83.4145 472.871 80.5381 471.044 78.4607C469.216 76.3034 466.713 75.2247 463.534 75.2247C459.799 75.2247 456.78 76.4232 454.475 78.8202C452.25 81.1373 451.138 84.3333 451.138 88.4082V129.157H430.993Z" fill="black"/>
+<path d="M571.491 88.2884C571.491 93.3221 570.974 97.6367 569.941 101.232H525.361C526.871 109.861 531.719 114.176 539.903 114.176C542.764 114.176 545.347 113.337 547.651 111.659C549.956 109.981 551.783 107.664 553.134 104.708L569.703 111.899C567.319 117.891 563.505 122.566 558.26 125.921C553.095 129.197 546.936 130.835 539.784 130.835C532.632 130.835 526.355 129.357 520.951 126.401C515.547 123.365 511.376 119.09 508.435 113.577C505.575 107.984 504.144 101.472 504.144 94.0412C504.144 86.2 [...]
+<path d="M658.286 130.835C649.545 130.835 641.916 128.678 635.4 124.363C628.884 119.969 623.997 114.176 620.739 106.985L638.857 98.4757C640.526 102.79 643.069 106.066 646.486 108.303C649.903 110.541 653.876 111.659 658.405 111.659C663.094 111.659 666.829 110.78 669.61 109.022C672.391 107.265 673.782 104.988 673.782 102.191C673.782 100.194 673.265 98.5556 672.232 97.2772C671.199 95.9189 669.411 94.6804 666.868 93.5618C664.325 92.4432 660.63 91.2047 655.783 89.8464C649.426 88.0087 644.141  [...]
+<path d="M706.521 129.157V32.6779H726.665V66.9551H727.261C729.327 63.5194 732.029 60.8427 735.367 58.9251C738.784 56.9276 742.678 55.9288 747.048 55.9288C754.12 55.9288 759.604 58.2459 763.497 62.8801C767.471 67.4345 769.457 73.9463 769.457 82.4157V129.157H749.313V87.0899C749.313 83.4145 748.399 80.5381 746.571 78.4607C744.744 76.3034 742.24 75.2247 739.062 75.2247C735.327 75.2247 732.307 76.4232 730.003 78.8202C727.778 81.1373 726.665 84.3333 726.665 88.4082V129.157H706.521Z" fill="black"/>
+<path d="M847.018 88.2884C847.018 93.3221 846.502 97.6367 845.469 101.232H800.889C802.399 109.861 807.246 114.176 815.431 114.176C818.292 114.176 820.874 113.337 823.179 111.659C825.483 109.981 827.311 107.664 828.662 104.708L845.231 111.899C842.847 117.891 839.032 122.566 833.788 125.921C828.622 129.197 822.464 130.835 815.312 130.835C808.16 130.835 801.882 129.357 796.479 126.401C791.075 123.365 786.903 119.09 783.963 113.577C781.102 107.984 779.672 101.472 779.672 94.0412C779.672 86.2 [...]
+<path d="M857.962 129.157V57.6067H878.107V66.9551H878.703C880.769 63.5194 883.471 60.8427 886.808 58.9251C890.225 56.9276 894.119 55.9288 898.489 55.9288C905.562 55.9288 911.045 58.2459 914.939 62.8801C918.912 67.4345 920.899 73.9463 920.899 82.4157V129.157H900.754V87.0899C900.754 83.4145 899.84 80.5381 898.013 78.4607C896.185 76.3034 893.682 75.2247 890.503 75.2247C886.768 75.2247 883.749 76.4232 881.444 78.8202C879.219 81.1373 878.107 84.3333 878.107 88.4082V129.157H857.962Z" fill="black"/>
+<path d="M944.073 91.4045L909.625 32.6779H934.776L954.205 73.1873H954.92L974.349 32.6779H999.619L965.052 91.4045V129.157H944.073V91.4045Z" fill="black"/>
+<path d="M1053 57.6067V129.157H1032.86V120.049H1032.14C1030.15 123.484 1027.49 126.121 1024.15 127.959C1020.9 129.876 1017.08 130.835 1012.71 130.835C1005.64 130.835 1000.08 128.558 996.024 124.004C992.05 119.37 990.064 112.938 990.064 104.708V57.6067H1010.21V100.034C1010.21 103.629 1011.16 106.506 1013.07 108.663C1014.98 110.82 1017.48 111.899 1020.58 111.899C1024.31 111.899 1027.29 110.74 1029.52 108.423C1031.74 106.026 1032.86 102.83 1032.86 98.8352V57.6067H1053Z" fill="black"/>
+</svg>
diff --git a/src/components/SiderMenu/SiderMenu.js b/src/components/SiderMenu/SiderMenu.js
index 38a943ea..a64a03c0 100644
--- a/src/components/SiderMenu/SiderMenu.js
+++ b/src/components/SiderMenu/SiderMenu.js
@@ -147,8 +147,8 @@ export default class SiderMenu extends PureComponent {
         onClick={
           isMobile
             ? () => {
-                onCollapse(true);
-              }
+              onCollapse(true);
+            }
             : undefined
         }
       >
@@ -299,14 +299,14 @@ export default class SiderMenu extends PureComponent {
 
   render() {
     this.updateMenuData();
-    const { logo, menuData, collapsed, onCollapse } = this.props;
+    const { menuData, collapsed, onCollapse, TitleLogo } = this.props;
     const { openKeys } = this.state;
     // Don't show popup menu when it is been collapsed
     const menuProps = collapsed
       ? {}
       : {
-          openKeys
-        };
+        openKeys
+      };
     // if pathname can't match, use the nearest parent's key
     let selectedKeys = this.getSelectedMenuKeys();
     if (!selectedKeys.length) {
@@ -325,15 +325,7 @@ export default class SiderMenu extends PureComponent {
       >
         <Link to="/">
           <div className={styles.logo} key="logo">
-            <img className={styles.icon} src={logo} alt="logo" />
-            <div className={styles.systemTitle}>
-              <div className={styles.title}>
-                {getIntlContent("SHENYU.SIDERMENU.TITLE")}
-              </div>
-              <div className={styles.subTitle}>
-                {getIntlContent("SHENYU.SIDERMENU.SUBTITLE")}
-              </div>
-            </div>
+            <img className={styles.TitleLogo} src={TitleLogo} alt="logo" />
           </div>
         </Link>
         <Menu
diff --git a/src/components/SiderMenu/index.less b/src/components/SiderMenu/index.less
index 65b504f1..ea970689 100644
--- a/src/components/SiderMenu/index.less
+++ b/src/components/SiderMenu/index.less
@@ -32,6 +32,10 @@
     width: 32px;
     height: 32px;
   }
+  .TitleLogo{
+    width: 184px;
+    height: 184px;
+  }
   .systemTitle {
     color: #ffffff;
     font-family: "Myriad Pro", "Helvetica Neue", Arial, Helvetica, sans-serif;
diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js
index 6256eaf3..2d60f771 100644
--- a/src/layouts/BasicLayout.js
+++ b/src/layouts/BasicLayout.js
@@ -31,6 +31,7 @@ import {getRoutes} from "../utils/utils";
 import AuthRoute, {checkMenuAuth, getAuthMenus} from "../utils/AuthRoute";
 import {getMenuData} from "../common/menu";
 import logo from "../assets/logo.svg";
+import TitleLogo from "../assets/TitleLogo.svg";
 
 const MyContext = React.createContext();
 
@@ -271,6 +272,7 @@ class BasicLayout extends React.PureComponent {
       <Layout>
         <SiderMenu
           logo={logo}
+          TitleLogo={TitleLogo}
           dispatch={dispatch}
           menuData={menus}
           collapsed={collapsed}
diff --git a/src/layouts/UserLayout.js b/src/layouts/UserLayout.js
index bcfe17c6..fe76cab6 100644
--- a/src/layouts/UserLayout.js
+++ b/src/layouts/UserLayout.js
@@ -22,7 +22,7 @@ import { connect } from "dva";
 import { Icon, message } from "antd";
 import GlobalFooter from "../components/GlobalFooter";
 import styles from "./UserLayout.less";
-import logo from "../assets/logo.svg";
+import TitleLogo from "../assets/TitleLogo.svg";
 import { getRoutes, getPageQuery, getQueryPath } from "../utils/utils";
 
 message.config({
@@ -66,8 +66,7 @@ class UserLayout extends React.PureComponent {
             <div className={styles.top}>
               <div className={styles.header}>
                 <Link to="/">
-                  <img alt="logo" className={styles.logo} src={logo} />
-                  <span className={styles.title}>Apache ShenYu Gateway</span>
+                  <img alt="logo" className={styles.logo} src={TitleLogo} />
                 </Link>
               </div>
               <div className={styles.desc}>Apache ShenYu Gateway Management System</div>