|
1 | 1 | #how-to-page { |
| 2 | + --togglers-padding: 0px; |
| 3 | + |
2 | 4 | // column choice selector |
3 | 5 | .how-to-choice { |
4 | 6 | @extend .py-3; |
5 | 7 |
|
6 | 8 | background-color: var(--bs-body-bg); |
7 | 9 | h2 { |
8 | 10 | .label-container { |
9 | | - text-align: center; |
| 11 | + display: flex; |
| 12 | + align-items: center; |
| 13 | + justify-content: center; |
10 | 14 | flex-grow: 1; |
11 | 15 | width: 1px; |
12 | 16 | @include media-breakpoint-down(md) { |
|
15 | 19 | } |
16 | 20 | } |
17 | 21 | } |
| 22 | + a { |
| 23 | + text-decoration: none; |
| 24 | + color: inherit; |
| 25 | + } |
| 26 | + .togglers { |
| 27 | + --togglers-base-size: 48px; |
| 28 | + height: var(--togglers-base-size); |
| 29 | + width: calc(var(--togglers-base-size) * 3); |
| 30 | + border-radius: calc(var(--togglers-base-size) / 2); |
| 31 | + position: relative; |
| 32 | + display: flex; |
| 33 | + align-items: center; |
| 34 | + justify-content: space-between; |
| 35 | + |
| 36 | + background-color: #0001; |
| 37 | + |
| 38 | + .toggler { |
| 39 | + //position |
| 40 | + position: absolute; |
| 41 | + transition: all 0.5s; |
| 42 | + // default position: middle show both |
| 43 | + @include media-breakpoint-up(lg) { |
| 44 | + left: calc(50% - (33% - var(--togglers-padding)) / 2); |
| 45 | + } |
| 46 | + @include media-breakpoint-down(lg) { |
| 47 | + left: var(--togglers-padding); |
| 48 | + } |
| 49 | + // color |
| 50 | + background-color: $primary; |
| 51 | + opacity: 30%; |
| 52 | + z-index: 0; |
| 53 | + //size |
| 54 | + width: calc(33% - var(--togglers-padding)); |
| 55 | + height: calc(100% - var(--togglers-padding)); |
| 56 | + border-radius: 50%; |
| 57 | + } |
| 58 | + |
| 59 | + a { |
| 60 | + &.toggle { |
| 61 | + z-index: 1; |
| 62 | + height: 100%; |
| 63 | + width: 33%; |
| 64 | + position: relative; |
| 65 | + &.both { |
| 66 | + // center icon |
| 67 | + display: flex; |
| 68 | + align-items: center; |
| 69 | + justify-content: center; |
| 70 | + |
| 71 | + > * { |
| 72 | + //icon size |
| 73 | + width: 80%; |
| 74 | + height: 80%; |
| 75 | + margin: 0; |
| 76 | + } |
| 77 | + } |
| 78 | + } |
| 79 | + } |
| 80 | + } |
18 | 81 | } |
19 | 82 | } |
20 | 83 |
|
|
29 | 92 | } |
30 | 93 |
|
31 | 94 | // only gephi |
32 | | - &:has(input#onlyGephi:checked) { |
| 95 | + &:has(#gephi:target) { |
| 96 | + .toggler { |
| 97 | + left: var(--togglers-padding); |
| 98 | + } |
33 | 99 | .how-to { |
34 | 100 | grid-template-columns: [gephi] var(--solo-column-width); |
35 | 101 | justify-content: center; |
36 | 102 |
|
37 | | - #gephi-lite { |
| 103 | + #gephi-lite-column { |
38 | 104 | section { |
39 | 105 | display: none; |
40 | 106 | } |
41 | 107 | } |
42 | 108 | } |
43 | | - label#gephi-lite { |
44 | | - @extend .text-muted; |
45 | | - } |
46 | 109 | } |
47 | 110 | // only gephi lite |
48 | | - &:has(input#onlyGephiLite:checked) { |
| 111 | + &:has(#gephi-lite:target) { |
| 112 | + .toggler { |
| 113 | + left: calc(100% - 33% - var(--togglers-padding) - var(--togglers-padding)); |
| 114 | + } |
49 | 115 | .how-to { |
50 | 116 | grid-template-columns: [gephi-lite] var(--solo-column-width); |
51 | 117 |
|
52 | 118 | justify-content: center; |
53 | 119 |
|
54 | | - #gephi { |
| 120 | + #gephi-column { |
55 | 121 | section { |
56 | 122 | display: none; |
57 | 123 | } |
58 | 124 | } |
59 | 125 | } |
60 | | - label#gephi-lite { |
61 | | - @extend .text-muted; |
62 | | - } |
63 | 126 | } |
64 | 127 | // both |
65 | | - &:has(input#both:checked) { |
| 128 | + &:not(:has(#gephi:target)):not(:has(#gephi-lite:target)) { |
66 | 129 | .how-to { |
67 | 130 | // both is not allowed on small screens |
68 | 131 | @include media-breakpoint-down(lg) { |
69 | 132 | grid-template-columns: [gephi] var(--solo-column-width); |
70 | | - #gephi-lite { |
| 133 | + #gephi-lite-column { |
71 | 134 | section { |
72 | 135 | display: none; |
73 | 136 | } |
|
76 | 139 | @include media-breakpoint-up(lg) { |
77 | 140 | grid-template-columns: [gephi] 1fr [gephi-lite] 1fr; |
78 | 141 |
|
79 | | - #gephi { |
| 142 | + #gephi-column { |
80 | 143 | section.common-title { |
81 | 144 | grid-column: 1 / 3; |
82 | 145 | } |
83 | 146 | } |
84 | | - #gephi-lite { |
| 147 | + #gephi-lite-column { |
85 | 148 | section.common-title { |
86 | 149 | display: none; |
87 | 150 | } |
|
163 | 226 | $nb-sections: 50; |
164 | 227 | // place sections in the right rows |
165 | 228 | @for $i from 1 through $nb-sections { |
166 | | - #gephi > section:nth-child(#{$i}) { |
| 229 | + #gephi-column > section:nth-child(#{$i}) { |
167 | 230 | grid-column: gephi; |
168 | 231 |
|
169 | 232 | @include media-breakpoint-up(lg) { |
170 | 233 | grid-row: $i; |
171 | 234 | } |
172 | 235 | } |
173 | | - #gephi-lite > section:nth-child(#{$i}) { |
| 236 | + #gephi-lite-column > section:nth-child(#{$i}) { |
174 | 237 | grid-column: gephi-lite; |
175 | 238 |
|
176 | 239 | @include media-breakpoint-up(lg) { |
|
0 commit comments