@troshab/slidev-theme-troshab 0.1.8 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +18 -0
- package/components/Stepper.vue +14 -9
- package/package.json +1 -1
- package/setup/vite-plugins.ts +27 -0
- package/styles/base.css +27 -8
package/CLAUDE.md
CHANGED
|
@@ -535,3 +535,21 @@ Phosphor Icons via Iconify (`@iconify-json/ph`). Use via `<Icon>` component:
|
|
|
535
535
|
```
|
|
536
536
|
|
|
537
537
|
Weight suffixes: (none) = regular, `-bold`, `-fill`, `-duotone`, `-thin`, `-light`.
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
## Related Projects (Cyber Academy)
|
|
541
|
+
|
|
542
|
+
This project is part of the Cyber Academy content factory. See `~/cyber-academy/README.md` for the full map.
|
|
543
|
+
|
|
544
|
+
| Path | Role |
|
|
545
|
+
|------|------|
|
|
546
|
+
| `~/colo_cyberrange` | LMS platform (delivery) |
|
|
547
|
+
| `~/soc-tier-2` | SOC Tier 1+2 program (course-gen DB pipeline) |
|
|
548
|
+
| `~/was26` | Web App Security 2026 (Slidev course) |
|
|
549
|
+
| `~/ll26` | Binary Exploitation 2026 (Slidev course, planned) |
|
|
550
|
+
| `~/avis26` | NaUKMA F5 bachelor program (curriculum admin) |
|
|
551
|
+
| `~/slidev-theme-troshab` | Slidev theme used by all course presentations |
|
|
552
|
+
|
|
553
|
+
Authoring tools: `~/.claude/plugins/marketplaces/troshab-own-claude-code` (skills `course-*`, `slidev-*`, `ukrainize-text`).
|
|
554
|
+
|
|
555
|
+
Cross-project navigation: `/troshab-own:cyber-academy` slash command.
|
package/components/Stepper.vue
CHANGED
|
@@ -240,7 +240,7 @@ function isUpcoming(index: number) {
|
|
|
240
240
|
display: flex;
|
|
241
241
|
flex-direction: column;
|
|
242
242
|
width: 100%;
|
|
243
|
-
padding: 0.25rem;
|
|
243
|
+
padding: 0.25rem 0.25rem 0;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
/* ===== Track ===== */
|
|
@@ -267,12 +267,12 @@ function isUpcoming(index: number) {
|
|
|
267
267
|
.stepper-step {
|
|
268
268
|
display: flex;
|
|
269
269
|
align-items: center;
|
|
270
|
-
/* Reserve horizontal space for .stepper-marker's transform:
|
|
271
|
-
* active state. Scaled marker's visible box extends ~6px past
|
|
272
|
-
* box; without padding, step.scrollWidth exceeds
|
|
273
|
-
*
|
|
274
|
-
* scrollable overflow. */
|
|
275
|
-
padding:
|
|
270
|
+
/* Reserve horizontal AND vertical space for .stepper-marker's transform:
|
|
271
|
+
* scale(1.15) on active state. Scaled marker's visible box extends ~6px past
|
|
272
|
+
* its layout box; without padding, step.scrollWidth/scrollHeight exceeds
|
|
273
|
+
* clientWidth/clientHeight by 1-5px. Per CSS spec, transformed descendants
|
|
274
|
+
* count toward parent scrollable overflow. */
|
|
275
|
+
padding: var(--transform-scale-comp);
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
.stepper-horizontal .stepper-step {
|
|
@@ -459,7 +459,7 @@ function isUpcoming(index: number) {
|
|
|
459
459
|
.stepper-arrow-char {
|
|
460
460
|
color: var(--color-text-tertiary);
|
|
461
461
|
font-size: 2rem;
|
|
462
|
-
line-height: 1;
|
|
462
|
+
line-height: 1.25;
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
.stepper-connector.is-completed .stepper-arrow-char {
|
|
@@ -479,10 +479,15 @@ function isUpcoming(index: number) {
|
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
.stepper-vertical.stepper-arrows .stepper-connector {
|
|
482
|
+
width: auto;
|
|
483
|
+
min-width: 2rem;
|
|
484
|
+
min-height: 2.5rem;
|
|
482
485
|
background: none;
|
|
483
486
|
display: flex;
|
|
484
487
|
align-items: center;
|
|
485
|
-
|
|
488
|
+
justify-content: center;
|
|
489
|
+
margin-left: calc(var(--stepper-marker-size) / 2 - 1rem);
|
|
490
|
+
line-height: 1;
|
|
486
491
|
}
|
|
487
492
|
|
|
488
493
|
.stepper-vertical .stepper-connector.is-completed {
|
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* slidev-theme-troshab — Vite Plugins Setup
|
|
3
|
+
*
|
|
4
|
+
* Fix: `lz-string` 1.5.0 is CJS-only (no `exports`/`module` fields).
|
|
5
|
+
* `@slidev/client/modules/mermaid.ts` does `import lz from 'lz-string'`
|
|
6
|
+
* which fails at runtime unless Vite pre-bundles the dep through esbuild
|
|
7
|
+
* (which fabricates a `default` export). Forcing `optimizeDeps.include`
|
|
8
|
+
* makes the pre-bundle deterministic across modules and CI environments.
|
|
9
|
+
*
|
|
10
|
+
* NOTE: this file runs through jiti BEFORE Vite starts, so it must avoid
|
|
11
|
+
* importing from ESM-only packages like `@slidev/types` (jiti's CJS interop
|
|
12
|
+
* crashes on them). `defineVitePluginsSetup` is just an identity helper
|
|
13
|
+
* for type inference; we drop it and export the raw setup function.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export default () => [
|
|
17
|
+
{
|
|
18
|
+
name: 'troshab:dep-optimization',
|
|
19
|
+
config() {
|
|
20
|
+
return {
|
|
21
|
+
optimizeDeps: {
|
|
22
|
+
include: ['lz-string'],
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
]
|
package/styles/base.css
CHANGED
|
@@ -11,12 +11,8 @@
|
|
|
11
11
|
/* Import color system */
|
|
12
12
|
@import './colors.css';
|
|
13
13
|
|
|
14
|
-
/*
|
|
15
|
-
|
|
16
|
-
Provides proper unicode-range subsetting
|
|
17
|
-
(latin, cyrillic, cyrillic-ext, etc.)
|
|
18
|
-
============================================ */
|
|
19
|
-
|
|
14
|
+
/* @font-face via @fontsource — must come BEFORE any other CSS rules per
|
|
15
|
+
* CSS spec (all @import / @charset / @layer at top of file). */
|
|
20
16
|
@import '@fontsource/ibm-plex-sans/400.css';
|
|
21
17
|
@import '@fontsource/ibm-plex-sans/500.css';
|
|
22
18
|
@import '@fontsource/ibm-plex-sans/600.css';
|
|
@@ -24,6 +20,15 @@
|
|
|
24
20
|
@import '@fontsource/ibm-plex-mono/400.css';
|
|
25
21
|
@import '@fontsource/ibm-plex-mono/500.css';
|
|
26
22
|
|
|
23
|
+
/* Slidev fix: #slidev-goto-dialog уse `-top-20` (-5rem) для closed state, але
|
|
24
|
+
* з 100+ слайдів список autocomplete стає вищим за 5rem і видно нижню
|
|
25
|
+
* частину з-під верху екрану. Перекриваємо: коли dialog має `-top-20` клас,
|
|
26
|
+
* примусово ховаємо через translateY(-100%). */
|
|
27
|
+
#slidev-goto-dialog.\-top-20 {
|
|
28
|
+
transform: translateY(-100%);
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
27
32
|
/* ============================================
|
|
28
33
|
2. CSS Custom Properties (Typography & Layout)
|
|
29
34
|
Note: Colors are defined in colors.css
|
|
@@ -56,7 +61,7 @@
|
|
|
56
61
|
Chung (2004, Vision Research): optimal 1.25-1.5 for body.
|
|
57
62
|
Bringhurst "Elements of Typographic Style": headings 1.1-1.25, body 1.3-1.5.
|
|
58
63
|
Kolers et al. (1981): reading speed U-curve — extremes reduce speed. */
|
|
59
|
-
--line-height-heading: 1.
|
|
64
|
+
--line-height-heading: 1.4; /* IBM Plex Sans + Cyrillic descender (у, р, ф, ц, щ) need extra room - 1.3 caused 1-8px h1 overflow */
|
|
60
65
|
--line-height-body: 1.4; /* Chung mid — comfortable for slides */
|
|
61
66
|
--line-height-reading: 1.5; /* Chung upper — BDA recommended for paragraphs */
|
|
62
67
|
--line-height-list: 1.4; /* matches body for consistency */
|
|
@@ -159,7 +164,7 @@
|
|
|
159
164
|
letter-spacing: var(--letter-spacing-body);
|
|
160
165
|
word-spacing: var(--word-spacing-body);
|
|
161
166
|
color: var(--color-text);
|
|
162
|
-
padding: var(--safe-inset-y) var(--safe-inset-x);
|
|
167
|
+
padding: var(--safe-inset-y) var(--safe-inset-x) calc(var(--safe-inset-y) - 16px);
|
|
163
168
|
height: 100%;
|
|
164
169
|
width: 100%;
|
|
165
170
|
}
|
|
@@ -182,6 +187,7 @@
|
|
|
182
187
|
line-height: 1.45;
|
|
183
188
|
}
|
|
184
189
|
|
|
190
|
+
|
|
185
191
|
/* --- Headings --- */
|
|
186
192
|
.slidev-layout h1,
|
|
187
193
|
.slidev-layout h2,
|
|
@@ -763,6 +769,19 @@
|
|
|
763
769
|
padding-bottom: 1%;
|
|
764
770
|
}
|
|
765
771
|
|
|
772
|
+
/* Split + footer: explicit grid rows so panels share remaining height with
|
|
773
|
+
* footer (auto). Without this, panel height defaults stretch and footer adds
|
|
774
|
+
* a 3rd auto-row, causing total > viewport (~80-200px overflow). */
|
|
775
|
+
.slide-split:has(.slide-footer) {
|
|
776
|
+
grid-template-rows: 1fr auto;
|
|
777
|
+
}
|
|
778
|
+
.slide-split:has(.slide-footer) .slide-panel {
|
|
779
|
+
min-height: 0;
|
|
780
|
+
}
|
|
781
|
+
.slide-split:has(.slide-footer) .slide-panel-content {
|
|
782
|
+
overflow: hidden;
|
|
783
|
+
}
|
|
784
|
+
|
|
766
785
|
/* ============================================
|
|
767
786
|
8. Component Styles
|
|
768
787
|
============================================ */
|