docs/.vitepress/theme/styles/style.css
532 lines · 15131 bytes
1/**
2 * Copyright (c) 2024 taskylizard
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16:root {
17 /** Layout */
18 --vp-layout-max-width: 1490px;
19 --vp-sidebar-width: 280px;
20 --vp-nav-logo-height: 36px;
21
22 /** Colors */
23 --vp-c-brand-1: #7bc5e4;
24 --vp-c-brand-2: #1473e6;
25 --vp-c-brand-3: #1473e6;
26 --vp-c-brand-soft: rgba(123, 197, 228, 0.08);
27 --vp-c-green-light: #16a891;
28 --vp-c-brand-nav-active: color-mix(
29 in srgb,
30 var(--vp-c-brand-1) 15%,
31 transparent 100%
32 );
33
34 /** Button brand style */
35 --vp-button-brand-text: var(--vp-c-bg);
36 --vp-button-brand-bg: var(--vp-c-brand-2);
37 --vp-button-brand-hover-text: var(--vp-c-bg);
38 --vp-button-brand-hover-bg: var(--vp-c-brand-1);
39 --vp-button-brand-active-text: var(--vp-c-bg);
40 --vp-button-brand-active-bg: var(--vp-c-brand-1);
41
42 /** Button alt style */
43 --vp-button-alt-border: var(--vp-c-default-3);
44 --vp-button-alt-text: var(--vp-c-text-1);
45 --vp-button-alt-bg: transparent;
46 --vp-button-alt-hover-border: var(--vp-c-default-1);
47 --vp-button-alt-hover-text: var(--vp-c-text-1);
48 --vp-button-alt-hover-bg: transparent;
49 --vp-button-alt-active-border: var(--vp-c-default-1);
50 --vp-button-alt-active-text: var(--vp-c-text-1);
51 --vp-button-alt-active-bg: transparent;
52 --vp-c-bg-nav: rgba(255, 255, 255, 0.7);
53 --vp-c-bg-mark: rgb(232, 232, 232);
54
55 /* Colors: Custom Block */
56 /** Info */
57 --vp-custom-block-info-bg: theme('colors.swarm.100');
58 --vp-custom-block-info-border: theme('colors.swarm.800');
59 --vp-custom-block-info-text: theme('colors.swarm.800');
60 --vp-custom-block-info-text-deep: theme('colors.swarm.900');
61 /** Tip */
62 --vp-custom-block-tip-bg: theme('colors.meadow.100');
63 --vp-custom-block-tip-border: theme('colors.meadow.800');
64 --vp-custom-block-tip-text: theme('colors.meadow.800');
65 --vp-custom-block-tip-text-deep: theme('colors.meadow.900');
66 /** Warning */
67 --vp-custom-block-warning-bg: theme('colors.merlin.100');
68 --vp-custom-block-warning-border: theme('colors.merlin.800');
69 --vp-custom-block-warning-text: theme('colors.merlin.800');
70 --vp-custom-block-warning-text-deep: theme('colors.merlin.900');
71 /** Danger */
72 --vp-custom-block-danger-bg: theme('colors.carnation.100');
73 --vp-custom-block-danger-border: theme('colors.carnation.800');
74 --vp-custom-block-danger-text: theme('colors.carnation.800');
75 --vp-custom-block-danger-text-deep: theme('colors.carnation.900');
76 /** Details */
77 --vp-custom-block-details-bg: var(--vp-custom-block-info-bg);
78 --vp-custom-block-details-border: var(--vp-custom-block-info-border);
79 --vp-custom-block-details-text: var(--vp-custom-block-info-text);
80 --vp-custom-block-details-text-deep: var(--vp-custom-block-info-text-deep);
81}
82
83.dark {
84 --vp-c-bg: rgb(26, 26, 26);
85 --vp-c-bg-alt: rgb(23, 23, 23);
86 --vp-c-bg-nav: rgba(23, 23, 23, 0.8);
87 --vp-c-bg-mark: rgb(0, 0, 0);
88
89 /* Colors: Custom Block */
90 /** Info */
91 --vp-custom-block-info-bg: theme('colors.swarm.950');
92 --vp-custom-block-info-border: theme('colors.swarm.800');
93 --vp-custom-block-info-text: theme('colors.swarm.200');
94 --vp-custom-block-info-text-deep: theme('colors.swarm.200');
95 /** Tip */
96 --vp-custom-block-tip-bg: theme('colors.meadow.950');
97 --vp-custom-block-tip-border: theme('colors.meadow.800');
98 --vp-custom-block-tip-text: theme('colors.meadow.200');
99 --vp-custom-block-tip-text-deep: theme('colors.meadow.200');
100 /** Warning */
101 --vp-custom-block-warning-bg: theme('colors.merlin.950');
102 --vp-custom-block-warning-border: theme('colors.merlin.800');
103 --vp-custom-block-warning-text: theme('colors.merlin.200');
104 --vp-custom-block-warning-text-deep: theme('colors.merlin.200');
105 /** Danger */
106 --vp-custom-block-danger-bg: theme('colors.carnation.950');
107 --vp-custom-block-danger-border: theme('colors.carnation.800');
108 --vp-custom-block-danger-text: theme('colors.carnation.200');
109 --vp-custom-block-danger-text-deep: theme('colors.carnation.200');
110 /** Details */
111 --vp-custom-block-details-bg: var(--vp-custom-block-info-bg);
112 --vp-custom-block-details-border: var(--vp-custom-block-info-border);
113 --vp-custom-block-details-text: var(--vp-custom-block-info-text);
114 --vp-custom-block-details-text-deep: var(--vp-custom-block-info-text-deep);
115}
116
117.vp-doc a {
118 color: var(--vp-c-brand-1);
119 text-decoration: underline;
120 text-underline-offset: 4px;
121 text-decoration-style: solid;
122 text-decoration-color: transparent;
123 -webkit-text-decoration-color: transparent;
124 transition: text-decoration-color 0.25s;
125}
126
127.vp-doc a:hover {
128 color: var(--vp-c-brand-1);
129 text-decoration-color: var(--vp-c-brand-1);
130 -webkit-text-decoration-color: var(--vp-c-brand-1);
131}
132
133:root {
134 --vp-home-hero-name-color: transparent;
135 --vp-home-hero-name-background: -webkit-linear-gradient(
136 -30deg,
137 #62cff4,
138 #1473e6
139 );
140 --vp-home-hero-image-background-image: linear-gradient(
141 -30deg,
142 #62cff4,
143 #9acbec
144 );
145 --vp-home-hero-image-filter: blur(40px);
146}
147
148@media (min-width: 640px) {
149 :root {
150 --vp-home-hero-image-filter: blur(56px);
151 }
152}
153
154@media (min-width: 960px) {
155 :root {
156 --vp-home-hero-image-filter: blur(72px);
157 }
158}
159
160.VPNavBarTitle .title {
161 font-size: 18px;
162 font-weight: 600;
163}
164
165/*
166.VPNavBarTitle .title:after {
167 content: "";
168 margin-left: 2px;
169 margin-top: -6px;
170 display: inline-block;
171 width: 32px;
172 height: 32px;
173 image-rendering: pixelated;
174 background-image: url("/asset/oneko.gif");
175 animation: sleep 1s infinite;
176 cursor: pointer;
177}
178
179.VPNavBarTitle .title:hover:after {
180 animation: wakeup 2.5s 1 forwards;
181}
182
183@keyframes sleep {
184 0%,
185 50% {
186 background-position: -64px 0;
187 }
188 50.00001%,
189 100% {
190 background-position: -64px -32px;
191 }
192}
193
194@keyframes wakeup {
195 0%,
196 20% {
197 background-position: -160px 0;
198 }
199 20.00001%,
200 40% {
201 background-position: -192px 0;
202 }
203 40.00001%,
204 60% {
205 background-position: -224px 0;
206 }
207 60.00001%,
208 80% {
209 background-position: -96px -64px;
210 }
211 80.00001%,
212 100% {
213 background-position: -96px -96px;
214 }
215}
216
217*/
218
219.medium-zoom-overlay {
220 background-color: var(--vp-c-bg) !important;
221 z-index: 100;
222}
223
224.medium-zoom-overlay ~ img {
225 z-index: 101;
226}
227
228.medium-zoom--opened .medium-zoom-overlay {
229 opacity: 0.98 !important;
230}
231
232.video_wrapper {
233 position: relative;
234 padding-bottom: 56.25%;
235}
236
237iframe {
238 position: absolute;
239 top: 0;
240 left: 0;
241 width: 100%;
242 height: 100%;
243}
244
245.VPSidebarItem.level-1.is-active > .item > .indicator,
246.VPSidebarItem.level-2.is-active > .item > .indicator,
247.VPSidebarItem.level-3.is-active > .item > .indicator,
248.VPSidebarItem.level-4.is-active > .item > .indicator,
249.VPSidebarItem.level-5.is-active > .item > .indicator {
250 background-color: var(--vp-c-brand-1);
251 transition-duration: 0.1s;
252 transition-property: opacity;
253}
254
255main figure {
256 margin: 2rem 0;
257 transition: transform var(--vp-tt);
258}
259
260main figure img {
261 margin: 0 auto;
262 border-radius: 12px;
263}
264
265main figure figcaption {
266 text-align: center;
267 margin-top: 1.25rem;
268 font-size: 0.875rem;
269 color: var(--vp-c-text-2);
270}
271
272@media (min-width: 1440px) {
273 :root {
274 --vp-layout-max-width: 100% !important;
275 /* 100% of the viewport width */
276 --vp-sidebar-width: 300px !important;
277 /* increase sidebar width from default 272px */
278 }
279
280 /* target a div with class .content-container*/
281 .content-container {
282 max-width: 70% !important;
283 /* 888px is the default max-width */
284 }
285}
286
287.info.custom-block {
288 --icon: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWluZm8iPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIi8+PHBhdGggZD0iTTEyIDE2di00Ii8+PHBhdGggZD0iTTEyIDhoLjAxIi8+PC9zdmc+');
289}
290
291.tip.custom-block {
292 --icon: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWxpZ2h0YnVsYiI+PHBhdGggZD0iTTE1IDE0Yy4yLTEgLjctMS43IDEuNS0yLjUgMS0uOSAxLjUtMi4yIDEuNS0zLjVBNiA2IDAgMCAwIDYgOGMwIDEgLjIgMi4yIDEuNSAzLjUuNy43IDEuMyAxLjUgMS41IDIuNSIvPjxwYXRoIGQ9Ik05IDE4aDYiLz48cGF0aCBkPSJNMTAgMjJoNCIvPjwvc3ZnPg==');
293}
294
295.warning.custom-block {
296 --icon: url('data:image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.custom-block-title {
304 display: inline-flex;
305 align-items: center;
306 gap: 8px;
307}
308
309.custom-block-title::before {
310 content: '';
311 width: 16px;
312 height: 16px;
313 -webkit-mask: var(--icon) no-repeat;
314 mask: var(--icon) no-repeat;
315 -webkit-mask-size: 100% 100%;
316 mask-size: 100% 100%;
317 background-color: currentColor;
318 color: inherit;
319}
320
321.vp-doc .custom-block a {
322 text-decoration: underline;
323 text-underline-offset: 4px;
324 text-decoration-style: solid;
325}
326
327.vp-doc h3 {
328 text-decoration: underline;
329}
330
331.vp-doc h1 {
332 font-size: 2.5rem; /* Adjust the size as needed */
333}
334
335.vp-doc h2 {
336 font-size: 1.75rem; /* Adjust the size as needed */
337}
338
339.vp-doc h3 {
340 font-size: 1.4rem; /* Adjust the size as needed */
341}
342
343.vp-doc h4 {
344 font-size: 1.2rem; /* Adjust the size as needed */
345}
346
347.vp-doc h1 {
348 margin-top: -0.5rem; /* Adjust the top margin as needed */
349 margin-bottom: -1.5rem; /* Adjust the bottom margin as needed */
350}
351
352.vp-doc h4 {
353 margin-top: 1rem; /* Adjust the top margin as needed */
354 margin-bottom: 1rem; /* Adjust the bottom margin as needed */
355}
356
357.vp-doc._credits div h1 {
358 margin-top: 35px;
359 margin-bottom: 15px;
360}
361
362/* Make the page half the width for class `sandbox` */
363.sandbox {
364 max-width: 50%;
365 width: 50%;
366 margin: 0 auto;
367}
368.v-popper__arrow-container {
369 display: none;
370}
371
372/** Color links inside custom containers */
373.tip.custom-block a {
374 color: theme('colors.meadow.500');
375}
376
377.tip.custom-block a:hover {
378 color: theme('colors.meadow.400');
379 text-decoration-color: theme('colors.meadow.300');
380 -webkit-text-decoration-color: theme('colors.meadow.300');
381}
382
383.info.custom-block a {
384 color: theme('colors.swarm.500');
385}
386
387.info.custom-block a:hover {
388 color: theme('colors.swarm.400');
389 text-decoration-color: theme('colors.swarm.300');
390 -webkit-text-decoration-color: theme('colors.swarm.300');
391}
392
393.warning.custom-block a {
394 color: theme('colors.merlin.500');
395}
396
397.warning.custom-block a:hover {
398 color: theme('colors.merlin.400');
399 text-decoration-color: theme('colors.merlin.300');
400 -webkit-text-decoration-color: theme('colors.merlin.300');
401}
402
403.danger.custom-block a {
404 color: theme('colors.carnation.500');
405}
406
407.danger.custom-block a:hover {
408 color: theme('colors.carnation.400');
409 text-decoration-color: theme('colors.carnation.300');
410 -webkit-text-decoration-color: theme('colors.carnation.300');
411}
412
413.details.custom-block a {
414 color: theme('colors.swarm.500');
415}
416
417.details.custom-block a:hover {
418 color: theme('colors.swarm.400');
419 text-decoration-color: theme('colors.swarm.300');
420 -webkit-text-decoration-color: theme('colors.swarm.300');
421}
422
423/** Fix for markdown-it-merge-cells */
424.vp-doc table tr:nth-child(even),
425.vp-doc table tr:nth-child(odd) {
426 background-color: transparent !important;
427}
428
429table tr:nth-child(even),
430table tr:nth-child(odd) {
431 background-color: transparent !important;
432}
433
434.tip.custom-block table tr,
435.tip.custom-block table td,
436.tip.custom-block table th {
437 border-color: theme('colors.meadow.800') !important;
438}
439
440.info.custom-block table tr,
441.info.custom-block table td,
442.info.custom-block table th {
443 border-color: theme('colors.swarm.800') !important;
444}
445
446.warning.custom-block table tr,
447.warning.custom-block table td,
448.warning.custom-block table th {
449 border-color: theme('colors.merlin.800') !important;
450}
451
452.danger.custom-block table tr,
453.danger.custom-block table td,
454.danger.custom-block table th {
455 border-color: theme('colors.carnation.800') !important;
456}
457
458.details.custom-block table tr,
459.details.custom-block table td,
460.details.custom-block table th {
461 border-color: theme('colors.swarm.800') !important;
462}
463
464/** fix for nolebase-git-changelog */
465.vp-nolebase-git-changelog a {
466 text-decoration: none !important;
467}
468
469.VPFooter {
470 .divider {
471 color: var(--vp-c-divider);
472 }
473}
474
475#VPSidebarNav
476 > .group:nth-child(-n + 8):not(:first-child)
477 > .VPSidebarItem
478 > .item
479 > .text::before {
480 filter: invert(1);
481}
482
483#VPSidebarNav > .group {
484 @apply border-t-0;
485
486 & > .VPSidebarItem {
487 @apply pb-1;
488
489 & > .item > .text {
490 @apply flex items-center text-base py-1.5;
491 }
492
493 & > .items {
494 & > .VPSidebarItem {
495 @apply pl-4 border-l dark:border-l-gray-600 rounded-none transition-all duration-150 ease-out;
496
497 /* Separation between nested table of content */
498 &:not(.collapsible),
499 &.collapsible > .items > .VPSidebarItem {
500 &:hover,
501 &:focus,
502 &.is-active.has-active {
503 @apply rounded-lg border-transparent;
504
505 background-color: var(--vp-c-brand-nav-active);
506
507 & > .item > .indicator {
508 background-color: var(--vp-c-brand-1);
509 }
510 }
511 }
512
513 &.collapsible {
514 & > .items {
515 @apply border-0 pl-0;
516
517 & > .VPSidebarItem {
518 @apply border-l pl-4 dark:border-l-gray-600;
519 }
520
521 & > .caret {
522 &:hover,
523 &:focus {
524 background-color: transparent;
525 }
526 }
527 }
528 }
529 }
530 }
531 }
532}