-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwfc_places.html
184 lines (172 loc) · 9.15 KB
/
wfc_places.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
<!-- TOBE DELETED -->
<!-- Move this page to react component page -->
<!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>Loteng Dev - Beriuk Berajah dan Berkembang</title>
<link rel="stylesheet" href="./css/main.css">
</head>
<body>
<nav class="m-6 lg:m-10 flex items-center">
<div class="pr-10 lg:border-r border-solid border-grey">
<a href="index.html">
<img class="h-7 lg:h-11" src="./icons/logo.svg" />
</a>
</div>
<ul class="hidden lg:flex flex-grow pl-10 list-none">
<li class="mr-8"><a href="index.html">Home</a></li>
<li class="mr-8"><a href="events.html">Acara</a></li>
<li class="mr-8"><a href="speakers.html">Pembicara</a></li>
<li class="mr-8"><a href="about.html">Tentang</a></li>
</ul>
<div class="hidden lg:flex justify-center">
<button class="flex items-center bg-blue px-4 py-3 mr-4 rounded text-white">
<img class="inline mr-3" src="./icons/telegram.svg" />Join Group
</button>
<button class="flex items-center bg-neutral-100 border border-solid border-grey px-4 py-2 rounded">
<img class="inline mr-3" src="./icons/github.svg" />Contribute
</button>
</div>
<div onclick="show_sidebar()" class="lg:hidden flex flex-grow justify-end">
<img src="./icons/menu.svg" />
</div>
</nav>
<div id="sidebar" class="bg-[rgba(0,0,0,.5)] hidden top-0 bottom-0 left-0 right-0 z-10">
<aside class="fixed z-40 h-screen p-4 overflow-y-auto bg-white w-80 dark:bg-gray-800">
<div class="flex flex-col justify-between h-full">
<div>
<div class="inline-flex items-center mb-4 text-base font-semibold text-gray-500 dark:text-gray-400">
<img class="h-7 lg:h-11" src="./icons/logo.svg" />
<button type="button" onclick="close_sidebar()" data-drawer-dismiss="drawer-example"
aria-controls="drawer-example"
class="bg-transparent rounded-lg text-sm p-1.5 absolute top-2.5 right-2.5 inline-flex items-center">
<img src="./icons/close.svg" alt="close" class="w-5 h-5">
</button>
</div>
<ul class="w-48 text-sm font-bold">
<li class="py-2 px-4 w-full">
<a href="#home">Home</a>
</li>
<li class="py-2 px-4 w-full">
<a href="#">Acara</a>
</li>
<li class="py-2 px-4 w-full">
<a href="#">
Pembicara
</a>
</li>
<li class="py-2 px-4 w-full">
<a href="#">Lokasi WFC</a>
</li>
<li class="py-2 px-4 w-full">
<a href="#">Tentang</a>
</li>
</ul>
</div>
<div class="flex flex-col justify-center ">
<a href="#"
class="flex justify-center items-center bg-neutral-100 border border-solid border-grey px-4 py-2 rounded mb-5">
<img class="inline mr-3" src="./icons/github.svg" />Contribute
</a>
<a href="#"
class="flex justify-center items-center bg-blue px-4 py-3 rounded text-white mb-5">
<img class="inline mr-3" src="./icons/telegram.svg" />Join Group
</a>
</div>
</div>
</aside>
</div>
<div class="bg-[#F5F5F5] pt-14">
<h1 class="text-center tracking-wide text-sm text-indigo-900 font-semibold">Tempat WFC Lombok Tengah</h1>
<div class="container my-12 mx-auto px-4 md:px-12">
<div class="flex flex-wrap -mx-1 lg:-mx-4" id="tempatWFCContainer">
</div>
</div>
</div>
<footer class="p-4">
<div class="container mx-auto mt-5 mb-5 flex justify-center items-center">
<div class="border-t-[2px] rounded-lg border-grey sm:w-full w-[95%]"></div>
</div>
<ul class="flex flex-row w-full justify-center items-center mt-3 text-sm text-gray-500 dark:text-gray-400 sm:mt-0">
<li>
<a href="#" class="mr-4 md:mr-6">Home</a>
</li>
<li>
<a href="#" class="mr-4 md:mr-6">Events</a>
</li>
<li>
<a href="#" class="mr-4 md:mr-6">Partners</a>
</li>
<li>
<a href="#" class="mr-4 md:mr-6">About</a>
</li>
</ul>
</footer>
<script>
function show_sidebar() {
document.getElementById('sidebar').classList.remove('hidden')
document.getElementById('sidebar').classList.add('fixed')
}
function close_sidebar() {
document.getElementById('sidebar').classList.remove('fixed')
document.getElementById('sidebar').classList.add('hidden')
}
function showPriceSymbol(price) {
switch (price) {
case '$':
return 'murah';
case '$$':
return 'standar';
case '$$$':
return 'mahal';
default:
return '';
}
}
fetch('./data/tempat_wfc.json')
.then(response => response.json())
.then(data => {
const tempatWFCContainer = document.getElementById('tempatWFCContainer');
data.forEach(tempat => {
// Membuat elemen HTML untuk setiap tempat WFC
const tempatWFCElement = `
<div class="my-1 px-1 w-full md:w-1/2 lg:my-4 lg:px-4 lg:w-1/3">
<article class="overflow-hidden rounded-lg shadow-lg">
<div class="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-2xl">
<div class="md:flex">
<div class="p-12">
<div class="uppercase tracking-wide text-sm text-indigo-500 font-semibold">${tempat.name}</div>
<a href="${tempat.lokasi}" class="block mt-1 text-lg leading-tight font-medium text-black hover:underline">Lokasi</a>
<div class="mt-2 flex items-center text-sm text-gray-500">
<span class="mr-2">Wifi:</span> <span class="font-medium text-${tempat.wifi ? 'green' : 'red'}-500">${tempat.wifi ? '✅' : '❌'}</span>
</div>
<div class="flex items-center text-sm text-gray-500">
<span class="mr-2">Colokan:</span> <span class="font-medium text-${tempat.colokan ? 'green' : 'red'}-500">${tempat.colokan ? '✅' : '❌'}</span>
</div>
<div class="flex items-center text-sm text-gray-500">
<span class="mr-2">Toilet:</span> <span class="font-medium text-${tempat.toilet ? 'green' : 'red'}-500">${tempat.toilet ? '✅' : '❌'}</span>
</div>
<div class="flex items-center text-sm text-gray-500">
<span class="mr-2">Musholla:</span> <span class="font-medium text-${tempat.musholla ? 'green' : 'red'}-500">${tempat.musholla ? '✅' : '❌'}</span>
</div>
<div class="flex items-center text-sm text-gray-500">
<span class="mr-2">Background Music:</span> <span class="font-medium text-${tempat.background_music ? 'green' : 'red'}-500">${tempat.background_music ? '✅' : '❌'}</span>
</div>
<div class="flex items-center text-sm text-gray-500">
<span class="mr-2">Harga:</span> <span class="font-medium">${showPriceSymbol(tempat.rate_harga)}</span>
</div>
</div>
</div>
</div>
</article>
</div>
`;
tempatWFCContainer.insertAdjacentHTML('beforeend', tempatWFCElement);
});
});
</script>
</body>
</html>