Initial commit

This commit is contained in:
Patrick Alvin Alcala 2025-10-16 15:23:57 +08:00
commit 4184942584
51 changed files with 6222 additions and 0 deletions

View file

@ -0,0 +1,18 @@
import '../styles/Column.sass'
import type { JSXElement } from 'solid-js'
interface Props {
children: JSXElement
content?: 'top' | 'center' | 'right' | 'split' | 'spaced'
gap?: number
}
export default (props: Props) => {
return (
<>
<section class={`column-${props.content || 'center'}`} style={`gap: ${props.gap}rem`}>
{props.children}
</section>
</>
)
}

View file

@ -0,0 +1,50 @@
import '../styles/HTML.sass'
import { type JSXElement, Show } from 'solid-js'
import background1 from '../images/background.avif'
import background2 from '../images/background.webp'
interface Props {
name: string
description: string
children: JSXElement
font?: 'roboto' | 'inter' | 'montserrat' | 'open-sans' | 'public-sans' | string
preloadBackground?: boolean
author: string
assets: JSXElement
scripts: JSXElement
}
export default (props: Props) => {
return (
<>
<html lang="en">
<head>
<base href="/" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<meta name="name" content={props.name} />
<meta name="description" content={props.description} />
<meta name="title" property="og:title" content={props.name} />
<meta name="keywords" content="HTML, CSS, JavaScript" />
<meta name="author" content={props.author} />
<meta property="og:description" content={props.description} />
<meta property="og:type" content="website" />
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
<Show when={props.font}>
<link rel="preconnect" href="https://cdn.jsdelivr.net" />
</Show>
<Show when={props.preloadBackground}>
<link rel="preload" href={background1} as="image" type="image/svg+xml" />
<link rel="preload" href={background2} as="image" type="image/svg+xml" />
</Show>
{props.assets}
</head>
<body>
<div class={props.font} id="app">{props.children}</div>
{props.scripts}
</body>
</html>
</>
)
}

View file

@ -0,0 +1,20 @@
import '../styles/Page.sass'
import { Show } from 'solid-js'
interface Props {
children?: any
alignment?: 'row' | 'column'
}
export default (props: Props) => {
return (
<>
<Show when={props.alignment}>
<main class={props.alignment}>{props.children}</main>
</Show>
<Show when={!props.alignment}>
<main class="page">{props.children}</main>
</Show>
</>
)
}