Group Header Rendering Fixes
This commit is contained in:
@@ -140,11 +140,16 @@
|
|||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
color: var(--terminal-accent);
|
color: var(--terminal-accent);
|
||||||
font-weight: 600;
|
font-weight: 700;
|
||||||
font-size: 1rem;
|
font-size: 1.35rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-text.inline-header {
|
||||||
|
display: inline-flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.header-icon) {
|
:global(.header-icon) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { mode, colorTheme, toggleMode, setColorTheme, themeOptions, themeColors, type ColorTheme } from '$lib/stores/theme';
|
import { mode, getThemeIcon, colorTheme, toggleMode, setColorTheme, themeOptions, themeColors, type ColorTheme } from '$lib/stores/theme';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { fly, fade, slide } from 'svelte/transition';
|
import { fly, fade, slide } from 'svelte/transition';
|
||||||
import { user, navigation } from '$lib/config';
|
import { user, navigation } from '$lib/config';
|
||||||
@@ -166,13 +166,6 @@
|
|||||||
mobileMenuOpen = false;
|
mobileMenuOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getThemeIcon(theme: ColorTheme): string {
|
|
||||||
switch (theme) {
|
|
||||||
case 'arch': return 'mdi:arch';
|
|
||||||
case 'catppuccin': return 'solar:cat-bold';
|
|
||||||
default: return 'mdi:palette';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:window on:keydown={handleKeydown} />
|
<svelte:window on:keydown={handleKeydown} />
|
||||||
@@ -195,9 +188,9 @@
|
|||||||
<!-- Left modules -->
|
<!-- Left modules -->
|
||||||
<div class="bar-left">
|
<div class="bar-left">
|
||||||
<!-- Arch logo / Launcher -->
|
<!-- Arch logo / Launcher -->
|
||||||
<a href="/" class="module launcher" title="Home">
|
<!-- <a href="/" class="module launcher" title="Home">
|
||||||
<img src="/favicon.png" alt="Blob Icon" width="16" />
|
<img src="/favicon.png" alt="Blob Icon" width="16" />
|
||||||
</a>
|
</a> -->
|
||||||
|
|
||||||
<!-- Mobile menu toggle -->
|
<!-- Mobile menu toggle -->
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -1,20 +1,13 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Icon from '@iconify/svelte';
|
import Icon from '@iconify/svelte';
|
||||||
import { user } from '$lib/config';
|
import { user } from '$lib/config';
|
||||||
import { colorTheme, type ColorTheme } from '$lib/stores/theme';
|
import { colorTheme, getThemeIcon, type ColorTheme } from '$lib/stores/theme';
|
||||||
import '$lib/assets/css/tui-header.css';
|
import '$lib/assets/css/tui-header.css';
|
||||||
|
|
||||||
export let title = 'terminal';
|
export let title = 'terminal';
|
||||||
export let interactive = true;
|
export let interactive = true;
|
||||||
export let hasButtons = false;
|
export let hasButtons = false;
|
||||||
|
|
||||||
function getThemeIcon(theme: ColorTheme): string {
|
|
||||||
switch (theme) {
|
|
||||||
case 'arch': return 'mdi:arch';
|
|
||||||
case 'catppuccin': return 'solar:cat-bold';
|
|
||||||
default: return 'mdi:palette';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="tui-statusbar top">
|
<div class="tui-statusbar top">
|
||||||
|
|||||||
@@ -110,7 +110,12 @@
|
|||||||
{#if line.content}<span class="image-caption">{line.content}</span>{/if}
|
{#if line.content}<span class="image-caption">{line.content}</span>{/if}
|
||||||
</div>
|
</div>
|
||||||
{:else if !isImage}
|
{:else if !isImage}
|
||||||
{#if inline}
|
{#if inline && isHeader}
|
||||||
|
<span class="header-text inline-header">
|
||||||
|
<Icon icon="mdi:pound" width="20" class="header-icon" />
|
||||||
|
{#each segments as seg}{#if seg.icon}<Icon icon={seg.icon} width="20" class="inline-icon" />{:else if getSegmentStyle(seg)}<span style={getSegmentStyle(seg)}>{seg.text}</span>{:else}{seg.text}{/if}{/each}
|
||||||
|
</span>
|
||||||
|
{:else if inline}
|
||||||
<span class="inline-content {line.type}">
|
<span class="inline-content {line.type}">
|
||||||
{getLinePrefix(line.type)}{#each segments as seg}{#if seg.icon}<Icon icon={seg.icon} width="14" class="inline-icon" />{:else if getSegmentStyle(seg)}<span style={getSegmentStyle(seg)}>{seg.text}</span>{:else}{seg.text}{/if}{/each}
|
{getLinePrefix(line.type)}{#each segments as seg}{#if seg.icon}<Icon icon={seg.icon} width="14" class="inline-icon" />{:else if getSegmentStyle(seg)}<span style={getSegmentStyle(seg)}>{seg.text}</span>{:else}{seg.text}{/if}{/each}
|
||||||
</span>
|
</span>
|
||||||
@@ -124,8 +129,8 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{#if isHeader}
|
{#if isHeader}
|
||||||
<span class="content header-text">
|
<span class="content header-text">
|
||||||
<Icon icon="mdi:pound" width="14" class="header-icon" />
|
<Icon icon="mdi:pound" width="25" class="header-icon" />
|
||||||
{#each segments as seg}{#if seg.icon}<Icon icon={seg.icon} width="16" class="inline-icon" />{:else if getSegmentStyle(seg)}<span style={getSegmentStyle(seg)}>{seg.text}</span>{:else}{seg.text}{/if}{/each}
|
{#each segments as seg}{#if seg.icon}<Icon icon={seg.icon} width="25" class="inline-icon" />{:else if getSegmentStyle(seg)}<span style={getSegmentStyle(seg)}>{seg.text}</span>{:else}{seg.text}{/if}{/each}
|
||||||
</span>
|
</span>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="content">
|
<span class="content">
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export const lines: TerminalLine[] = [
|
|||||||
inline: true,
|
inline: true,
|
||||||
children: [
|
children: [
|
||||||
// User info
|
// User info
|
||||||
{ type: 'header', content: `(&primary,bold)${user.name}(&)` },
|
{ type: 'header', content: `(&bold)${user.name}(&)` },
|
||||||
{ type: 'info', content: `(&accent)${user.title}(&)` },
|
{ type: 'info', content: `(&accent)${user.title}(&)` },
|
||||||
{ type: 'output', content: `(&white)Location:(&) (&primary)${user.location}(&)` },
|
{ type: 'output', content: `(&white)Location:(&) (&primary)${user.location}(&)` },
|
||||||
{ type: 'output', content: `(&muted)${user.bio}(&)` },
|
{ type: 'output', content: `(&muted)${user.bio}(&)` },
|
||||||
@@ -44,15 +44,7 @@ export const lines: TerminalLine[] = [
|
|||||||
href: social.link,
|
href: social.link,
|
||||||
inline: true
|
inline: true
|
||||||
})),
|
})),
|
||||||
// {
|
|
||||||
// type: 'button',
|
|
||||||
// content: `Email: ${user.email}`,
|
|
||||||
// icon: 'mdi:email',
|
|
||||||
// style: 'secondary',
|
|
||||||
// href: `mailto:${user.email}`
|
|
||||||
// },
|
|
||||||
|
|
||||||
{ type: 'blank', content: '' },
|
|
||||||
{ type: 'divider', content: 'SKILLS', id: 'skills' },
|
{ type: 'divider', content: 'SKILLS', id: 'skills' },
|
||||||
|
|
||||||
// Skills as TUI sections
|
// Skills as TUI sections
|
||||||
@@ -90,14 +82,12 @@ export const lines: TerminalLine[] = [
|
|||||||
// Interests
|
// Interests
|
||||||
{ type: 'info', content: '(&accent,bold)▸ Interests(&)' },
|
{ type: 'info', content: '(&accent,bold)▸ Interests(&)' },
|
||||||
{ type: 'output', content: ' ' + skills.interests.map(s => `(&muted)${s}(&)`).join(' (&muted)•(&) ') },
|
{ type: 'output', content: ' ' + skills.interests.map(s => `(&muted)${s}(&)`).join(' (&muted)•(&) ') },
|
||||||
{ type: 'blank', content: '' },
|
|
||||||
|
|
||||||
{ type: 'divider', content: 'PROJECTS', id: 'projects' },
|
{ type: 'divider', content: 'PROJECTS', id: 'projects' },
|
||||||
{ type: 'blank', content: '' },
|
|
||||||
|
|
||||||
// Featured projects with buttons
|
// Featured projects with buttons
|
||||||
...projects.filter(p => p.featured).flatMap(project => [
|
...projects.filter(p => p.featured).flatMap(project => [
|
||||||
{ type: 'header' as const, content: `(&primary,bold)${project.name}(&)` },
|
{ type: 'header' as const, content: `(&bold)${project.name}(&)` },
|
||||||
{ type: 'output' as const, content: `(&muted)${project.description}(&)` },
|
{ type: 'output' as const, content: `(&muted)${project.description}(&)` },
|
||||||
{ type: 'info' as const, content: `(&info)TechStack: (&primary)${project.tech.join(', ')}(&)` },
|
{ type: 'info' as const, content: `(&info)TechStack: (&primary)${project.tech.join(', ')}(&)` },
|
||||||
...(project.github ? [{
|
...(project.github ? [{
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ const featuredCount = sortedCards.filter(c => c.featured).length;
|
|||||||
export const lines: TerminalLine[] = [
|
export const lines: TerminalLine[] = [
|
||||||
{ type: 'command', content: 'ls ~/projects --grid' },
|
{ type: 'command', content: 'ls ~/projects --grid' },
|
||||||
{ type: 'divider', content: 'PROJECTS' },
|
{ type: 'divider', content: 'PROJECTS' },
|
||||||
{ type: 'blank', content: '' },
|
|
||||||
...projects.filter(p => p.featured).flatMap(project => [
|
...projects.filter(p => p.featured).flatMap(project => [
|
||||||
{ type: 'header' as const, content: `(&bold)${project.name}(&)` },
|
{ type: 'header' as const, content: `(&bold)${project.name}(&)` },
|
||||||
{ type: 'output' as const, content: `(&muted)${project.description}(&)` },
|
{ type: 'output' as const, content: `(&muted)${project.description}(&)` },
|
||||||
@@ -50,14 +49,12 @@ export const lines: TerminalLine[] = [
|
|||||||
}] : []),
|
}] : []),
|
||||||
{ type: 'blank' as const, content: '' }
|
{ type: 'blank' as const, content: '' }
|
||||||
]),
|
]),
|
||||||
{ type: 'blank', content: '' },
|
|
||||||
{ type: 'divider', content: 'HACKATHONS' },
|
{ type: 'divider', content: 'HACKATHONS' },
|
||||||
{ type: 'command', content: 'ls ~/hackathons --grid' },
|
{ type: 'command', content: 'ls ~/hackathons --grid' },
|
||||||
{ type: 'blank', content: '' },
|
{ type: 'blank', content: '' },
|
||||||
{ type: 'header', content: `Hackathon Journey` },
|
{ type: 'header', content: `Hackathon Journey` },
|
||||||
{ type: 'output', content: `(&muted)Total:(&) (&primary)${totalHackathons}(&) (&muted)| Awards:(&) (&yellow)${totalAwards}(&) (&muted)| Featured:(&) (&accent)${featuredCount}(&)` },
|
{ type: 'output', content: `(&muted)Total:(&) (&primary)${totalHackathons}(&) (&muted)| Awards:(&) (&yellow)${totalAwards}(&) (&muted)| Featured:(&) (&accent)${featuredCount}(&)` },
|
||||||
{ type: 'blank', content: '' },
|
{ type: 'blank', content: '' },
|
||||||
{ type: 'blank', content: '' },
|
|
||||||
{ type: 'cardgrid', content: '', cards: sortedCards },
|
{ type: 'cardgrid', content: '', cards: sortedCards },
|
||||||
{ type: 'blank', content: '' },
|
{ type: 'blank', content: '' },
|
||||||
{ type: 'success', content: `(&success)Ready for the next hackathon! 🚀(&)` },
|
{ type: 'success', content: `(&success)Ready for the next hackathon! 🚀(&)` },
|
||||||
|
|||||||
@@ -150,6 +150,17 @@ export function setColorTheme(theme: ColorTheme) {
|
|||||||
colorTheme.set(theme);
|
colorTheme.set(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getThemeIcon(theme: ColorTheme): string {
|
||||||
|
switch (theme) {
|
||||||
|
case 'arch': return 'mdi:arch';
|
||||||
|
case 'catppuccin': return 'solar:cat-bold';
|
||||||
|
case 'wintry': return 'mdi:snowflake';
|
||||||
|
case 'rose': return 'mdi:flower-tulip';
|
||||||
|
case 'cerberus': return 'iconoir:wolf-solid';
|
||||||
|
default: return 'mdi:palette';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Generate theme options from loaded themes
|
// Generate theme options from loaded themes
|
||||||
export const themeOptions: { value: ColorTheme; label: string; icon: string }[] =
|
export const themeOptions: { value: ColorTheme; label: string; icon: string }[] =
|
||||||
Object.entries(themes).map(([key, theme]) => ({
|
Object.entries(themes).map(([key, theme]) => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user