-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
214 lines (195 loc) · 11.6 KB
/
index.html
File metadata and controls
214 lines (195 loc) · 11.6 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="assets/css/styles.css">
<link rel="icon" type="image/png" href="https://assets.change.org/photos/5/em/lo/NuemLOUmFEvNCzR-800x450-noPad.jpg?1554179451">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"crossorigin="anonymous">
<meta http-equiv="Content-Security-Policy"
content="default-src 'self';
script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com;
style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://fonts.cdnfonts.com;
font-src 'self' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://fonts.cdnfonts.com;
img-src 'self' data: https: https://assets.change.org;
connect-src 'self' https://api.github.com https://cdn.jsdelivr.net;">
<title>NOM NOM NOM</title>
</head>
<body class="cursor">
<div class="heading container">
<h1>OFFICIAL DUBLIN FOOD HITLIST</h1>
</div>
<!-- Filter Section -->
<div class="filter-container container mt-4">
<div class="row">
<div class="col-md-8 px-0">
<input type="text" id="searchBar" class="form-control btn-warning" placeholder="Search">
<p class="places-reviewed mt-1">
Reviewed: <span id="placesReviewed"></span>
Avg Rating: <span id="averageRating"></span>
</p>
</div>
<div class="col-md-2 px-0">
<select id="ratingSort" class="form-select btn-warning">
<option value="" disabled selected>Rating</option>
<option value="asc">Ascending</option>
<option value="desc">Descending</option>
</select>
<button class="btn ai-prompt-btn" type="button" id="aiPromptButton">
AI Prompt
</button>
</div>
<div class="col-md-2 px-0">
<div class="dropdown">
<button class="btn btn-warning dropdown-toggle" type="button" id="categoryDropdown" data-bs-toggle="dropdown" aria-expanded="false">
Categories
</button>
<ul class="dropdown-menu" data-size="5" aria-labelledby="categoryDropdown" id="categoryDropdownMenu">
<!-- Categories will be populated dynamically -->
</ul>
</div>
<button class="btn btn-warning" type="button" id="clearButton" data-bs-toggle="dropdown" aria-expanded="false">
Clear Filters
</button>
</div>
</div>
</div>
<div id="foodList"></div>
<!-- Pagination Controls -->
<div id="paginationContainer" class="container mt-4">
<nav aria-label="Food list pagination">
<ul class="pagination justify-content-center" id="paginationControls">
<!-- Pagination buttons will be generated dynamically -->
</ul>
</nav>
</div>
<div id="catGifContainer" class="bottom-container container">
<p style="margin-bottom: 8px;">nom nom nom</p>
<img src="" alt="cat" id="catGif" class="mb-1 cat">
<p style="font-size: 9px; font-weight: 800;">click me ^</p>
</div>
<div id="emptyList" class="container">
<div class="row justify-content-md-center" role="alert">
<div class="col-5 error">
<p>NO RESULTS</p>
</div>
</div>
</div>
<!-- AI Prompt Modal -->
<div class="modal fade" id="aiPromptModal" tabindex="-1" aria-labelledby="aiPromptModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content ai-modal">
<div class="modal-header">
<h5 class="modal-title" id="aiPromptModalLabel"> AI Recommendation Prompt</h5>
</div>
<div class="modal-body">
<p class="ai-explanation">Copy this prompt and paste it into an AI for personalised recommendations!</p>
<div class="prompt-container">
<textarea id="aiPromptText" class="form-control" readonly rows="15"></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn ai-copy-btn" id="copyPromptBtn">Copy to Clipboard</button>
</div>
</div>
</div>
</div>
<!-- Admin Interface (Hidden by default) -->
<div id="adminInterface" class="container mt-5" style="display: none;">
<div class="row justify-content-center">
<div class="col-lg-8">
<div class="card admin-card">
<div class="card-body">
<button id="exitAdminBtn" class="btn btn-sm btn-outline-warning float-end mb-3">Exit Admin</button>
<div style="clear: both;"></div>
<!-- GitHub Token Setup -->
<div id="tokenSetup" class="mb-4">
<h5>Admin Token</h5>
<div class="input-group mb-3">
<input type="password" id="githubToken" class="form-control" placeholder="Enter Token">
<button id="saveTokenBtn" class="btn btn-warning">Save Token</button>
</div>
<small class="text-muted">
Ask Ronan for the fine-grained token (one time thing). I am NOT paying for a server and database.
</small>
</div>
<!-- Restaurant Form -->
<div id="restaurantForm" style="display: none;">
<div class="mb-4 d-grid gap-2 d-md-block">
<button type="button" id="addNewBtn" class="btn btn-warning me-md-2">Add New Restaurant</button>
<button type="button" id="editExistingBtn" class="btn btn-outline-warning">Edit Existing</button>
</div>
<!-- Search for existing restaurant -->
<div id="searchRestaurant" style="display: none;">
<h5>Search Restaurant to Edit</h5>
<div class="mb-3">
<input type="text" id="restaurantSearch" class="form-control form-control-lg" placeholder="Type restaurant name...">
<div id="searchResults" class="mt-2"></div>
</div>
</div>
<!-- Add/Edit Form -->
<div id="restaurantFormContent">
<h5 id="formTitle">Add New Restaurant</h5>
<form id="addRestaurantForm">
<div class="row">
<div class="col-md-8 mb-3">
<label for="placeName" class="form-label">Restaurant Name *</label>
<input type="text" class="form-control form-control-lg" id="placeName" required>
</div>
<div class="col-md-4 mb-3">
<label for="rating" class="form-label">Rating (1-10) *</label>
<input type="number" class="form-control form-control-lg" id="rating" min="1" max="10" step="0.1" required>
</div>
</div>
<div class="mb-3">
<label for="categories" class="form-label">Categories *</label>
<div id="categoryCheckboxes" class="row">
<!-- Categories will be populated dynamically -->
</div>
<div class="mt-2">
<input type="text" class="form-control" id="newCategory" placeholder="Add new category">
<button type="button" id="addCategoryBtn" class="btn btn-sm btn-outline-warning mt-1">Add Category</button>
</div>
</div>
<div class="mb-3">
<label for="description" class="form-label">Description *</label>
<textarea class="form-control" id="description" rows="4" required placeholder="Write your review..."></textarea>
</div>
<div class="mb-3">
<label for="images" class="form-label">Upload Images</label>
<input type="file" class="form-control form-control-lg" id="images" multiple accept="image/*">
<div id="imagePreview" class="mt-3 row"></div>
</div>
<div class="d-grid gap-2">
<button type="submit" class="btn btn-warning btn-lg" id="submitBtn">
<i class="fas fa-plus"></i> <span id="submitBtnText">Add Restaurant</span>
</button>
<button type="button" class="btn btn-outline-secondary" id="cancelEditBtn" style="display: none;">
Cancel Edit
</button>
<button type="button" class="btn btn-danger" id="deleteBtn" style="display: none;">
<i class="fas fa-trash"></i> Delete Restaurant
</button>
</div>
</form>
</div>
<!-- Status Messages -->
<div id="statusMessage" class="mt-3"></div>
</div>
</div>
</div>
</div>
</div>
<footer>
<a href="https://github.com/ronan-s1/OFFICIAL-DUBLIN-FOOD-HITLIST" target="_blank" title="GitHub">
<i class="fab fa-github"></i>
</a><br>
<p class="disclaimer">Disclaimer: These reviews are solely opinions. They are subjective and not intended to discredit any establishment :)</p>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="assets/scripts/scripts.js"></script>
</body>
</html>