Browse code

Progress

Benjamin Roth authored on14/12/2022 00:09:31
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,348 +0,0 @@
1
-@if not-imported("import_once_func") { @import "import_once_func"; }
2
-@if not-imported("framework") { @import "framework"; }
3
-
4
-/*
5
- ------ HEADER ------
6
-*/
7
-$header-height-desktop: 50px;
8
-$header-height-mobile: 50px;
9
-#header {
10
-  height: $header-height-desktop;
11
-  position: fixed;
12
-  left: 0;
13
-  right: 0;
14
-  top: 0;
15
-  z-index: 10;
16
-  @include transition(all 0.25s);
17
-
18
-  > .inside {
19
-    @include centered-1200;
20
-    position: relative;
21
-    z-index: 1;
22
-  }
23
-
24
-  + #container {
25
-    padding-top: $header-height-desktop + 20px;
26
-    height: 100vh;
27
-  }
28
-
29
-  body:not(.-mobile-menu-active) .hide& {
30
-    @include transform(translate(0,-100%));
31
-  }
32
-  .scrolled& {
33
-    background-color: $color-bg-secondary;
34
-  }
35
-}
36
-
37
-#main-nav {
38
-  position: absolute;
39
-  right: 0;
40
-  top: 0;
41
-  &,
42
-  .level_1 {
43
-    height: $header-height-desktop;
44
-  }
45
-  .level_1 {
46
-    display: flex;
47
-    align-items: center;
48
-
49
-    > li {
50
-      flex: 1 0 0;
51
-      padding: 0 60px 0 0;
52
-
53
-      &:last-child {
54
-        padding-right: 0;
55
-      }
56
-
57
-      > {
58
-        span,
59
-        strong,
60
-        a {
61
-          font-size: font-size(18px);
62
-          font-weight: 300;
63
-          color: $color-nav;
64
-          line-height: 1.5;
65
-          position: relative;
66
-
67
-          &:before {
68
-            position: absolute;
69
-            left: 50%;
70
-            right: 50%;
71
-            top: 100%;
72
-            content: '';
73
-            height: 2px;
74
-            background-color: $color-bg-secondary;
75
-            opacity: 0;
76
-            visibility: hidden;
77
-            @include transition(all 0.25s cubic-bezier(0,0,0,1));
78
-          }
79
-
80
-          &.trail,
81
-          &.active {
82
-            &:before {
83
-              left: 0;
84
-              right: 0;
85
-              opacity: 1;
86
-              visibility: visible;
87
-            }
88
-          }
89
-
90
-          .scrolled & {
91
-            color: $color-nav-invert;
92
-
93
-            &:before {
94
-              background-color: $color-bg-tertiary;
95
-            }
96
-          }
97
-        }
98
-        a {
99
-          &:hover {
100
-            &:before {
101
-              left: 0;
102
-              right: 0;
103
-              opacity: 1;
104
-              visibility: visible;
105
-            }
106
-          }
107
-        }
108
-      }
109
-    }
110
-  }
111
-}
112
-
113
-#nav-bar {
114
-
115
-  .bar-logo {
116
-    opacity: 0;
117
-    visibility: hidden;
118
-    position: absolute;
119
-    left: 0;
120
-    top: 5px;
121
-    @include transition(all 0.25s);
122
-    z-index: 1;
123
-
124
-    .scrolled &,
125
-    .-mobile-menu-active & {
126
-      opacity: 1;
127
-      visibility: visible;
128
-    }
129
-    .-mobile-menu-active & {
130
-      top: 45px;
131
-      left: 50%;
132
-      @include transform(translate(-50%,-50%));
133
-    }
134
-  }
135
-
136
-  .close {
137
-    display: none;
138
-  }
139
-
140
-  @include for-tablet {
141
-    .nav {
142
-      position: fixed;
143
-      top: 0;
144
-      left: 0;
145
-      width: 100%;
146
-      height: 100%;
147
-      background: rgba(#000, 30%);
148
-      opacity: 0;
149
-      visibility: hidden;
150
-      @include transition(all 0.5s cubic-bezier(0.25, 1, 0.5, 1));
151
-
152
-      .panel {
153
-        position: absolute;
154
-        top: 50%;
155
-        left: 50%;
156
-        background: rgba($color-bg-secondary, 95%);
157
-        padding: 50px;
158
-        @include box-sizing(border-box);
159
-        @include transform(translate(-50%, -50%));
160
-        max-width: 1200px;
161
-        width: 80%;
162
-        max-height: 90%;
163
-        overflow-y: auto;
164
-        font-size: font-size(20px);
165
-
166
-        @include for-mobile {
167
-          width: 100%;
168
-          height: 100%;
169
-          max-height: none;
170
-          padding: 90px 55px 30px 55px;
171
-          font-size: font-size(18px);
172
-        }
173
-
174
-        .close {
175
-          cursor: pointer;
176
-          position: absolute;
177
-          right: 20px;
178
-          top: 5px;
179
-          line-height: 1;
180
-          width: 40px;
181
-          height: 40px;
182
-          @include box-sizing(border-box);
183
-          z-index: -1;
184
-          text-align: center;
185
-          display: flex;
186
-          align-items: center;
187
-          justify-content: center;
188
-          font-size: 40px;
189
-          background: url('data:image/svg+xml;utf8,%3Csvg width="100%" height="100%" viewBox="0 0 30 30" version="1.1" stroke="%23ffffff" stroke-width="2px" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-rule:evenodd;clip-rule:evenodd;"%3E%3Cpath d="M25,5L5,25"/%3E%3Cpath d="M25,25L5,5"/%3E%3C/svg%3E') no-repeat;
190
-
191
-          span {
192
-            visibility: hidden;
193
-          }
194
-        }
195
-      }
196
-    }
197
-  }
198
-}
199
-
200
-#hamburger {
201
-  z-index: 1;
202
-  display: none;
203
-  position: absolute;
204
-  top: 0;
205
-  right: 0;
206
-  -webkit-transform: translate3d(0, 0, 0);
207
-  -moz-transform: translate3d(0, 0, 0);
208
-  -ms-transform: translate3d(0, 0, 0);
209
-  -o-transform: translate3d(0, 0, 0);
210
-  transform: translate3d(0, 0, 0);
211
-  cursor: pointer;
212
-
213
-  @include for-mobile {
214
-    z-index: 0;
215
-  }
216
-
217
-  //display: block;
218
-  width: 50px;
219
-  height: 50px;
220
-  //position: relative;
221
-
222
-
223
-  .line {
224
-    position: absolute;
225
-    left: 5px;
226
-    height: 2px;
227
-    width: 40px;
228
-    background: $color-text-invert;
229
-    display: block;
230
-    transition: 0.5s;
231
-    transform-origin: center;
232
-    //@include box-shadow(1px 1px 2px rgba(0,0,0,0.7));
233
-
234
-    &:nth-child(1) { top: 14px; }
235
-    &:nth-child(2) { top: 24px; }
236
-    &:nth-child(3) { top: 34px; }
237
-  }
238
-  .-mobile-menu-active & {
239
-    .line {
240
-      //@include box-shadow(1px 1px 2px rgba(0,0,0,0));
241
-      &:nth-child(1){
242
-        transform: translateY(10px) rotate(-45deg);
243
-      }
244
-      &:nth-child(2){
245
-        opacity:0;
246
-      }
247
-      &:nth-child(3){
248
-        transform: translateY(-10px) rotate(45deg);
249
-      }
250
-    }
251
-    ~ .nav {
252
-      //display: block;
253
-      opacity: 1;
254
-      visibility: visible;
255
-    }
256
-  }
257
-}
258
-.-mobile-menu-active {
259
-  #header {
260
-    position: fixed !important;
261
-    left: 0;
262
-    right: 0;
263
-    top: 0;
264
-  }
265
-  /*#main-nav {
266
-    display: block;
267
-  }*/
268
-}
269
-
270
-@include for-tablet {
271
-  #main-nav {
272
-    position: relative;
273
-    height: auto;
274
-    > .level_1 {
275
-      display: block;
276
-      padding: 0 15px;
277
-      overflow-y: auto;
278
-      /*position: absolute;
279
-      top: 150px;
280
-      bottom: 0;
281
-      left: 0;
282
-      right: 0;*/
283
-      height: auto;
284
-
285
-
286
-      > li {
287
-        flex: none;
288
-        padding: 0;
289
-        text-align: center;
290
-
291
-        > a,
292
-        > span,
293
-        > strong {
294
-          color: $color-text-invert;
295
-          line-height: 2.25;
296
-          font-size: font-size(25px);
297
-
298
-          &.active,
299
-          &.trail {
300
-            &:before {
301
-              visibility: visible;
302
-              opacity: 1;
303
-              right: 35%;
304
-              left: 35%;
305
-            }
306
-          }
307
-        }
308
-
309
-        &.submenu {
310
-          ul {
311
-            position: relative;
312
-            display: block;
313
-            overflow: hidden;
314
-            height: 0;
315
-            padding: 0;
316
-          }
317
-
318
-          .-mobile-menu-active & {
319
-            &.trail,
320
-            &:hover {
321
-              ul {
322
-                visibility: visible;
323
-                opacity: 1;
324
-                padding: 15px;
325
-                height: auto;
326
-              }
327
-            }
328
-
329
-            &:hover,
330
-            &:focus-within {
331
-              ul {
332
-                visibility: visible;
333
-                opacity: 1;
334
-                padding: 15px;
335
-                height: auto;
336
-              }
337
-            }
338
-          }
339
-        }
340
-      }
341
-    }
342
-  }
343
-
344
-  #hamburger {
345
-    display: block;
346
-  }
347
-}
348
-
Browse code

Initial commit

Benjamin Roth authored on07/11/2022 09:19:06
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,348 @@
1
+@if not-imported("import_once_func") { @import "import_once_func"; }
2
+@if not-imported("framework") { @import "framework"; }
3
+
4
+/*
5
+ ------ HEADER ------
6
+*/
7
+$header-height-desktop: 50px;
8
+$header-height-mobile: 50px;
9
+#header {
10
+  height: $header-height-desktop;
11
+  position: fixed;
12
+  left: 0;
13
+  right: 0;
14
+  top: 0;
15
+  z-index: 10;
16
+  @include transition(all 0.25s);
17
+
18
+  > .inside {
19
+    @include centered-1200;
20
+    position: relative;
21
+    z-index: 1;
22
+  }
23
+
24
+  + #container {
25
+    padding-top: $header-height-desktop + 20px;
26
+    height: 100vh;
27
+  }
28
+
29
+  body:not(.-mobile-menu-active) .hide& {
30
+    @include transform(translate(0,-100%));
31
+  }
32
+  .scrolled& {
33
+    background-color: $color-bg-secondary;
34
+  }
35
+}
36
+
37
+#main-nav {
38
+  position: absolute;
39
+  right: 0;
40
+  top: 0;
41
+  &,
42
+  .level_1 {
43
+    height: $header-height-desktop;
44
+  }
45
+  .level_1 {
46
+    display: flex;
47
+    align-items: center;
48
+
49
+    > li {
50
+      flex: 1 0 0;
51
+      padding: 0 60px 0 0;
52
+
53
+      &:last-child {
54
+        padding-right: 0;
55
+      }
56
+
57
+      > {
58
+        span,
59
+        strong,
60
+        a {
61
+          font-size: font-size(18px);
62
+          font-weight: 300;
63
+          color: $color-nav;
64
+          line-height: 1.5;
65
+          position: relative;
66
+
67
+          &:before {
68
+            position: absolute;
69
+            left: 50%;
70
+            right: 50%;
71
+            top: 100%;
72
+            content: '';
73
+            height: 2px;
74
+            background-color: $color-bg-secondary;
75
+            opacity: 0;
76
+            visibility: hidden;
77
+            @include transition(all 0.25s cubic-bezier(0,0,0,1));
78
+          }
79
+
80
+          &.trail,
81
+          &.active {
82
+            &:before {
83
+              left: 0;
84
+              right: 0;
85
+              opacity: 1;
86
+              visibility: visible;
87
+            }
88
+          }
89
+
90
+          .scrolled & {
91
+            color: $color-nav-invert;
92
+
93
+            &:before {
94
+              background-color: $color-bg-tertiary;
95
+            }
96
+          }
97
+        }
98
+        a {
99
+          &:hover {
100
+            &:before {
101
+              left: 0;
102
+              right: 0;
103
+              opacity: 1;
104
+              visibility: visible;
105
+            }
106
+          }
107
+        }
108
+      }
109
+    }
110
+  }
111
+}
112
+
113
+#nav-bar {
114
+
115
+  .bar-logo {
116
+    opacity: 0;
117
+    visibility: hidden;
118
+    position: absolute;
119
+    left: 0;
120
+    top: 5px;
121
+    @include transition(all 0.25s);
122
+    z-index: 1;
123
+
124
+    .scrolled &,
125
+    .-mobile-menu-active & {
126
+      opacity: 1;
127
+      visibility: visible;
128
+    }
129
+    .-mobile-menu-active & {
130
+      top: 45px;
131
+      left: 50%;
132
+      @include transform(translate(-50%,-50%));
133
+    }
134
+  }
135
+
136
+  .close {
137
+    display: none;
138
+  }
139
+
140
+  @include for-tablet {
141
+    .nav {
142
+      position: fixed;
143
+      top: 0;
144
+      left: 0;
145
+      width: 100%;
146
+      height: 100%;
147
+      background: rgba(#000, 30%);
148
+      opacity: 0;
149
+      visibility: hidden;
150
+      @include transition(all 0.5s cubic-bezier(0.25, 1, 0.5, 1));
151
+
152
+      .panel {
153
+        position: absolute;
154
+        top: 50%;
155
+        left: 50%;
156
+        background: rgba($color-bg-secondary, 95%);
157
+        padding: 50px;
158
+        @include box-sizing(border-box);
159
+        @include transform(translate(-50%, -50%));
160
+        max-width: 1200px;
161
+        width: 80%;
162
+        max-height: 90%;
163
+        overflow-y: auto;
164
+        font-size: font-size(20px);
165
+
166
+        @include for-mobile {
167
+          width: 100%;
168
+          height: 100%;
169
+          max-height: none;
170
+          padding: 90px 55px 30px 55px;
171
+          font-size: font-size(18px);
172
+        }
173
+
174
+        .close {
175
+          cursor: pointer;
176
+          position: absolute;
177
+          right: 20px;
178
+          top: 5px;
179
+          line-height: 1;
180
+          width: 40px;
181
+          height: 40px;
182
+          @include box-sizing(border-box);
183
+          z-index: -1;
184
+          text-align: center;
185
+          display: flex;
186
+          align-items: center;
187
+          justify-content: center;
188
+          font-size: 40px;
189
+          background: url('data:image/svg+xml;utf8,%3Csvg width="100%" height="100%" viewBox="0 0 30 30" version="1.1" stroke="%23ffffff" stroke-width="2px" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-rule:evenodd;clip-rule:evenodd;"%3E%3Cpath d="M25,5L5,25"/%3E%3Cpath d="M25,25L5,5"/%3E%3C/svg%3E') no-repeat;
190
+
191
+          span {
192
+            visibility: hidden;
193
+          }
194
+        }
195
+      }
196
+    }
197
+  }
198
+}
199
+
200
+#hamburger {
201
+  z-index: 1;
202
+  display: none;
203
+  position: absolute;
204
+  top: 0;
205
+  right: 0;
206
+  -webkit-transform: translate3d(0, 0, 0);
207
+  -moz-transform: translate3d(0, 0, 0);
208
+  -ms-transform: translate3d(0, 0, 0);
209
+  -o-transform: translate3d(0, 0, 0);
210
+  transform: translate3d(0, 0, 0);
211
+  cursor: pointer;
212
+
213
+  @include for-mobile {
214
+    z-index: 0;
215
+  }
216
+
217
+  //display: block;
218
+  width: 50px;
219
+  height: 50px;
220
+  //position: relative;
221
+
222
+
223
+  .line {
224
+    position: absolute;
225
+    left: 5px;
226
+    height: 2px;
227
+    width: 40px;
228
+    background: $color-text-invert;
229
+    display: block;
230
+    transition: 0.5s;
231
+    transform-origin: center;
232
+    //@include box-shadow(1px 1px 2px rgba(0,0,0,0.7));
233
+
234
+    &:nth-child(1) { top: 14px; }
235
+    &:nth-child(2) { top: 24px; }
236
+    &:nth-child(3) { top: 34px; }
237
+  }
238
+  .-mobile-menu-active & {
239
+    .line {
240
+      //@include box-shadow(1px 1px 2px rgba(0,0,0,0));
241
+      &:nth-child(1){
242
+        transform: translateY(10px) rotate(-45deg);
243
+      }
244
+      &:nth-child(2){
245
+        opacity:0;
246
+      }
247
+      &:nth-child(3){
248
+        transform: translateY(-10px) rotate(45deg);
249
+      }
250
+    }
251
+    ~ .nav {
252
+      //display: block;
253
+      opacity: 1;
254
+      visibility: visible;
255
+    }
256
+  }
257
+}
258
+.-mobile-menu-active {
259
+  #header {
260
+    position: fixed !important;
261
+    left: 0;
262
+    right: 0;
263
+    top: 0;
264
+  }
265
+  /*#main-nav {
266
+    display: block;
267
+  }*/
268
+}
269
+
270
+@include for-tablet {
271
+  #main-nav {
272
+    position: relative;
273
+    height: auto;
274
+    > .level_1 {
275
+      display: block;
276
+      padding: 0 15px;
277
+      overflow-y: auto;
278
+      /*position: absolute;
279
+      top: 150px;
280
+      bottom: 0;
281
+      left: 0;
282
+      right: 0;*/
283
+      height: auto;
284
+
285
+
286
+      > li {
287
+        flex: none;
288
+        padding: 0;
289
+        text-align: center;
290
+
291
+        > a,
292
+        > span,
293
+        > strong {
294
+          color: $color-text-invert;
295
+          line-height: 2.25;
296
+          font-size: font-size(25px);
297
+
298
+          &.active,
299
+          &.trail {
300
+            &:before {
301
+              visibility: visible;
302
+              opacity: 1;
303
+              right: 35%;
304
+              left: 35%;
305
+            }
306
+          }
307
+        }
308
+
309
+        &.submenu {
310
+          ul {
311
+            position: relative;
312
+            display: block;
313
+            overflow: hidden;
314
+            height: 0;
315
+            padding: 0;
316
+          }
317
+
318
+          .-mobile-menu-active & {
319
+            &.trail,
320
+            &:hover {
321
+              ul {
322
+                visibility: visible;
323
+                opacity: 1;
324
+                padding: 15px;
325
+                height: auto;
326
+              }
327
+            }
328
+
329
+            &:hover,
330
+            &:focus-within {
331
+              ul {
332
+                visibility: visible;
333
+                opacity: 1;
334
+                padding: 15px;
335
+                height: auto;
336
+              }
337
+            }
338
+          }
339
+        }
340
+      }
341
+    }
342
+  }
343
+
344
+  #hamburger {
345
+    display: block;
346
+  }
347
+}
348
+