Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 3931327

Browse files
committed
Merge branch 'video-thread' into dev
2 parents 22d7c08 + 4e145f2 commit 3931327

File tree

4 files changed

+92
-14
lines changed

4 files changed

+92
-14
lines changed

containers/VideoViewer/BodyHeader.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import React from 'react'
2+
3+
import { ICON_CMD } from '../../config'
4+
5+
import { Labeler } from '..'
6+
import { Popover } from '../../components'
7+
8+
// import ArticleOptions from '../../containers/ArticleViwer/ArticleOptions'
9+
import {
10+
Wrapper,
11+
MoreWrapper,
12+
MoreIcon,
13+
LablerWrapper,
14+
RefinedLabel,
15+
RefinedIcon,
16+
RefinedText,
17+
} from './styles/body_header'
18+
19+
// import { Wrapper } from './styles/body_header'
20+
21+
/* content={<ArticleOptions thread={thread} />} */
22+
23+
const BodyHeader = () => (
24+
<Wrapper>
25+
<MoreWrapper>
26+
<Popover content={<div>...</div>} placement="bottomLeft" trigger="click">
27+
<div>
28+
<MoreIcon src={`${ICON_CMD}/more.svg`} />
29+
</div>
30+
</Popover>
31+
</MoreWrapper>
32+
<LablerWrapper>
33+
<Labeler />
34+
</LablerWrapper>
35+
<RefinedLabel>
36+
<RefinedIcon src={`${ICON_CMD}/diamond_frame.svg`} />
37+
<RefinedText>精 华</RefinedText>
38+
</RefinedLabel>
39+
</Wrapper>
40+
)
41+
42+
export default BodyHeader

containers/VideoViewer/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import InfoBoard from './InfoBoard'
1515
import { makeDebugger, storePlug } from '../../utils'
1616

1717
import Header from './Header'
18+
import BodyHeader from './BodyHeader'
1819

1920
import * as logic from './logic'
2021
/* eslint-disable no-unused-vars */
@@ -35,6 +36,7 @@ class VideoViewerContainer extends React.Component {
3536
return (
3637
<Wrapper>
3738
<Header data={viewingData} />
39+
<BodyHeader />
3840
<PlayWindow poster={viewingData.poster} />
3941
<InfoBoard data={viewingData} />
4042
</Wrapper>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import styled from 'styled-components'
2+
3+
import Img from '../../../components/Img'
4+
import { theme } from '../../../utils'
5+
6+
export const Wrapper = styled.div`
7+
background-color: ${theme('preview.articleBg')};
8+
width: 100%;
9+
display: flex;
10+
justify-content: space-between;
11+
align-items: flex-start;
12+
padding: 10px 35px;
13+
padding-bottom: 5px;
14+
`
15+
export const MoreWrapper = styled.div`
16+
display: flex;
17+
cursor: pointer;
18+
`
19+
export const MoreIcon = styled(Img)`
20+
fill: #6a868a;
21+
width: 15px;
22+
height: 15px;
23+
`
24+
export const LablerWrapper = styled.div``
25+
26+
export const RefinedLabel = styled.div`
27+
display: flex;
28+
align-items: center;
29+
color: tomato;
30+
border: 1px dashed tomato;
31+
padding: 0 5px;
32+
border-radius: 5px;
33+
margin-top: -2px;
34+
`
35+
export const RefinedIcon = styled(Img)`
36+
fill: tomato;
37+
width: 15px;
38+
height: 15px;
39+
margin-right: 5px;
40+
margin-top: -2px;
41+
display: block;
42+
`
43+
export const RefinedText = styled.div``

containers/VideoViewer/styles/header.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export const Wrapper = styled.div`
99
padding-right: 30px;
1010
padding-top: 10px;
1111
padding-bottom: 6px;
12-
background: ${theme('preview.articleBg')};
1312
`
1413
export const Divider = styled.span`
1514
margin: 0 8px;
@@ -19,33 +18,28 @@ export const Divider = styled.span`
1918
border-right: 1px solid;
2019
border-right-color: ${theme('preview.divider')};
2120
`
22-
2321
export const UserInfo = styled.div`
2422
flex-grow: 1;
2523
display: flex;
24+
align-items: center;
2625
`
27-
2826
export const UserName = styled.div`
29-
margin-bottom: 2px;
30-
font-size: 1.2em;
27+
font-size: 1rem;
3128
color: ${theme('banner.title')};
3229
`
3330
export const PublishAt = styled.div`
34-
font-size: 0.9em;
31+
font-size: 0.8rem;
3532
color: ${theme('banner.desc')};
3633
`
37-
3834
export const Avatar = styled.img`
3935
border-radius: 100%;
40-
width: 40px;
41-
height: 40px;
36+
width: 35px;
37+
height: 35px;
4238
margin-right: 10px;
4339
`
44-
4540
export const ReactionWrapper = styled.div`
4641
display: flex;
4742
`
48-
4943
export const ReactionAction = styled.div`
5044
display: flex;
5145
padding: 0 3px;
@@ -56,7 +50,6 @@ export const ReactionAction = styled.div`
5650
border-radius: 6px;
5751
}
5852
`
59-
6053
export const ReactionName = styled.div`
6154
align-self: center;
6255
color: ${theme('article.reactionTitle')};
@@ -73,14 +66,12 @@ export const ReactionUserNum = styled.div`
7366
text-decoration: underline;
7467
}
7568
`
76-
7769
export const ReactionIcon = styled(Img)`
7870
margin-top: 4px;
7971
fill: ${theme('article.reactionTitle')};
8072
width: ${({ width }) => width || '1.5em'};
8173
height: ${({ height }) => height || '1.5em'};
8274
`
83-
8475
export const Reaction = styled.div`
8576
align-self: center;
8677
font-size: 1.2em;

0 commit comments

Comments
 (0)