-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Layout, postcss-loader, react-router-dom
- Loading branch information
Showing
18 changed files
with
663 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
// parser: 'sugarss', // 若使用sugarss解析器,会报错说不能使用大括号 | ||
plugins: { | ||
'postcss-nested': {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react' | ||
import { Icon, Tooltip } from '@blueprintjs/core' | ||
|
||
import styles from './style.module.css' | ||
|
||
const Footer = () => { | ||
return ( | ||
<div className={styles.root}> | ||
<div className={styles.songWrap}> | ||
<img /> | ||
<div> | ||
<div>为你写诗 <span className={styles.singer}>- 吴克群</span></div> | ||
<div className={styles.time}>00:00 / 03:20</div> | ||
</div> | ||
</div> | ||
<div className={styles.operations}> | ||
<div className={styles.prev}><Icon icon='step-backward' /></div> | ||
<div className={styles.pause}><Icon icon='pause' /></div> | ||
<div className={styles.next}><Icon icon='step-forward' /></div> | ||
</div> | ||
<div className={styles.otherOperations}> | ||
<div> | ||
<Tooltip content='列表循环'> | ||
<Icon icon='swap-horizontal' /> | ||
</Tooltip> | ||
</div> | ||
<div> | ||
<Tooltip content='打开播放列表'> | ||
<Icon icon='menu-closed' /> | ||
</Tooltip> | ||
</div> | ||
<div> | ||
<Tooltip content='显示歌词'> | ||
词 | ||
</Tooltip> | ||
</div> | ||
<div><Icon icon='volume-off' /></div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Footer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
.root { | ||
width: 100%; | ||
height: 60px; | ||
padding: 10px; | ||
position: fixed; | ||
bottom: 0; | ||
border-top: 2px solid rgb(245, 245, 245); | ||
display: flex; | ||
justify-content: space-between; | ||
background-color: #fff; | ||
} | ||
|
||
.songWrap { | ||
display: flex; | ||
align-items: center; | ||
|
||
& img { | ||
width: 40px; | ||
height: 40px; | ||
margin-right: 10px;; | ||
border: none; | ||
border-radius: 5px; | ||
background-color: #ccc; | ||
} | ||
|
||
& .singer { | ||
font-size: 0.8em; | ||
color: rgb(127, 127, 127); | ||
} | ||
|
||
& .time { | ||
font-size: 0.85em; | ||
color: rgb(179, 179, 179); | ||
} | ||
} | ||
|
||
.operations { | ||
display: flex; | ||
align-items: center; | ||
|
||
& div { | ||
cursor: pointer; | ||
} | ||
|
||
& .prev svg, | ||
& .next svg { | ||
width: 20px; | ||
height: 20px; | ||
color: rgb(208, 53, 49); | ||
} | ||
|
||
& .pause { | ||
width: 40px; | ||
height: 40px; | ||
border-radius: 50%; | ||
background-color: rgb(208, 53, 49); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
margin: 0 20px; | ||
|
||
& svg { | ||
color: #fff; | ||
} | ||
} | ||
} | ||
|
||
.otherOperations { | ||
display: flex; | ||
align-items: center; | ||
margin-right: 15px; | ||
|
||
& div { | ||
margin-left: 15px; | ||
color: #888; | ||
cursor: pointer; | ||
|
||
& span:focus { | ||
outline: none; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react' | ||
import { Icon } from '@blueprintjs/core' | ||
|
||
import styles from './style.module.css' | ||
|
||
const Header = () => { | ||
return ( | ||
<div className={styles.root}> | ||
<div className={styles.actions}> | ||
<div className={styles.iconsWrap}> | ||
<div> | ||
<Icon icon='cross' /> | ||
</div> | ||
<div> | ||
<Icon icon='minus' /> | ||
</div> | ||
<div> | ||
<Icon icon='maximize' /> | ||
</div> | ||
</div> | ||
|
||
<div className={styles.backForward}> | ||
<div><Icon icon='chevron-left' /></div> | ||
<div><Icon icon='chevron-right' /></div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
.root { | ||
width: 100%; | ||
height: 50px; | ||
background-color: rgb(248, 248, 248, 0.8); | ||
position: fixed; | ||
top: 0; | ||
} | ||
|
||
.iconsWrap { | ||
display: flex; | ||
position: absolute; | ||
top: 10px; | ||
left: 8px; | ||
|
||
& div { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 14px; | ||
height: 14px; | ||
margin-right: 5px; | ||
border-radius: 50%; | ||
cursor: pointer; | ||
|
||
& svg { | ||
display: none; | ||
} | ||
} | ||
|
||
& div:nth-child(1) { | ||
background-color: rgb(255, 86, 82); | ||
} | ||
|
||
& div:nth-child(2) { | ||
background-color: rgb(255, 182, 60); | ||
} | ||
|
||
& div:nth-child(3) { | ||
background-color: rgb(0, 195, 67); | ||
} | ||
|
||
& svg { | ||
width: 8px; | ||
height: 8px; | ||
} | ||
|
||
& div:hover svg { | ||
display: block; | ||
} | ||
} | ||
|
||
.backForward { | ||
display: flex; | ||
position: absolute; | ||
bottom: 10px; | ||
left: 125px; | ||
|
||
div { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 20px; | ||
height: 20px; | ||
margin-left: 8px; | ||
border-radius: 50%; | ||
color: rgb(164, 164, 164); | ||
} | ||
|
||
div:hover { | ||
background-color: rgb(232, 232, 232); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React from 'react' | ||
import { Icon } from '@blueprintjs/core' | ||
import cn from 'classnames' | ||
|
||
import styles from './style.module.css' | ||
|
||
const Sidebar = () => { | ||
const isLogged = true | ||
|
||
return ( | ||
<div className={styles.root}> | ||
<div className={styles.user}> | ||
<div className={styles.avatar}> | ||
{isLogged ? <Icon icon='person' /> : <img />} | ||
</div> | ||
<div className={styles.name}> | ||
<span>momo_Unique</span> | ||
<Icon icon='play' /> | ||
</div> | ||
</div> | ||
|
||
<div className={styles.tabs}> | ||
<div className={cn(styles.tab, styles.enabled)}> | ||
<Icon icon='music' /> | ||
发现音乐 | ||
</div> | ||
<div className={styles.tab}> | ||
<Icon icon='mobile-video' /> | ||
视频 | ||
</div> | ||
</div> | ||
|
||
<div className={styles.block}> | ||
<div className={styles.title}>我的音乐</div> | ||
<div className={styles.tabs}> | ||
<div className={styles.tab}> | ||
<Icon icon='import' /> | ||
下载管理 | ||
</div> | ||
<div className={styles.tab}> | ||
<Icon icon='cloud' /> | ||
我的音乐云盘 | ||
</div> | ||
<div className={styles.tab}> | ||
<Icon icon='star-empty' /> | ||
我的收藏 | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Sidebar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
.root { | ||
width: 220px; | ||
height: 100%; | ||
padding: 50px 0 60px; | ||
display: flex; | ||
flex-direction: column; | ||
background-color: rgb(234, 234, 234); | ||
} | ||
|
||
.user { | ||
display: flex; | ||
align-items: center; | ||
padding: 10px; | ||
|
||
.avatar { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 35px; | ||
height: 35px; | ||
margin-right: 10px; | ||
border: none; | ||
border-radius: 50%; | ||
background-color: #ccc; | ||
cursor: pointer; | ||
color: rgb(220, 220, 220); | ||
} | ||
|
||
.name { | ||
color: rgb(69, 69, 69); | ||
cursor: default; | ||
} | ||
} | ||
|
||
.tabs { | ||
color: rgb(77, 77, 77); | ||
cursor: default; | ||
|
||
.tab { | ||
padding: 10px 20px; | ||
|
||
span { | ||
margin-right: 10px; | ||
} | ||
} | ||
|
||
.tab:hover { | ||
background-color: rgb(227, 227, 227); | ||
} | ||
|
||
.enabled { | ||
color: rgb(208, 58, 54); | ||
} | ||
} | ||
|
||
.block { | ||
margin-top: 25px; | ||
|
||
.title { | ||
padding-left: 20px; | ||
font-size: 0.8em; | ||
color: rgb(129, 129, 129); | ||
} | ||
} |
Oops, something went wrong.