-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphoto.html
372 lines (312 loc) · 12.8 KB
/
photo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Latest News</title>
<style>
div {
border: 1px solid transparent;
}
#main {
display: flex;
}
hr {
margin-top: -15px;
}
#news {
background-color: black;
padding: 10px;
border-radius: 5px;
margin-bottom: 10px;
/* display: flex; */
/* height: 100px; */
width: 633px;
padding-left: 10px;
padding-right: 10px;
}
#news>h1{
color: white;
}
#news>p+p{
font-size: 22px;
}
#news>p {
color: white;
font-size: 20PX;
margin-left: 20px;
}
/* #center {
display: grid;
} */
#news>img{
width: 100%;
}
#left_sidebar{
width: 25%;
margin-left: 10px;
}
</style>
<link rel="stylesheet" href="./navbarStyle/navbar_style.css">
</head>
<body>
<div id="NavbarDNA"> </div>
<div id="slide">
<div id="Part1">
<p>Top News</p>
</div>
<div>
<p id="Part2"></p>
</div>
</div>
<div id="main">
<div id="left_menu"></div>
<div id="center">
<p>Home >> Photos</p>
<!-- <h1>LATEST NEWS</h1> -->
<hr>
</div>
<div id="rightSide"></div>
</div>
<div id="footer"></div>
</body>
</html>
<script type="module">
import navbar from "./component/navber.js"
document.getElementById("NavbarDNA").innerHTML = navbar()
import left_side from "./component/leftSide.js"
document.getElementById("left_menu").innerHTML = left_side()
import footer from "./component/footer.js"
document.getElementById("footer").innerHTML = footer()
import right_views from "./component/rightSide.js"
document.getElementById("rightSide").innerHTML = right_views()
// let video = JSON.parse(localStorage.getItem("video"));
const navbar_slide_show = [
"CBSE Board Results 2022 LIVE: Class 12 Term 2 scores announced, over 1.34 lakh students score above 90%",
"Ranveer Singh nude photoshoot: Mimi Chakraborty questions gender equality, says 'wonder if...'",
"Who is Eldhose Paul, Indian triple jumper who made history by qualifying for World Athletics Championships?",
"NCR weather update: Rain, thundershowers in Delhi, adjacent cities over the weekend, check complete IMD forecast"
]
let slideshow = () =>{
let latest_news = document.getElementById("Part2")
let i =0
setInterval(function(){
if(i===navbar_slide_show.length)
{
i = 0
}
latest_news.innerText = navbar_slide_show[i]
i++
},2000)
}
slideshow()
function append(){
let photo1 = JSON.parse(localStorage.getItem("Photo")) || [];
let container = document.getElementById("center");
console.log(photo1.title)
// photo1.forEach(element => {
console.log("element")
let t1 = document.createElement("h1");
t1.innerText= photo1.title;
let p = document.createElement("p");
p.innerText = photo1.title2;
let p1 = document.createElement("p");
p1.innerText = photo1.description;
let p2 = document.createElement("p");
p2.innerText = photo1.t1;
let img = document.createElement("img");
img.src = photo1.i1;
let p3 = document.createElement("p");
p3.innerText = photo1.d1;
let p22 = document.createElement("p");
p22.innerText = photo1.t2;
let img22 = document.createElement("img");
img22.src = photo1.i2;
let p32 = document.createElement("p");
p32.innerText = photo1.d2;
let p23 = document.createElement("p");
p23.innerText = photo1.t3;
let img33 = document.createElement("img");
img33.src = photo1.i3;
let p33 = document.createElement("p");
p33.innerText = photo1.d3;
let p24 = document.createElement("p");
p24.innerText = photo1.t4;
let img44 = document.createElement("img");
img44.src = photo1.i4;
let p34 = document.createElement("p");
p34.innerText = photo1.d4;
let p25 = document.createElement("p");
p25.innerText = photo1.t5;
let img55 = document.createElement("img");
img55.src = photo1.i5;
let p35 = document.createElement("p");
p35.innerText = photo1.d5;
let div = document.createElement("div");
div.setAttribute("id","news")
div.append(t1,p,p1,p2,img,p3,p22,img22,p32,p23,img33,p33,p24,img44,p34,p25,img55,p35);
container.append(div);
// });
}
append()
let right_side_data = {
"popular_stories" :[
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/20/2523771-untitled-design-2022-07-13t193451.521.jpg",
"about" : "CISCE ISC Class 12 Result 2022: Marking scheme, how to download here"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/21/2524088-untitled-design-51.jpg",
"about" : "CUSAT Result 2022 released at admissions.cusat.ac.in: Check important details here"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/21/2524104-untitled-design-2022-07-17t145605.612.jpg",
"about" : "Karnataka CET Result 2022 to be out soon: Website, how to check here"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/20/2523771-untitled-design-2022-07-13t193451.521.jpg",
"about" : "CISCE ISC Class 12 Result 2022: Marking scheme, how to download here"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/20/2523688-ayan-mukerji-kesariya-songfile-photos-1.jpg",
"about" : "Brahmastra: Ayan Mukerji defends use of 'love storiya' in Kesariya song, says 'didn't find it like elaichi in biryani'"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/21/2523941-medicines.jpg",
"about" : "Centre planning to cut prices of critical medicines for diabetes, cardiovascular and kidney diseases: Report"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/20/2523771-untitled-design-2022-07-13t193451.521.jpg",
"about" : "CISCE ISC Class 12 Result 2022: Marking scheme, how to download here"
}
],
"most_view":
[
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/quarter/public/2022/07/08/2520707-shreya-fi-1.jpg",
"about":"The Family Man actress Shreya ..."
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/quarter/public/2022/06/17/2359221-sara-ali-khan.jpg",
"about":"Sara Ali Khan looks sizzling h..."
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/quarter/public/2022/05/27/2007952-fotojet-2022-05-27t122144.022.jpg",
"about":"6 times Janhvi Kapoor handled ..."
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/quarter/public/2022/05/23/1942850-team-india.jpg",
"about":"Sanju Samson to Rahul Tripathi..."
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/quarter/public/2022/06/17/2359221-sara-ali-khan.jpg",
"about":"Sara Ali Khan looks sizzling h..."
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/quarter/public/2022/05/23/1942596-gyanvapi-mosque9.jpg",
"about":"Rare photo of Gyanvapi complex..."
}
],
"speed_read":
[
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/22/2524210-untitled-design-93.png",
"about":"Meet Arvind Goyal, Moradabad man who donated his wealth worth Rs 600 crore to UP government top-stories Fire breaks out in"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/22/2524207-fire.jpg",
"about":"Fire breaks out in Kandi forest area in West Bengal's Murshidabad district"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/22/2524205-2415196-untitled-design-70.jpg",
"about":"Man on Delhi-bound IndiGo plane claims bomb in bag, flight grounded"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/22/2524182-untitled-design-2022-06-28t164615.653.jpg",
"about":"CBSE Class 10 Result 2022: From how to check to past year result trends"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/21/2524191-2523244-wordle-answer-for-today-1.jpg",
"about":"Wordle 398 answer: Here is the Wordle answer for July 22"
}
],
"most_watch":
[
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/16/2522881-racism.jpg",
"about":"DNA Exclusive: Brad Hogg talks about racism in cricket, says 'anyone who's racist is not that intelligent'"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/07/05/2519945-soren-shah.jpg",
"about":"DNA Exclusive: Another Maharashtra in offing? Soren-Shah meeting catches eyeballs in Jharkhand"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/06/13/2232844-launch-of-the-trailer-of-bandon-mein-tha-dum.jpg",
"about":"Bandon Mein Tha Dum: The IND vs AUS Test series was fought with blood, brains and brawn, says producer Sudip Tewari"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/04/13/1451620-jasprit-bumrah.jpg",
"about":"'We keep on fighting,' says Jasprit Bumrah on MI's chances of winning IPL 2022 | Exclusive"
},
{
"image":"https://cdn.dnaindia.com/sites/default/files/styles/full/public/2022/01/02/1012756-2.png",
"about":"DNA Exclusive: Harbhajan Singh claims MS Dhoni, BCCI forced him out of Team India"
}
]
}
let popular = right_side_data.popular_stories
let mostViewed = right_side_data.most_view
let speed_read = right_side_data.speed_read
let mostWatch = right_side_data.most_watch
let rightdata = ()=>{
popular.forEach(function(el){
let append_popular = document.getElementById("right_side_popular_stories")
let div = document.createElement("div")
div.setAttribute("id","right_speed_read_box")
let img = document.createElement("img")
img.src = el.image
let p = document.createElement("p")
p.innerText = el.about
console.log(img,p)
div.append(img,p)
append_popular.append(div)
})
mostViewed.forEach(function(el){
let append_popular = document.getElementById("right_side_most_viewed")
let div = document.createElement("div")
div.setAttribute("id","right_most_viewed_box")
let img = document.createElement("img")
img.src = el.image
let p = document.createElement("p")
p.innerText = el.about
console.log(img,p)
div.append(img,p)
append_popular.append(div)
})
speed_read.forEach(function(el){
let append_popular = document.getElementById("right_side_speed_read_apend")
let div = document.createElement("div")
div.setAttribute("id","right_speed_read_box")
let img = document.createElement("img")
img.src = el.image
let p = document.createElement("p")
p.innerText = el.about
console.log(img,p)
div.append(img,p)
append_popular.append(div)
})
mostWatch.forEach(function(el){
let append_popular = document.getElementById("right_side_most_watched")
let div = document.createElement("div")
div.setAttribute("id","right_speed_read_box")
let img = document.createElement("img")
img.src = el.image
let p = document.createElement("p")
p.innerText = el.about
div.append(img,p)
append_popular.append(div)
})
}
rightdata()
</script>