-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
71 lines (63 loc) · 4.02 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
<!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">
<title>Rest Countries</title>
<link rel="stylesheet" href="./dist/styles.css">
</head>
<body class=" light-mode mode bg-gray-100 text-gray-700 dark:text-gray-200 dark:bg-gray-900">
<nav class="nav py-6 px-4 shadow-md light-mode mode bg-white text-gray-700 dark:text-gray-200 dark:bg-gray-800">
<div class="box flex justify-between items-center">
<div id="nav" class="md:text-xl font-bold">Where in the world now?</div>
<button id="dark-mode-btn" class=" text-sm lg:text-base flex items-center gap-x-1">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
</svg>
<p class="">dark mode</p>
</button>
</div>
</nav>
<!-- The search and the filter containers -->
<div class=" px-4 pt-10">
<div class="box md:flex items-start justify-between">
<form id="filter" class="flex items-center justify-between shadow-md rounded-xl p-4 gap-x-1 light-mode mode bg-white text-gray-700 dark:text-gray-200 dark:bg-gray-800">
<div class="flex items-center gap-x-2">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
<input type="text" name="search-input" placeholder="Search for a country..." id="search-input" class="outline-0 bg-inherit w-full">
</div>
<button class="text-center text-sm bg-green-600 rounded-lg capitalize text-white py-1 px-2 font-semibold">search</button>
</form>
<div id="filter-result" class="relative w-1/2 md:w-fit mt-8 md:mt-0 rounded-xl light-mode mode bg-white text-gray-700 dark:text-gray-200 dark:bg-gray-800">
<div id="filter-container" class="shadow-md p-4 space-y-2">
<div class="button flex items-center justify-between gap-x-1.5 cursor-pointer">
<p>filter by region</p>
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7" />
</svg>
</div>
</div>
<ul id="filter-list" class="py-2 rounded-xl shadow-md absolute w-full z-10 mt-1 light-mode mode bg-white text-gray-700 dark:text-gray-200 dark:bg-gray-800 hidden">
<li class="filter-options py-2 px-4 cursor-pointer hover:bg-gray-400">Africa</li>
<li class="filter-options py-2 px-4 cursor-pointer hover:bg-gray-400">America</li>
<li class="filter-options py-2 px-4 cursor-pointer hover:bg-gray-400">Asia</li>
<li class="filter-options py-2 px-4 cursor-pointer hover:bg-gray-400">Europe</li>
<li class="filter-options py-2 px-4 cursor-pointer hover:bg-gray-400">Oceania</li>
</ul>
</div>
</div>
</div>
<!-- For the country -->
<section class="px-8 md:px-4 mt-12">
<div id="countries-container" class="box gap-12 grid justify-center md:grid md:grid-cols-2 lg:grid-cols-4">
</div>
</section>
<script src="./func.js"></script>
<script src="./easyHttp3.js"></script>
<script src="ui.js"></script>
<script src="app.js"></script>
</body>
</html>