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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
/* You can add global styles to this file, and also import other style files */
@import "./reset.css";
:root {
--bg-color: white;
--focus-color: forestgreen;
--card-bg: white;
--success: forestgreen;
--failure: indianred;
}
html,
body {
height: 100%;
margin: 0;
}
body {
font: 21px sans-serif !important;
background-color: var(--bg-color);
}
input:focus,
button:focus {
outline: 0;
}
#content {
/* Used for the login and register pages */
height: 100%;
max-width: 20em;
box-sizing: border-box;
border: 0.5em solid var(--bg-color);
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
#content > *:first-child,
#content > *:last-child {
flex: 1;
}
.rounded-border {
border: 2px solid black;
border-radius: 0.6em;
padding: 0.4em;
}
.round-image {
border-radius: 50%;
object-fit: cover;
}
.title {
font-size: 2em;
font-weight: bold;
}
.error {
color: red;
}
.scroll-standalone {
width: 100%;
max-height: 100%;
overflow-y: auto;
}
/* Hide scrollbar for Chrome, Safari and Opera */
.scroll-standalone::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.scroll-standalone {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
.user-language,
.user-technology {
border-radius: 0.4em;
background-color: lightgrey;
padding: 0.26em;
margin: 0.1em 0.2em;
width: fit-content;
}
/* Inputs, the type found in login and register */
.input-selection {
position: relative;
margin-top: 0.7em;
}
/* Don't show the placeholder when the label is on top
*/
.input-selection .input-field::-webkit-input-placeholder {
opacity: 0;
}
.input-field {
width: 100%;
background-color: var(--bg-color);
border: 0;
border-bottom: 1px solid grey;
box-sizing: border-box;
margin-bottom: 0.5em;
padding: 0.4em;
padding-left: 0;
font-size: inherit;
}
.input-field-label {
width: inherit;
height: inherit;
position: absolute;
left: 0;
margin-top: 0.4em;
color: grey;
}
/* When hovering, typing or having typed something in an input,
* make the label smaller, color it and then move it up
*/
.input-selection:hover > .input-field-label,
.input-selection > input:not(:placeholder-shown) + .input-field-label,
.input-selection > input:focus + .input-field-label {
font-size: 0.7em;
color: var(--focus-color);
transform: translate(0, -1.2em);
}
/* Show the placeholder, when you've hovered or
* focused (typing in) on the input-field
*/
.input-selection:hover > .input-field::-webkit-input-placeholder,
.input-selection > .input-field:focus::-webkit-input-placeholder {
opacity: 1;
}
/* Make the underline thicker and change it's and the cursors's
* color when hovered or focused (typing in) on the input-field
*/
.input-selection:hover > .input-field,
.input-field:focus {
border-color: var(--focus-color) !important;
caret-color: var(--focus-color);
border-width: 2px !important;
margin-top: -1px !important;
}
/* Input errors */
.input-errors {
margin-top: -0.8em;
font-size: 0.7em;
position: absolute;
right: 0;
top: 0;
}
/* Move the errors above the input when
* using the site on a small screen and
* add some space for them above the input
*/
@media screen and (max-width: 350px) {
.input-errors {
margin-top: -1.8em;
}
.input-selection {
margin-top: 1.6em;
}
}
.input-errors > .error {
margin-left: 0.3em;
}
.input-field:focus ~ .input-errors > .error {
opacity: 1 !important;
}
.input-field:placeholder-shown ~ .input-errors > .error {
opacity: 0;
}
/* Submit button */
.submit-btn {
width: 100%;
color: white;
background-color: black;
border: 2px solid black;
border-radius: 0.4em;
box-sizing: border-box;
font-size: 0.8em;
text-align: center;
margin-top: 0.5em;
padding: 0.3em;
}
.submit-btn:hover {
cursor: pointer;
color: var(--focus-color);
background-color: white;
border-color: var(--focus-color) !important;
}
.submit-btn:active {
transition: 0s;
transform: scale(0.9);
}
.delete-btn:hover {
color: indianred;
border-color: indianred !important;
}
/* Form attachments (the ones that are shown while creating and editing a post) */
.form-attachments {
display: flex;
flex-wrap: wrap;
color: gray;
font-size: 0.75em;
margin: 0 0.3em;
}
.form-attachment {
border: 2px solid black;
border-radius: 0.6em;
margin-top: 0.2em;
margin-right: 0.2em;
padding: 0.2em;
display: flex;
align-items: center;
}
.form-attachment:last-child {
margin-right: 0;
}
.remove-form-attachment {
font-size: 0.9em;
color: var(--failure);
background-color: white;
border-radius: 0.2em;
margin: 0 0.2em;
padding: 0.2em;
}
.remove-form-attachment:hover {
color: white;
background-color: var(--failure);
cursor: pointer;
}
|