NihalGazi commited on
Commit
a31c5b5
·
verified ·
1 Parent(s): bd67720

Upload index.html

Browse files
Files changed (1) hide show
  1. index.html +278 -0
index.html ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <link rel="icon" type"image/png" href="https://huggingface.co/spaces/NihalGazi/Wikipedai/resolve/main/wikipedai.png">
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Wikipedai</title>
8
+ <style>
9
+ :root {
10
+ --background-color: #ffffff;
11
+ --text-color: #202122;
12
+ --link-color: #3366cc;
13
+ --border-color: #a2a9b1;
14
+ --button-primary-background: #3366cc;
15
+ --button-primary-text: #ffffff;
16
+ --search-background: #ffffff;
17
+ --search-border: #a2a9b1;
18
+ --search-focus-border: #3366cc;
19
+ }
20
+
21
+ body {
22
+ font-family: sans-serif;
23
+ margin: 0;
24
+ background-color: var(--background-color);
25
+ color: var(--text-color);
26
+ display: flex;
27
+ flex-direction: column;
28
+ align-items: center;
29
+ min-height: 100vh;
30
+ }
31
+
32
+ main {
33
+ display: flex;
34
+ flex-direction: column;
35
+ align-items: center;
36
+ justify-content: center;
37
+ flex-grow: 1;
38
+ padding: 1em;
39
+ width: 100%;
40
+ box-sizing: border-box;
41
+ }
42
+
43
+ .central-logo {
44
+ width: 180px;
45
+ height: 180px;
46
+ margin-bottom: 1em;
47
+ /* Ensure the new logo scales properly if it's not square */
48
+ object-fit: contain;
49
+ }
50
+
51
+ .central-title {
52
+ font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
53
+ font-size: 3em;
54
+ font-weight: normal;
55
+ margin: 0;
56
+ }
57
+
58
+ .central-subtitle {
59
+ font-size: 1.1em;
60
+ margin-top: 0.25em;
61
+ color: #54595d;
62
+ }
63
+
64
+ .search-container {
65
+ margin-top: 1.5em;
66
+ width: 100%;
67
+ max-width: 550px;
68
+ }
69
+
70
+ .search-form {
71
+ display: flex;
72
+ border: 1px solid var(--search-border);
73
+ border-radius: 2px;
74
+ overflow: hidden;
75
+ }
76
+
77
+ .search-form:focus-within {
78
+ border-color: var(--search-focus-border);
79
+ }
80
+
81
+ #searchInput {
82
+ flex-grow: 1;
83
+ border: none;
84
+ padding: 10px 12px;
85
+ font-size: 1em;
86
+ background-color: var(--search-background);
87
+ }
88
+
89
+ #searchInput:focus {
90
+ outline: none;
91
+ }
92
+
93
+ .search-button {
94
+ background-color: var(--button-primary-background);
95
+ color: var(--button-primary-text);
96
+ border: none;
97
+ padding: 0 20px;
98
+ font-size: 1em;
99
+ font-weight: bold;
100
+ cursor: pointer;
101
+ transition: background-color 0.2s;
102
+ }
103
+
104
+ .search-button:hover {
105
+ background-color: #447ff5;
106
+ }
107
+
108
+ .lang-list {
109
+ margin-top: 2em;
110
+ display: flex;
111
+ flex-wrap: wrap;
112
+ justify-content: center;
113
+ gap: 1.5em;
114
+ max-width: 800px;
115
+ }
116
+
117
+ .lang-list-item {
118
+ text-align: center;
119
+ line-height: 1.4;
120
+ }
121
+
122
+ .lang-list-item a {
123
+ text-decoration: none;
124
+ color: var(--link-color);
125
+ }
126
+
127
+ .lang-list-item strong {
128
+ display: block;
129
+ font-size: 1.1em;
130
+ }
131
+
132
+ .lang-list-item small {
133
+ color: #54595d;
134
+ font-size: 0.85em;
135
+ }
136
+
137
+ footer {
138
+ width: 100%;
139
+ text-align: center;
140
+ padding: 1.5em 0;
141
+ font-size: 0.8em;
142
+ color: #54595d;
143
+ }
144
+
145
+ footer a {
146
+ color: var(--link-color);
147
+ text-decoration: none;
148
+ margin: 0 0.5em;
149
+ }
150
+
151
+ @media (max-width: 600px) {
152
+ .central-logo {
153
+ width: 120px;
154
+ height: 120px;
155
+ }
156
+ .central-title {
157
+ font-size: 2.2em;
158
+ }
159
+ .lang-list {
160
+ gap: 1em;
161
+ }
162
+ }
163
+ </style>
164
+ </head>
165
+ <body>
166
+
167
+ <main>
168
+ <img src="https://huggingface.co/spaces/NihalGazi/Wikipedai/resolve/main/wikipedai.png" alt="Wikipedai Globe Logo" class="central-logo">
169
+ <h1 class="central-title">Wikipedai</h1>
170
+ <div class="central-subtitle">The Free Encyclopedai</div>
171
+
172
+ <div class="search-container">
173
+ <form id="search-form" class="search-form">
174
+ <input type="search" id="searchInput" placeholder="Search Wikipedai" autofocus>
175
+ <button type="submit" class="search-button">
176
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: white;"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
177
+ </button>
178
+ </form>
179
+ </div>
180
+
181
+ <div class="lang-list">
182
+ <div class="lang-list-item">
183
+ <a href="#">
184
+ <strong>English</strong>
185
+ <small>6,900,000+ articles</small>
186
+ </a>
187
+ </div>
188
+ <div class="lang-list-item">
189
+ <a href="#">
190
+ <strong>日本語</strong>
191
+ <small>1,400,000+ 記事</small>
192
+ </a>
193
+ </div>
194
+ <div class="lang-list-item">
195
+ <a href="#">
196
+ <strong>Español</strong>
197
+ <small>1,900,000+ artículos</small>
198
+ </a>
199
+ </div>
200
+ <div class="lang-list-item">
201
+ <a href="#">
202
+ <strong>Русский</strong>
203
+ <small>2,000,000+ статей</small>
204
+ </a>
205
+ </div>
206
+ <div class="lang-list-item">
207
+ <a href="#">
208
+ <strong>Deutsch</strong>
209
+ <small>2,900,000+ Artikel</small>
210
+ </a>
211
+ </div>
212
+ <div class="lang-list-item">
213
+ <a href="#">
214
+ <strong>Français</strong>
215
+ <small>2,600,000+ articles</small>
216
+ </a>
217
+ </div>
218
+ <div class="lang-list-item">
219
+ <a href="#">
220
+ <strong>Italiano</strong>
221
+ <small>1,800,000+ voci</small>
222
+ </a>
223
+ </div>
224
+ <div class="lang-list-item">
225
+ <a href="#">
226
+ <strong>中文</strong>
227
+ <small>1,400,000+ 条目</small>
228
+ </a>
229
+ </div>
230
+ <div class="lang-list-item">
231
+ <a href="#">
232
+ <strong>Português</strong>
233
+ <small>1,100,000+ artigos</small>
234
+ </a>
235
+ </div>
236
+ <div class="lang-list-item">
237
+ <a href="#">
238
+ <strong>العربية</strong>
239
+ <small>1,200,000+ مقالة</small>
240
+ </a>
241
+ </div>
242
+ </div>
243
+ </main>
244
+
245
+ <footer>
246
+ <div>
247
+ <a href="#">Wikimedia Foundation</a>
248
+ <a href="#">Terms of Use</a>
249
+ <a href="#">Privacy Policy</a>
250
+ </div>
251
+ </footer>
252
+
253
+ <script>
254
+ document.getElementById('search-form').addEventListener('submit', function(event) {
255
+ // Prevent the default form submission behavior
256
+ event.preventDefault();
257
+
258
+ // Get the user's query from the input field
259
+ const query = document.getElementById('searchInput').value;
260
+
261
+ // If the query is empty, do nothing
262
+ if (!query) {
263
+ return;
264
+ }
265
+
266
+ // URI-encode the query to handle special characters safely
267
+ const encodedQuery = encodeURIComponent(query);
268
+
269
+ // Construct the final URL for the API
270
+ const apiUrl = `https://nihalgazi-Wikipedai.hf.space/Wikipedai/${encodedQuery}`;
271
+
272
+ // Redirect the browser to the API URL
273
+ window.location.href = apiUrl;
274
+ });
275
+ </script>
276
+
277
+ </body>
278
+ </html>