|
17 | 17 | margin: 0; |
18 | 18 | } |
19 | 19 |
|
20 | | -.app { |
21 | | - height: 100vh; |
| 20 | +@keyframes spin { |
| 21 | + from { |
| 22 | + transform: rotate(0deg); |
| 23 | + } to { |
| 24 | + transform: rotate(360deg); |
| 25 | + } |
22 | 26 | } |
23 | 27 |
|
24 | | -.icon-github { |
25 | | - position: fixed; |
26 | | - padding: 1.5rem 2.5rem; |
27 | | - top: 0; |
28 | | - right: 0; |
29 | | - color: $blue-purple; |
30 | | - transition: all 0.25s ease-out; |
31 | | - font-size: 2rem; |
32 | | - text-decoration: none; |
33 | | - z-index: 20; |
34 | | - &:hover { |
35 | | - text-shadow: 0 0 5px $blue-purple; |
36 | | - } |
| 28 | +.app { |
| 29 | + height: 100vh; |
37 | 30 | } |
38 | 31 |
|
39 | 32 | $headerHeight: 6rem; |
@@ -84,6 +77,88 @@ $headerHeight: 6rem; |
84 | 77 | } |
85 | 78 | } |
86 | 79 | } |
| 80 | + |
| 81 | + & > .menu { |
| 82 | + position: absolute; |
| 83 | + right: 0; |
| 84 | + display: flex; |
| 85 | + align-items: center; |
| 86 | + .themeToggle { |
| 87 | + $sunYellow: #ffc83d; |
| 88 | + height: 2.3rem; |
| 89 | + width: 3rem; |
| 90 | + position: relative; |
| 91 | + overflow: hidden; |
| 92 | + display: flex; |
| 93 | + justify-content: center; |
| 94 | + cursor: pointer; |
| 95 | + &:after { |
| 96 | + content: ""; |
| 97 | + position: absolute; |
| 98 | + left: 0; |
| 99 | + bottom: 0; |
| 100 | + right: 0; |
| 101 | + border-radius: 2rem; |
| 102 | + height: 2px; |
| 103 | + } |
| 104 | + &.light { |
| 105 | + &:after { |
| 106 | + background: transparentize($sunYellow, 0.8); |
| 107 | + box-shadow: 0 0 3px transparentize($sunYellow, 0.8); |
| 108 | + } |
| 109 | + .icon-Daytimemode { |
| 110 | + top: 0; |
| 111 | + transition: top 0.15s linear 0.15s; |
| 112 | + } |
| 113 | + .icon-nightmode { |
| 114 | + top: 3rem; |
| 115 | + transition: top 0.15s linear 0s; |
| 116 | + } |
| 117 | + } |
| 118 | + &.dark { |
| 119 | + &:after { |
| 120 | + background: transparentize($blue-purple, 0.8); |
| 121 | + box-shadow: 0 0 3px transparentize($blue-purple, 0.8); |
| 122 | + } |
| 123 | + .icon-Daytimemode { |
| 124 | + top: 3rem; |
| 125 | + transition: top 0.15s linear 0s; |
| 126 | + } |
| 127 | + .icon-nightmode { |
| 128 | + top: 0; |
| 129 | + transition: top 0.15s linear 0.15s; |
| 130 | + } |
| 131 | + } |
| 132 | + .iconfont { |
| 133 | + font-size: 1.8rem; |
| 134 | + display: inline-block; |
| 135 | + position: absolute; |
| 136 | + top: 3rem; |
| 137 | + &.icon-Daytimemode { |
| 138 | + animation: spin 20s linear infinite; |
| 139 | + color: $sunYellow; |
| 140 | + text-shadow: 0 0 5px transparentize($sunYellow, 0.5); |
| 141 | + } |
| 142 | + &.icon-nightmode { |
| 143 | + color: $blue-purple; |
| 144 | + text-shadow: 0 0 5px transparentize($blue-purple, 0.1); |
| 145 | + } |
| 146 | + } |
| 147 | + } |
| 148 | + |
| 149 | + .icon-github { |
| 150 | + margin-left: 0.5rem; |
| 151 | + padding: 1.5rem 2.5rem 1.5rem 1.5rem; |
| 152 | + color: $blue-purple; |
| 153 | + transition: all 0.25s ease-out; |
| 154 | + font-size: 2rem; |
| 155 | + text-decoration: none; |
| 156 | + z-index: 20; |
| 157 | + &:hover { |
| 158 | + text-shadow: 0 0 5px $blue-purple; |
| 159 | + } |
| 160 | + } |
| 161 | + } |
87 | 162 | } |
88 | 163 |
|
89 | 164 | .appContent { |
@@ -156,7 +231,7 @@ $headerHeight: 6rem; |
156 | 231 |
|
157 | 232 | .info { |
158 | 233 | margin-left: 10rem; |
159 | | - padding-bottom: 10vh; |
| 234 | + padding: 1rem 0; |
160 | 235 | overflow-y: auto; |
161 | 236 | box-sizing: border-box; |
162 | 237 | max-height: 100%; |
@@ -367,40 +442,28 @@ $headerHeight: 6rem; |
367 | 442 | } |
368 | 443 |
|
369 | 444 | // define Dark Mode css |
370 | | -@mixin dark { |
371 | | - .appDark{ |
372 | | - .header, |
373 | | - .appContent { |
374 | | - background: #000; |
375 | | - color: #ffffffc2; |
| 445 | +.app.dark { |
| 446 | + .header, |
| 447 | + .appContent { |
| 448 | + background: #000; |
| 449 | + color: #ffffffc2; |
376 | 450 |
|
377 | | - } |
378 | | - .singleSection { |
379 | | - .info { |
380 | | - .opts { |
381 | | - .opt { |
382 | | - border: 1px solid #b9bcc06b; |
383 | | - color: #ffffffc2; |
384 | | - } |
385 | | - .active{ |
386 | | - color: $blue-purple; |
387 | | - border-color: $blue-purple; |
388 | | - } |
| 451 | + } |
| 452 | + .singleSection { |
| 453 | + .info { |
| 454 | + .opts { |
| 455 | + .opt { |
| 456 | + border: 1px solid #b9bcc06b; |
| 457 | + color: #ffffffc2; |
| 458 | + } |
| 459 | + .active{ |
| 460 | + color: $blue-purple; |
| 461 | + border-color: $blue-purple; |
389 | 462 | } |
390 | 463 | } |
391 | 464 | } |
392 | | - .application { |
393 | | - background-color: #fff; |
394 | | - } |
395 | 465 | } |
396 | | -} |
397 | | - |
398 | | -// use Dark Mode css |
399 | | -@include dark; |
400 | | - |
401 | | -// follow system |
402 | | -@media (prefers-color-scheme: dark) { |
403 | | - .appSystemDark{ |
404 | | - @include dark; |
| 466 | + .application { |
| 467 | + background-color: #fff; |
405 | 468 | } |
406 | 469 | } |
0 commit comments