-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
232 lines (225 loc) · 10 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Magenssium Reviews</title>
<link rel="icon" type="image/x-icon" href="resources/thumbnail.png">
<style>
body {
background-color: #1e1e1e;
color: #ffffff;
font-family: Arial, sans-serif;
}
a {
color: #6ea2ff;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
h1, h2, h3 {
display: flex;
align-items: center;
color: #fff;
}
.logo {
max-width: 64px;
max-height: 64px;
margin: 0 10px;
}
.separator {
background-color: #444;
height: 4px;
margin: 10px 2px;
border-radius: 10px;
}
pre {
font-family: Arial, sans-serif;
font-size: medium;
text-wrap: wrap;
}
nav {
text-align: center;
}
main {
display: grid;
grid-template-columns: min-content auto;
gap: 20px;
}
aside {
min-width: fit-content;
max-width: 300px;
background-color: #444;
padding: 20px;
border-radius: 10px;
}
aside ul {
list-style-type: none;
padding: 0;
margin: 0;
}
aside ul li {
margin-bottom: 10px;
}
.container {
margin: 0 auto;
padding: 20px;
}
p {
line-height: 1.6;
}
.button {
display: inline-block;
padding: 10px 20px;
background-color: #4caf50;
color: #ffffff;
font-size: medium;
font-weight: bold;
border: none;
border-radius: 5px;
cursor: pointer;
}
.button:hover {
background-color: #45a049;
}
#saveButton {
display:none;
}
footer {
text-align: center;
}
/* Card layout */
.card-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
}
.card {
background-color: #333;
color: #fff;
border-radius: 10px;
padding: 20px;
margin: 20px;
box-shadow: 0 4px 7px rgba(0,0,0,0.1);
}
.card-title {
font-size: 24px;
font-weight: bold;
margin-bottom: 10px;
}
.card-content {
font-size: 16px;
line-height: 1.5;
}
/* Modal style */
.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0,0,0,0.5);
}
.modal-content {
background-color: #333;
margin: 10% auto;
padding: 20px;
border-radius: 10px;
max-width: 600px;
color: #fff;
}
.close {
color: #aaa;
float: right;
font-size: 20px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #fff;
text-decoration: none;
cursor: pointer;
}
/* Form style */
textarea {
resize: none;
}
input[type="text"],
input[type="email"],
textarea {
width: 100%;
padding: 10px;
margin: 5px;
border: 1px solid #ccc;
border-radius: 5px;
background-color: #444;
color: #fff;
font-size: large;
box-sizing: border-box;
}
input[type="submit"] {
background-color: #4caf50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
input:focus,
textarea:focus {
outline: 0;
}
</style>
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<header>
<h1>
<img class="logo" src="resources/thumbnail.png" alt="logo">
Magnessium - Reviews
</h1>
<div class="separator"></div>
<nav>
<button id="create-button" class="button">Create new review</button>
<button id="reload-button" class="button">Reload</button>
</nav>
<div class="separator"></div>
</header>
<main>
<aside>
<ul id="review-list"></ul>
</aside>
<article id="reviews" class="container card-container"></article>
</main>
<footer>
<span>2024 ©</span>
</footer>
<div id="review-modal" class="modal">
<div class="modal-content">
<span class="close" onClick="closeModal(Modals.Reviews)">×</span>
<h2 id="modal-title"></h2>
<p id="modal-content"><textarea id="modify-review" rows="20"></textarea></p>
<div>
<button class="button" id="deleteButton">Delete</button>
<button class="button" id="modifyButton">Modify</button>
<button class="button" id="saveButton">Save</button>
</div>
</div>
</div>
<div id="add-modal" class="modal">
<div class="modal-content">
<span class="close" onClick="closeModal(Modals.Create)">×</span>
<h2 id="modal-title">Title: <input id="title-review" type="text"></h2>
<p id="modal-content">Content:<br><textarea id="content-review" rows="20"></textarea></p>
<button id="create-review" class="button">Save</button>
</div>
</div>
</body>
</html>