-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
150 lines (136 loc) · 5.8 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sarvottam Samachar: Your Source of Supreme News</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- nav -->
<nav class="nav-container flex">
<div class="logo">
<a href="#">Sarvottam<br>Samachar</a>
</div>
<div class="topics flex">
<ul class="topic-elements flex specialNavbar">
<li class="hover-topics" onclick="changeColor(this)">Entertainment</li>
<li class="hover-topics" onclick="changeColor(this)">Sports</li>
<li class="hover-topics" onclick="changeColor(this)">Business</li>
<li class="hover-topics" onclick="changeColor(this)">Technology</li>
</ul>
</div>
<div class="topics flex sidebar">
<div class="close" onclick="hideSidebar()">
<img
width="34"
height="34"
src="https://img.icons8.com/fluency-systems-regular/24/FFFFFF/close-window.png"
alt="close-window"
/>
</div>
<ul class="topic-elements">
<li class="hover-topics" onclick="changeColor(this),hideSidebar()">Entertainment</li>
<li class="hover-topics" onclick="changeColor(this),hideSidebar()">Sports</li>
<li class="hover-topics" onclick="changeColor(this),hideSidebar()">Business</li>
<li class="hover-topics" onclick="changeColor(this),hideSidebar()">Technology</li>
</ul>
</div>
<div class="input-search flex">
<input type="text" class="input-box inputStyle" id="searchInput"
placeholder="Search"
title="Enter one of the following keywords: Business, Entertainment, General, Health, Science, Sports, Technology">
<button class="inputStyle" type="submit" id="searchButton" onclick="search()">
<svg
xmlns="http://www.w3.org/2000/svg"
x="0px"
y="0px"
width="30"
height="30"
viewBox="0 0 50 50"
style="fill: #ffffff"
>
<path
d="M 21 3 C 11.601563 3 4 10.601563 4 20 C 4 29.398438 11.601563 37 21 37 C 24.355469 37 27.460938 36.015625 30.09375 34.34375 L 42.375 46.625 L 46.625 42.375 L 34.5 30.28125 C 36.679688 27.421875 38 23.878906 38 20 C 38 10.601563 30.398438 3 21 3 Z M 21 7 C 28.199219 7 34 12.800781 34 20 C 34 27.199219 28.199219 33 21 33 C 13.800781 33 8 27.199219 8 20 C 8 12.800781 13.800781 7 21 7 Z"
></path>
</svg>
</button>
</div>
<div class="menu" onclick="showSidebar()">
<svg
xmlns="http://www.w3.org/2000/svg"
x="0px"
y="0px"
width="28"
height="28"
viewBox="0 0 30 30"
style="fill: #ffffff"
>
<path
d="M 3 7 A 1.0001 1.0001 0 1 0 3 9 L 27 9 A 1.0001 1.0001 0 1 0 27 7 L 3 7 z M 3 14 A 1.0001 1.0001 0 1 0 3 16 L 27 16 A 1.0001 1.0001 0 1 0 27 14 L 3 14 z M 3 21 A 1.0001 1.0001 0 1 0 3 23 L 27 23 A 1.0001 1.0001 0 1 0 27 21 L 3 21 z"
></path>
</svg>
</div>
</nav>
<!-- main -->
<main>
<div class="cards-container container flex"></div>
</main>
<!-- template -->
<template id="card-template">
<div class="card">
<div class="card-header">
<img src="https://via.placeholder.com/400x200" alt="new-image">
</div>
<div class="card-content flex">
<h3 id="news-title">This is a title.</h3>
<h6 class="news-source" id="news-source">BBC 30/01/24</h6>
<p class="news-desc" id="news-desc">Lorem ipsum dolor sit amet consectetur adipisicing elit. Nulla
suscipit doloremque sunt obcaecati nihil tenetur, itaque odio incidunt minus molestias iure
doloribus vitae voluptate soluta a temporibus assumenda, quam ad.</p>
</div>
</div>
</template>
<!-- scroll up button -->
<button id="scrollToTopBtn" onclick="scrollToTop()">↑</button>
<script src="script.js"></script>
<!-- Code injected by live-server -->
<script>
// <![CDATA[ <-- For SVG support
if ('WebSocket' in window) {
(function () {
function refreshCSS() {
var sheets = [].slice.call(document.getElementsByTagName("link"));
var head = document.getElementsByTagName("head")[0];
for (var i = 0; i < sheets.length; ++i) {
var elem = sheets[i];
var parent = elem.parentElement || head;
parent.removeChild(elem);
var rel = elem.rel;
if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") {
var url = elem.href.replace(/(&|\?)_cacheOverride=\d+/, '');
elem.href = url + (url.indexOf('?') >= 0 ? '&' : '?') + '_cacheOverride=' + (new Date().valueOf());
}
parent.appendChild(elem);
}
}
var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://';
var address = protocol + window.location.host + window.location.pathname + '/ws';
var socket = new WebSocket(address);
socket.onmessage = function (msg) {
if (msg.data == 'reload') window.location.reload();
else if (msg.data == 'refreshcss') refreshCSS();
};
if (sessionStorage && !sessionStorage.getItem('IsThisFirstTime_Log_From_LiveServer')) {
console.log('Live reload enabled.');
sessionStorage.setItem('IsThisFirstTime_Log_From_LiveServer', true);
}
})();
}
else {
console.error('Upgrade your browser. This Browser is NOT supported WebSocket for Live-Reloading.');
}
// ]]>
</script>
</body>
</html>