From 4202a22403f78f5f9533e417fc07791310687c9c Mon Sep 17 00:00:00 2001 From: Sir Blob Date: Wed, 3 Dec 2025 18:58:24 +0000 Subject: [PATCH] Show on mobile Update --- src/lib/assets/css/tui-body.css | 4 ++++ src/lib/components/tui/TuiLine.svelte | 2 ++ src/lib/components/tui/types.ts | 1 + src/lib/pages/about.ts | 1 + src/lib/pages/home.ts | 10 ++++++++++ 5 files changed, 18 insertions(+) diff --git a/src/lib/assets/css/tui-body.css b/src/lib/assets/css/tui-body.css index 96f955c..a61df26 100644 --- a/src/lib/assets/css/tui-body.css +++ b/src/lib/assets/css/tui-body.css @@ -300,4 +300,8 @@ max-width: 100% !important; width: 100%; } + + .mobile-hidden { + display: none !important; + } } \ No newline at end of file diff --git a/src/lib/components/tui/TuiLine.svelte b/src/lib/components/tui/TuiLine.svelte index 0ecf2b3..8826296 100644 --- a/src/lib/components/tui/TuiLine.svelte +++ b/src/lib/components/tui/TuiLine.svelte @@ -78,6 +78,7 @@ const isTooltip = $derived(line.type === "tooltip"); +
{#if isBlank} {#if inline}{:else}
{/if} {/if} +
diff --git a/src/lib/components/tui/types.ts b/src/lib/components/tui/types.ts index 9b79f40..ca922aa 100644 --- a/src/lib/components/tui/types.ts +++ b/src/lib/components/tui/types.ts @@ -28,6 +28,7 @@ export interface BaseTerminalLine { display?: 'flex' | 'block' | 'grid' | 'inline'; delay?: number; style?: 'primary' | 'secondary' | 'accent' | 'warning' | 'error'; + mobile?: boolean; } // Specific line types diff --git a/src/lib/pages/about.ts b/src/lib/pages/about.ts index dc05578..8d2974d 100644 --- a/src/lib/pages/about.ts +++ b/src/lib/pages/about.ts @@ -260,6 +260,7 @@ export const lines: TerminalLine[] = [ type: 'card', id: 'music-player', content: '', + mobile: false, children: [ { type: 'info', content: 'Loading playlist...' } ] diff --git a/src/lib/pages/home.ts b/src/lib/pages/home.ts index 10b496f..4482d95 100644 --- a/src/lib/pages/home.ts +++ b/src/lib/pages/home.ts @@ -39,4 +39,14 @@ export const lines: TerminalLine[] = [ { type: 'output', content: '(&muted)•(&) (&orange)Skip typing animation(&) (&text, bold)(Y)(&)' , inline: true }, { type: 'output', content: '(&muted)•(&) (&orange)Navigate to page(&) (&text, bold)(Ctrl/Cmd+ [#])(&)' , inline: true }, { type: 'blank', content: '' }, + // list the themes + { type: 'output', content: '(&accent)Themes:(&)', inline: true }, + ...themeOptions.map((theme, i) => ( + { + type: 'output' as const, + content: `(&primary)${theme.label}(&) (&text, bold)[${i+1}](&)`, + inline: true + } + )), + { type: 'blank', content: '' }, ]; \ No newline at end of file