Element Bug Fixes
This commit is contained in:
82
src/lib/pages/about.ts
Normal file
82
src/lib/pages/about.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
import type { TerminalLine } from '$lib/components/tui/types';
|
||||
import { user } from '$lib/config';
|
||||
|
||||
|
||||
|
||||
const songs = [
|
||||
{
|
||||
name: 'Song A',
|
||||
url: 'https://example.com'
|
||||
},
|
||||
{
|
||||
name: 'Song B',
|
||||
url: 'https://example.com'
|
||||
},
|
||||
{
|
||||
name: 'Song C',
|
||||
url: 'https://example.com'
|
||||
}
|
||||
]
|
||||
|
||||
const artist = [
|
||||
{
|
||||
name: 'Artist A',
|
||||
url: 'https://example.com'
|
||||
},
|
||||
{
|
||||
name: 'Artist B',
|
||||
url: 'https://example.com'
|
||||
},
|
||||
{
|
||||
name: 'Artist C',
|
||||
url: 'https://example.com'
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
export const lines: TerminalLine[] = [
|
||||
{ type: 'command', content: 'cat ~/about.md' },
|
||||
{ type: 'blank', content: '' },
|
||||
|
||||
{ type: 'image', content: '', image: user.avatar, imageAlt: user.name, imageWidth: 180, inline: true },
|
||||
|
||||
{
|
||||
type: 'group',
|
||||
content: '',
|
||||
groupDirection: 'column',
|
||||
groupAlign: 'start',
|
||||
inline: true,
|
||||
children: [
|
||||
{ type: 'header', content: `(&bold)${user.name}(&)` },
|
||||
{ type: 'info', content: `(&accent)${user.title}(&)` },
|
||||
{ type: 'output', content: `(&white)Location:(&) (&primary)${user.location}(&)` },
|
||||
{ type: 'output', content: `(&muted)${user.bio}(&)` },
|
||||
]
|
||||
},
|
||||
{ type: 'blank', content: '' },
|
||||
{ type: 'divider', content: 'Music Recommendations' },
|
||||
|
||||
{ type: 'output', content: '(&accent)Artist:(&) ', inline: true },
|
||||
...artist.flatMap((a, i): TerminalLine[] => {
|
||||
const item: TerminalLine = { type: 'link', content: `(&white)${a.name}(&)`, href: a.url, inline: true };
|
||||
return i < artist.length - 1 ? [item, { type: 'output', content: ' (&muted)•(&) ', inline: true }] : [item];
|
||||
}),
|
||||
{ type: 'blank', content: '' },
|
||||
|
||||
{ type: 'output', content: '(&accent)Songs:(&) ', inline: true },
|
||||
...songs.flatMap((s, i): TerminalLine[] => {
|
||||
const item: TerminalLine = { type: 'link', content: `(&white)${s.name}(&)`, href: s.url, inline: true };
|
||||
return i < songs.length - 1 ? [item, { type: 'output', content: ' (&muted)•(&) ', inline: true }] : [item];
|
||||
}),
|
||||
{ type: 'blank', content: '' },
|
||||
{
|
||||
type: 'card',
|
||||
id: 'music-player',
|
||||
content: '',
|
||||
children: [
|
||||
{ type: 'info', content: 'Loading playlist...' }
|
||||
]
|
||||
},
|
||||
{ type: 'blank', content: '' },
|
||||
];
|
||||
Reference in New Issue
Block a user