-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
194 lines (132 loc) · 9.29 KB
/
index.html
File metadata and controls
194 lines (132 loc) · 9.29 KB
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
<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>indian express clone</title>
<link rel="stylesheet" href="allcss/header.css">
<link rel="stylesheet" href="allcss/index.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/736f516a87.js" crossorigin="anonymous"></script>
</head>
<body>
<!-- ------------------header import------------------------------------------- -->
<header id="header">
</header>
<!-- -----------------------header done------------------------------------ -->
<div class="ad_side">
<img src="https://cdn.cp.adobe.io/content/2/rendition/e83750e9-e6b8-4a39-944c-c27966c04113/artwork/342419a1-d771-4247-876b-f20697ec1e1f/version/0/format/jpg/dimension/width/size/400" alt="">
</div>
<div class="ad_side_2">
<img src="https://cdn.cp.adobe.io/content/2/rendition/2bc139e1-af58-426c-8a0e-a32b224e1a20/artwork/3fc16eb5-d0bf-44f3-a0e4-e7674b9ebf56/version/0/format/jpg/dimension/width/size/400" alt="">
</div>
<div id="topnewstories-head"><a href="explained.html">Top New Stories</a><svg xmlns="http://www.w3.org/2000/svg" fill="red" width="24" height="20" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"/></svg></div>
<div class="allnews">
<div id="topnewstories">
</div>
<div id="topnewstories-side">
</div>
</div>
<!-- ------------------------------------trending section------------------------------------------------ -->
<div id="topnewstories-head"><a href="politicalpulse.html">Latest News</a><svg xmlns="http://www.w3.org/2000/svg" fill="red" width="24" height="20" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"/></svg></div>
<div class="trendingnews">
<div id="trending">
</div>
<div id="trending-side">
</div>
</div>
<!-- ------------------------------------city news---------------------------------------------------------- -->
<div id="topnewstories-head"><a href="city.html">City News</a><svg xmlns="http://www.w3.org/2000/svg" fill="red" width="24" height="20" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"/></svg></div>
<div class="allnews">
<div id="mumbai">
</div>
<div id="mumbai-side">
</div>
</div>
<!-- ---------------------------------------express explained------------------------------------------ -->
<div id="main-e-ex">
<div id="e-ex">
<img src="https://indianexpress.com/wp-content/themes/indianexpress/images/logos/explain-widget-logo-new.png" alt="">
</div>
<div id="express-explained"> </div>
</div>
<!-- ----------------------------------------------only on express------------------------------------------------ -->
<div id="topnewstories-head"><a href="india.html">Only on Express</a><svg xmlns="http://www.w3.org/2000/svg" fill="red" width="24" height="20" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"/></svg></div>
<div id="only-on-express">
<div id="onlyon">
<div id="onlyon1">
</div>
<div id="onlyon2">
</div>
</div>
<div id="onlyon-side">
</div>
</div>
<!-- ----------------------------------------------entertainment--------------------------------------- -->
<div id="topnewstories-head"><a href="entertainment.html">Entertainment</a><svg xmlns="http://www.w3.org/2000/svg" fill="red" width="24" height="20" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"/></svg></div>
<div id="entertainmentn">
<div id="enteron">
<div id="enteron1">
</div>
<div id="enteron2">
</div>
</div>
<div id="enteron-side">
</div>
</div>
<!-- --------------------------------------------------sports---------------------------------------------------------- -->
<div id="topnewstories-head"><a href="sports.html">Sports</a><svg xmlns="http://www.w3.org/2000/svg" fill="red" width="24" height="20" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"/></svg></div>
<div id="sport-news">
<div id="sporton">
<div id="sporton1">
</div>
<div id="sporton2">
</div>
</div>
<div id="sporton-side">
</div>
</div>
<!-- ----------------------------------------education------------------------------------------------------- -->
<div id="topnewstories-head"><a href="education.html">Education</a><svg xmlns="http://www.w3.org/2000/svg" fill="red" width="24" height="20" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"/></svg></div>
<div class="allnews">
<div id="educationn">
</div>
<div id="educationn-side">
</div>
</div>
<!-- -------------------------------------footer---------------------------------------------------------- -->
<footer id="footer">
</footer>
</body>
</html>
<script src="homepage-scripts/index.js" type="module"></script>
<script src="header/header.js" type="module"></script>
<!-- ------------------------------------searchinput-------------------------------------------------- -->
<script>
const options = {
method: 'GET',
headers: {
'X-RapidAPI-Key': 'c71164da45msh1f47a14d576454dp1f583ajsn5864dad38a50',
'X-RapidAPI-Host': 'free-news.p.rapidapi.com'
}
};
let searchresults=()=>{
var searchbox=document.getElementById("searchbox1").value;
setTimeout(() => {
fetch(`https://free-news.p.rapidapi.com/v1/search?q=${searchbox}&lang=en`, options)
.then(function(response){return response.json()})
.then(function(response){
console.log(response.articles);
let searchdata=[];
searchdata.push(response.articles);
localStorage.setItem("searchdata",JSON.stringify(searchdata));
localStorage.setItem("searchbox",JSON.stringify(searchbox));
window.open("searchresults.html")
})
.catch(err => console.error(err));
}, "1000");
}
</script>