Skip to content

Commit 46791bf

Browse files
ref NEWS
1 parent 7986e49 commit 46791bf

File tree

4 files changed

+39
-27
lines changed

4 files changed

+39
-27
lines changed

.idea/workspace.xml

+3-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"test": "react-scripts test",
2222
"eject": "react-scripts eject"
2323
},
24+
2425
"eslintConfig": {
2526
"extends": "react-app"
2627
},

src/components/News/News.module.css

+20-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
.news{
22
display: flex;
33
justify-content: space-around;
4+
flex-direction: column;
45
/* flex-direction: column; */
56
/* background: red; */
67
color: black;
8+
}
9+
.imgWraper{
10+
display: flex;
11+
justify-content: space-around;
712
}
813
h1{
914
text-align: center;
10-
color: crimson;
11-
text-transform: uppercase;
12-
font-size: 70px;
13-
padding: 50;
14-
}
15+
color: crimson;
16+
text-transform: uppercase;
17+
font-size: 70px;
18+
padding: 50;
19+
filter: drop-shadow(1px 3px .1px black);
1520

21+
}
1622
.news img{
17-
width: 240px;
18-
height: 200px;
19-
border-radius: 50%
23+
width: 420px;
24+
height: 270px;
25+
margin: 0 auto;
26+
border: 2px solid black;
27+
filter: drop-shadow(-5px 0px 10px black);
28+
/*border-radius: 50%*/
29+
}
30+
.news p {
31+
text-align: center;
2032
}

src/components/News/NewsC.jsx

+15-7
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ import axios from 'axios';
33
import n from "./News.module.css";
44
import {connect} from "react-redux";
55
import {setNewsAC} from "./../../Redux/news-Reducer";
6+
import {NavLink} from "react-router-dom";
67

78
class NewsC extends React.Component{
89
// https://social-network.samuraijs.com/api/1.0/users --this API users
910
// https://kudago.com/public-api/v1.4/movies/ --this API films
1011

1112
componentDidMount() {
12-
axios.get('https://kudago.com/public-api/v1.4/movies/')
13+
axios.get ('https://kudago.com/public-api/v1.4/movies/')
1314
.then(response => {
1415
// debugger
15-
console.log(response)
16-
this.props.setNewsAC(response.id)
16+
this.props.setNewsAC(response)
1717
} )
1818
}
1919

@@ -22,13 +22,21 @@ class NewsC extends React.Component{
2222
<div>
2323
<h1>News Film</h1>
2424
<div className={n.news}>
25-
<img src="http://gloria-mur.ru/wp-content/uploads/2017/05/avatar1-740x463.jpg" alt="cat" />
25+
<div className={n.imgWraper}>
26+
<NavLink to="/News/1" activeClassName={n.activeLink}>
27+
<img src="http://gdekoncert.ru/wp-content/uploads/2018/07/1500994114_20171.jpg" alt="cat" />
28+
</NavLink>
29+
30+
<NavLink to="/News/1" activeClassName={n.activeLink}>
31+
<img src="https://proxy11.online.ua/news/r3-2c8c91e63d/680_5b3e0479e6fef.jpg" alt="cat" />
32+
</NavLink>
33+
</div>
2634
<div>
27-
<p>This is my News!</p>
28-
<p><cite>Lorem ipsum dolor sit amet consectetur adipisicing elit. <br />
35+
<p><h3>This is my news films!</h3></p>
36+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. <br />
2937
Adipisci consequuntur nostrum nesciunt molestias, deleniti temporibus, <br />
3038
iste, rem quibusdam dolorum ratione exercitationem quos <br />
31-
in inventore quod fuga eligendi est ad iure?</cite></p>
39+
in inventore quod fuga eligendi est ad iure?</p>
3240
</div>
3341
</div>
3442
</div>

0 commit comments

Comments
 (0)