-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
158 lines (141 loc) · 5.08 KB
/
index.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
<!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" />
<link rel="shortcut icon" href="./assets/logo.png" type="image/x-icon" />
<!--============ bootsrap cdn ==============-->
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"
crossorigin="anonymous"
/>
<!--============ bootsrap cdn =============== -->
<title>News Nest</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<!--===================== navabar =========== -->
<nav
class="navbar navbar-expand-lg fixed-top navbar bg-dark"
data-bs-theme="dark"
>
<div class="container-fluid">
<a href="#" onclick="reload()" class="company-logo">
<img src="./assets/logo.png" alt="company logo" />
</a>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav gap-5 me-auto mb-2 mb-lg-0">
<button class="btn btn-" type="submit">
<li class="nav-item" id="ipl" onclick="onNavItemClick('ipl')">
<a class="nav-link active" aria-current="page" href="#">IPL</a>
</li>
</button>
<button class="btn btn- " type="submit">
<li
class="nav-item"
id="ipl"
onclick="onNavItemClick('politics')"
>
<a class="nav-link active" aria-current="page" href="#"
>Politics</a
>
</li>
</button>
<button class="btn btn-" type="submit">
<li class="nav-item" id="ipl" onclick="onNavItemClick('finance')">
<a class="nav-link active" aria-current="page" href="#"
>Finance</a
>
</li>
</button>
<button class="btn btn- " type="submit">
<li class="nav-item" id="ipl" onclick="onNavItemClick('Ai')">
<a class="nav-link active" aria-current="page" href="#"
>Artificial Intelligence</a
>
</li>
</button>
<button class="btn btn- " type="submit">
<li
class="nav-item"
id="ipl"
onclick="onNavItemClick('headlines')"
>
<a class="nav-link active" aria-current="page" href="#"
>Top Headlines</a
>
</li>
</button>
</ul>
<form class="d-flex" role="search">
<input
class="form-control me-2"
type="search"
id="search-text"
type="text"
class="news-input"
placeholder="e.g. Science"
/>
<button
id="search-button"
class="btn btn-primary search-button"
type="submit"
>
Search
</button>
</form>
</div>
</div>
</nav>
<!--===================== navabar =========== -->
<!--============ main body for news cards ============== -->
<main>
<div class="cards-container container flex" id="cards-container"></div>
</main>
<!--============ main body for news cards ============== -->
<!--============ template for news cards ============== -->
<template id="template-news-card">
<div class="card">
<div class="card-header">
<img
src="https://via.placeholder.com/400x200"
alt="news-image"
id="news-img"
/>
</div>
<div class="card-content">
<h3 id="news-title">This is the Title</h3>
<h6 class="news-source" id="news-source">End Gadget 26/08/2023</h6>
<p class="news-desc" id="news-desc">
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Recusandae
saepe quis voluptatum quisquam vitae doloremque facilis molestias
quae ratione cumque!
</p>
</div>
</div>
</template>
<!--============ template for news cards ============== -->
<script src="script.js"></script>
<!--============ bootstrap cdn ==============-->
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"
></script>
<!--============ bootstrap cdn =============== -->
</body>
</html>