Skip to content
This repository was archived by the owner on Jan 31, 2019. It is now read-only.

Commit 213b670

Browse files
committed
recommend dev
1 parent 6a52bb2 commit 213b670

File tree

4 files changed

+41
-15
lines changed

4 files changed

+41
-15
lines changed

src/components/Category/Category.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
}
55

66
.tvWidth.tv {
7-
width: calc(100vw - 470px);
7+
width: 960px;
88

99
& .flexWrapper{
1010
display: flex;
1111
flex-direction: row;
1212
flex-wrap: wrap;
1313
justify-content: space-between;
1414
align-items: flex-start;
15+
padding-right: 20px;
1516
}
1617
}
1718

@@ -23,9 +24,8 @@
2324
padding: 20px;
2425
flex-direction: column;
2526
position: absolute;
26-
2727
top:0;
28-
left: -99999px;
28+
left: -1000px;
2929
z-index: 2;
3030
transition: none;
3131

@@ -55,6 +55,7 @@
5555
flex-direction: column;
5656
justify-content: flex-start;
5757
align-items: center;
58+
transition: none;
5859
}
5960

6061
& .tvItemBox > div:last-child div{

src/components/Recommend/Recommend.css

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,24 @@
3232
flex-direction: column;
3333

3434
& .item {
35-
height: 113px;
35+
cursor: pointer;
36+
margin-bottom: 5px;
37+
overflow: hidden;
38+
padding-left: 5px;
39+
opacity: .5;
3640

3741
& img {
38-
width: 200px;
42+
width: 100%;
3943
height: 113px;
4044
}
45+
46+
&:last-child {
47+
margin-bottom: 0;
48+
}
49+
50+
&.active, &:hover {
51+
opacity: 1;
52+
}
4153
}
4254
}
4355

src/components/Recommend/Recommend.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ class Recommend extends React.Component {
8686
{bannerItems.length > 0
8787
? <div className={styles.banner}>
8888
<section className={styles.player}>
89-
<ScreenItem item={bannerItems[0]} screenCount={1} />
89+
<ScreenItem isBanner={true} item={bannerItems[0]} screenCount={1} />
9090
</section>
9191
<section className={styles.list}>
92-
<section className={styles.item}><img src={bannerItems[0].cover} alt=""/></section>
93-
<section className={styles.item}><img src={bannerItems[1].cover} alt=""/></section>
94-
<section className={styles.item}><img src={bannerItems[2].cover} alt=""/></section>
95-
<section className={styles.item}><img src={bannerItems[3].cover} alt=""/></section>
96-
<section className={styles.item}><img src={bannerItems[4].cover} alt=""/></section>
92+
<section className={styles.item}><img src={bannerItems[0].cover} alt={bannerItems[0].title}/></section>
93+
<section className={styles.item}><img src={bannerItems[1].cover} alt={bannerItems[1].title}/></section>
94+
<section className={styles.item}><img src={bannerItems[2].cover} alt={bannerItems[2].title}/></section>
95+
<section className={styles.item}><img src={bannerItems[3].cover} alt={bannerItems[3].title}/></section>
96+
<section className={styles.item}><img src={bannerItems[4].cover} alt={bannerItems[4].title}/></section>
9797
</section>
9898
</div>
9999
: ''

src/components/ScreenItem/ScreenItem.jsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class screenItem extends React.Component {
5959

6060
render() {
6161
const item = this.props.item;
62+
const isBanner = this.props.isBanner ? true : false;
6263
const id = preFixIds(this.props.item);
6364
const paddBottom = (item.platform == 'douyu' || item.platform == 'huya' || item.platform == 'douyuvideo') ? 16/9 : 16/9
6465
const secHeight = this.props.screenCount > 1 ? 49 : 98;
@@ -76,21 +77,33 @@ class screenItem extends React.Component {
7677
dangerouslySetInnerHTML={{__html: `<embed allowscriptaccess="always" src="${_url}${id}" allowfullscreen="true"></embed>`}}>
7778
</section>
7879
<section className={styles.itemInfo}>
79-
{/*<p onClick={() => item.removeItem(item)}>{item.title}</p>*/}
80+
{
81+
!isBanner
82+
? <ul>
83+
<li>
84+
<span><IconClear onClick={() => this.props.removeItem(item) } /></span>
85+
</li>
86+
</ul>
87+
: ''
88+
}
89+
{
90+
/*<p onClick={() => item.removeItem(item)}>{item.title}</p>
8091
<ul>
8192
<li>
8293
<span><IconClear onClick={() => this.props.removeItem(item) } /></span>
8394
</li>
84-
{/*<li>
95+
<li>
8596
<span><IconGame /> {item.type}</span>
8697
</li>
8798
<li>
8899
<span><IconUser /> {item.anchor}</span>
89100
</li>
90101
<li>
91102
<span><ActionEye /> {item.view}</span>
92-
</li>*/}
93-
</ul>
103+
</li>
104+
</ul>
105+
*/}
106+
94107
</section>
95108
</section>
96109
)

0 commit comments

Comments
 (0)