-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
249 lines (230 loc) · 10.7 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="ESTIN Source - Comprehensive educational resources across different domains">
<title>ESTIN Source | Educational Resources Hub</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<link id="theme-link" rel="stylesheet" href="themes/theme2/style.css">
<style>
#visit-widget {
display: flex;
align-items: center;
background-color: #2f3b4c;
color: white;
padding: 10px 20px;
border-radius: 10px;
width: 250px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
#visit-widget i {
font-size: 30px;
color: #4caf50;
margin-right: 15px;
}
#visit-widget h3 {
font-size: 14px;
margin: 0;
}
#visit-widget p {
font-size: 20px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="hero">
<div class="hero-content">
<h1 class="hero-title">ESTIN <span>Src</span></h1>
<button class="theme-switcher" onclick="switchCSS()">
<i class="fas fa-adjust"></i>
</button>
<p class="hero-description">
Discover and access comprehensive collections of educational resources across different domains
</p>
<div class="search-container">
<input type="search" class="search-input" placeholder="Search resources..." aria-label="Search resources">
<i class="fas fa-search search-icon"></i>
</div>
</div>
</div>
<main id="main-content" class="menu-grid">
<p class="no-results">No resources found matching your search.</p>
<article class="menu-card" data-search-terms="architecture design patterns system blueprints software development infrastructure">
<div class="card-header">
<i class="fas fa-archway card-icon" aria-hidden="true"></i>
<h2 class="card-title">Architecture of Computer 1</h2>
<p class="card-description">
Explore comprehensive architecture resources, design patterns, and system blueprints for modern software development
</p>
</div>
<div class="card-stats">
<div class="stat">
<div class="stat-number">13</div>
<div class="stat-label">Resources</div>
</div>
<div class="stat">
<div class="stat-number">3</div>
<div class="stat-label">Categories</div>
</div>
</div>
<a href="aoc/archi.html" class="card-link">
Access Resources <i class="fas fa-arrow-right" aria-hidden="true"></i>
</a>
</article>
<article class="menu-card" data-search-terms="mathematical analysis calculus analytical methods mathematics equations derivatives integrals">
<div class="card-header">
<i class="fas fa-chart-line card-icon" aria-hidden="true"></i>
<h2 class="card-title">Analysis 1</h2>
<p class="card-description">
Deep dive into mathematical analysis, calculus, and analytical methods with practical examples
</p>
</div>
<div class="card-stats">
<div class="stat">
<div class="stat-number">12</div>
<div class="stat-label">Resources</div>
</div>
<div class="stat">
<div class="stat-number">3</div>
<div class="stat-label">Categories</div>
</div>
</div>
<a href="analysis/analysis.html" class="card-link">
Access Resources <i class="fas fa-arrow-right" aria-hidden="true"></i>
</a>
</article>
<article class="menu-card" data-search-terms="linear algebra abstract algebra mathematical structures matrices vectors spaces groups rings fields">
<div class="card-header">
<i class="fas fa-bolt card-icon" aria-hidden="true"></i>
<h2 class="card-title">Electricity 1</h2>
<p class="card-description">
Your comprehensive archive of educational resources, providing access to a curated collection of TDs, examinations, and academic materials from leading institutions.
</p>
</div>
<div class="card-stats">
<div class="stat">
<div class="stat-number">11</div>
<div class="stat-label">Resources</div>
</div>
<div class="stat">
<div class="stat-number">3</div>
<div class="stat-label">Categories</div>
</div>
</div>
<a href="elec/elec.html" class="card-link">
Access Resources <i class="fas fa-arrow-right" aria-hidden="true"></i>
</a>
</article>
<article class="menu-card" data-search-terms="linear algebra abstract algebra mathematical structures matrices vectors spaces groups rings fields">
<div class="card-header">
<i class="fas fa-calculator card-icon" aria-hidden="true"></i>
<h2 class="card-title">Algebra 1</h2>
<p class="card-description">
Master linear algebra, abstract algebra, and mathematical structures through comprehensive guides
</p>
</div>
<div class="card-stats">
<div class="stat">
<div class="stat-number">15</div>
<div class="stat-label">Resources</div>
</div>
<div class="stat">
<div class="stat-number">3</div>
<div class="stat-label">Categories</div>
</div>
</div>
<a href="algebra1/algebra1.html" class="card-link">
Access Resources <i class="fas fa-arrow-right" aria-hidden="true"></i>
</a>
</article>
<article class="menu-card" data-search-terms="mathematical analysis calculus analytical methods mathematics equations derivatives integrals">
<div class="card-header">
<i class="fas fa-book card-icon" aria-hidden="true"></i>
<h2 class="card-title">English</h2>
<p class="card-description">
Deep dive into english. flAg={BYHaitomass}
</p>
</div>
<div class="card-stats">
<div class="stat">
<div class="stat-number">7</div>
<div class="stat-label">Resources</div>
</div>
<div class="stat">
<div class="stat-number">3</div>
<div class="stat-label">Categories</div>
</div>
</div>
<a href="english/english.html" class="card-link">
Access Resources <i class="fas fa-arrow-right" aria-hidden="true"></i>
</a>
</article>
</main>
<script>
document.addEventListener('DOMContentLoaded', function() {
const searchInput = document.querySelector('.search-input');
const cards = document.querySelectorAll('.menu-card');
const noResults = document.querySelector('.no-results');
searchInput.addEventListener('input', function() {
const searchTerm = searchInput.value.toLowerCase();
let visibleCards = 0;
cards.forEach(card => {
const terms = card.dataset.searchTerms.toLowerCase();
const title = card.querySelector('.card-title').textContent.toLowerCase();
if (terms.includes(searchTerm) || title.includes(searchTerm)) {
card.classList.remove('hidden');
visibleCards++;
} else {
card.classList.add('hidden');
}
});
noResults.style.display = visibleCards ? 'none' : 'block';
});
});
function switchCSS() {
const themeLink = document.getElementById('theme-link'); // Get the link element
// Check the current stylesheet and switch
if (themeLink.getAttribute('href') === 'themes/theme1/style.css') {
themeLink.setAttribute('href', 'themes/theme2/style.css'); // Switch to style2.css
localStorage.setItem('theme', 'themes/theme2/'); // Save the theme in local storage
} else {
themeLink.setAttribute('href', 'themes/theme1/style.css'); // Switch to style1.css
localStorage.setItem('theme', 'themes/theme1/'); // Save the theme in local storage
}
}
// Check for saved theme in localStorage on page load
window.onload = function() {
const savedTheme = localStorage.getItem('theme');
const themeLink = document.getElementById('theme-link');
if (savedTheme) {
themeLink.setAttribute('href', `${savedTheme}/style.css`); // Apply saved theme
} else {
// If no saved theme, default to style1.css
themeLink.setAttribute('href', 'themes/theme2/style.css');
}
}
</script>
<div id="visit-widget">
<i class="fas fa-users"></i>
<div>
<h3>Total Visits</h3>
<p id="total-visits">Loading...</p>
</div>
</div>
<script>
async function fetchVisitCount() {
try {
const response = await fetch("https://visit-counter-estin-src.vercel.app/visits");
const data = await response.json();
document.getElementById("total-visits").innerText = data.visits.total_visits;
} catch (error) {
document.getElementById("total-visits").innerText = "Error loading data";
}
}
// Fetch the visit count on page load
fetchVisitCount();
</script>
</body>
</html>