Skip to content

Commit

Permalink
logo text fadeIn
Browse files Browse the repository at this point in the history
  • Loading branch information
zuiidea committed Feb 26, 2018
1 parent cd54fcb commit 98b773f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
18 changes: 18 additions & 0 deletions src/components/Layout/Layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
}
}



.logo {
height: 96px;
display: flex;
Expand All @@ -93,6 +95,10 @@
display: inline-block;
font-weight: 700;
color: @primary-color;
:local {
animation: fadeLeftIn 400ms linear;
animation-fill-mode: both;
}
}
}

Expand Down Expand Up @@ -167,3 +173,15 @@
}
}
}

// @keyframes fadeLeftIn {
// 0% {
// transform: translateX(20px);
// opacity: 0;
// }
//
// 100% {
// transform: translateX(0);
// opacity: 1;
// }
// }
4 changes: 3 additions & 1 deletion src/components/Layout/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { Link } from 'react-router-dom'
import { arrayToTree, queryArray } from 'utils'
import pathToRegexp from 'path-to-regexp'

const Menus = ({ siderFold, darkTheme, navOpenKeys, changeOpenKeys, menu, location }) => {
const Menus = ({
siderFold, darkTheme, navOpenKeys, changeOpenKeys, menu, location,
}) => {
// 生成树状
const menuTree = arrayToTree(menu.filter(_ => _.mpid !== '-1'), 'id', 'mpid')
const levelMap = {}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/Sider.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Sider = ({
<div>
<div className={styles.logo}>
<img alt="logo" src={config.logo} />
{siderFold ? '' : <span>{config.name}</span>}
<span>{siderFold ? '' : config.name}</span>
</div>
<Menus {...menusProps} />
{!siderFold ? <div className={styles.switchtheme}>
Expand Down

0 comments on commit 98b773f

Please sign in to comment.