-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
307 lines (246 loc) · 4.63 KB
/
styles.css
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
/* Setjum inn „reset“ sem fjarlægir margin og padding af öllu */
* {
margin: 0;
padding: 0;
}
/* Reiknum stærð á öllum boxum sem border-box */
html {
box-sizing: border-box;
}
/* og látum erfast á allt */
*,
*:before,
*:after {
box-sizing: inherit;
}
/* hjálpar class sem felur sjónrænt en skjálesarar lesa */
.sr-only:not(:focus):not(:active) {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
/* Almennt */
/** Letur og stærðir **/
/*** Grunnstærð er 16px ***/
html {
font-size: 16px;
}
/*** Leturgerðir sem við sækjum úr fonts/ möppu ***/
@font-face {
font-family: 'Matemasie-Regular';
font-style: normal;
font-weight: 400;
src: url('./fonts/Matemasie-Regular.ttf') format('woff2');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: url('./fonts/OpenSans-VariableFont_wdth\,wght.ttf') format('woff2');
}
@font-face {
font-family: 'Open Sans';
font-weight: 700;
src: url('./fonts/OpenSans-VariableFont_wdth\,wght.ttf') format('woff2');
}
/*** Allt meginmál notar open sans ***/
html,
input,
select,
button {
font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}
/*** Allar fyrirsagnir nota Matemasie regular ***/
h1,
h2,
h3,
legend {
font-family: 'Matemasie-Regular', 'Comic Sans MS', cursive;
}
/** Lætur myndir aldrei taka meira pláss en foreldri skilgreinir **/
img {
max-width: 100%;
}
/** Litur á hlekkjum erfist frá foreldri **/
a {
color: inherit;
}
/** „Til baka á forsíðu“ hlekkur **/
.back {
margin-top: 1em;
}
/**
* Eftirfarandi setur upp grunn umbrot (layout) síðu með flexbox.
* Við förum yfir flexbox í viku 4 en þangað til er hægt að nota þetta
* sem grunn og án breytinga.
* Athugið að til þess að þetta virki þar að setja <div class="wrapper"> utan um allt efni
* innan <body>.
*/
.wrapper {
display: flex;
flex-direction: column;
width: 100%;
min-height: 100vh;
background-color: #f3dd99;
}
.wrapper main {
flex: 1;
}
/* Það sem fylgir er tillaga að uppbyggingu á selectorum fyrir verkefnið */
/** Haus á síðum **/
header {
padding: 1em 1.5em;
background-color: #cc99bb;
text-align: center;
}
/** Valmynd **/
nav {
margin-bottom: 1rem;
padding: 1rem;
border-bottom: 4px solid #cc99bb;
background-color: #eebbdd;
}
nav ul {
list-style: none;
text-align: center;
}
nav ul li {
display: inline-block;
margin-right: 1rem;
}
/** Meginmál og efni forsíðu **/
main {
margin: 0 auto 2em auto;
padding-left: 1rem;
padding-right: 1rem;
width: 100%;
max-width: 900px;
}
main p,
main section {
margin-bottom: 1rem;
}
main img {
float: right;
margin-left: 1rem;
margin-bottom: 1rem;
max-width: 300px;
border-radius: 10px;
}
/** Fótur **/
footer {
padding: 1rem;
border-top: 4px solid #cc99bb;
background-color: #eebbdd;
text-align: center;
}
footer > section {
display: inline-block;
vertical-align: top;
max-width: 250px;
margin-right: 2em;
}
footer ul {
list-style: none;
}
footer h2 {
margin-bottom: 1rem;
}
/*** Opnunartími ***/
dt {
font-weight: bold;
}
dd {
margin-bottom: 1rem;
}
/** Spilasíða, töflustílar **/
table {
margin-bottom: 1rem;
border-spacing: 0;
}
table th,
table td {
padding: 0.5rem;
text-align: left;
}
table tr th:first-child,
table tr td:first-child {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
table tr th:last-child,
table tr td:last-child {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
table tbody tr:nth-child(2n + 1) {
background-color: #eebbdd;
}
table img {
width: 100%;
min-width: 200px;
}
table td:last-child {
white-space: nowrap;
}
/** Viðburðir **/
.event {
clear: left;
width: 100%;
margin-bottom: 2rem;
}
.event .title {
margin-bottom: 1rem;
}
.event .content {
width: 100%;
}
.event img {
float: left;
margin-right: 1rem;
margin-bottom: 1rem;
}
.event .register {
clear: both;
}
/** Skráningarform **/
fieldset {
margin-bottom: 1rem;
border: 0;
}
fieldset legend {
margin-bottom: 1rem;
font-size: 1.5rem;
}
fieldset div {
width: 100%;
max-width: 400px;
margin-bottom: 1rem;
}
fieldset div label {
display: block;
}
fieldset input,
fieldset select,
fieldset textarea {
padding: 0.5rem;
width: 100%;
border: 1px solid #000000;
background-color: #ffffff;
}
fieldset input[type='checkbox'] {
display: inline-block;
margin-right: 0.5rem;
width: auto;
}
form button {
display: inline-block;
padding: 0.5rem 1rem;
border-radius: 5px;
border-width: 1px;
background-color: #eebbdd;
}