File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,14 @@ function resetInput(inputElement) {
30
30
31
31
function createNewsBlock ( article ) {
32
32
let div = document . createElement ( "div" ) ;
33
+ let emptyDiv = document . createElement ( "div" ) ;
33
34
let img = document . createElement ( "img" ) ;
34
35
let b = document . createElement ( "b" ) ;
35
36
let p = document . createElement ( "p" ) ;
36
- let br = document . createElement ( "br" ) ;
37
37
let a = document . createElement ( "a" ) ;
38
38
39
39
div . setAttribute ( "id" , "news-block" ) ;
40
+ emptyDiv . setAttribute ( "class" , "space" ) ;
40
41
console . log ( article . image ) ;
41
42
42
43
img . src = article . image ;
@@ -51,13 +52,15 @@ function createNewsBlock(article) {
51
52
p . setAttribute ( "id" , "news-info" ) ;
52
53
53
54
a . href = article . url ;
54
- a . textContent = "Read More" ;
55
+ a . textContent = article . url ;
55
56
56
57
p . append ( b ) ;
57
- p . append ( br ) ;
58
+ p . append ( emptyDiv ) ;
58
59
p . append ( article . description ) ;
59
- p . append ( br ) ;
60
+ p . append ( emptyDiv ) ;
61
+ p . append ( emptyDiv ) ;
60
62
p . append ( a ) ;
63
+
61
64
div . append ( img ) ;
62
65
div . append ( p ) ;
63
66
Original file line number Diff line number Diff line change @@ -85,4 +85,8 @@ button:hover {
85
85
border-radius : 10px ;
86
86
display : flex;
87
87
flex-direction : row;
88
+ }
89
+
90
+ .space {
91
+ margin-top : 10px ;
88
92
}
You can’t perform that action at this time.
0 commit comments