This commit is contained in:
Patrick Alvin Alcala 2026-01-30 19:18:45 +08:00
parent cde344cb59
commit b8a0d0179e
12 changed files with 70 additions and 44 deletions

View file

@ -29,3 +29,6 @@ logo:
image: image:
cd frontend && bun ./@dasig/scripts/node/optimizeImage.ts --name $(name) --size $(size) cd frontend && bun ./@dasig/scripts/node/optimizeImage.ts --name $(name) --size $(size)
background:
cd frontend && bun ./@dasig/scripts/node/optimizeImage.ts

View file

@ -1,6 +1,6 @@
<div align=center> <div align=center>
# DASIG # DASIG - SOLID
An architecture framework for pure speed fullstack developemnt An architecture framework for pure speed fullstack developemnt

View file

@ -9,7 +9,7 @@ interface Props {
} }
export default (props: Props) => { export default (props: Props) => {
const boxClass = createMemo(() => (props.curved ? "curvedbox" : "box")); const boxClass = createMemo(() => (props.curved ? "dasig-curvedbox" : "dasig-box"));
return ( return (
<section <section

View file

@ -9,10 +9,8 @@ interface Props {
export default (props: Props) => { export default (props: Props) => {
return ( return (
<> <section class={`column-${props.content || 'center'}`} style={`gap: ${props.gap}rem`}>
<section class={`column-${props.content || 'center'}`} style={`gap: ${props.gap}rem`}> {props.children}
{props.children} </section>
</section>
</>
) )
} }

View file

@ -1,11 +1,12 @@
import { $companyName, $copyRightYear } from "../../configs/config.site.ts"; import * as fs from 'node:fs'
import * as toml from 'toml'
const config = toml.parse(fs.readFileSync('configs/config.site.toml', 'utf8'))
export default () => { export default () => {
return ( return (
<> <span>
<span> Copyright © {config.copyright.year} {config.copyright.name} All Rights Reserved.
Copyright © {$copyRightYear.get()} {$companyName.get()} All Rights Reserved. </span>
</span>
</>
) )
} }

View file

@ -10,32 +10,30 @@ interface Props {
export default (props: Props) => { export default (props: Props) => {
return ( return (
<> <Switch>
<Switch> <Match when={props.desktop && !props.tablet && !props.mobile}>
<Match when={props.desktop && !props.tablet && !props.mobile}> <div class="on-desktop-only">{props.children}</div>
<div class="on-desktop-only">{props.children}</div> </Match>
</Match>
<Match when={!props.desktop && props.tablet && !props.mobile}> <Match when={!props.desktop && props.tablet && !props.mobile}>
<div class="on-tablet-only">{props.children}</div> <div class="on-tablet-only">{props.children}</div>
</Match> </Match>
<Match when={!props.desktop && !props.tablet && props.mobile}> <Match when={!props.desktop && !props.tablet && props.mobile}>
<div class="on-mobile-only">{props.children}</div> <div class="on-mobile-only">{props.children}</div>
</Match> </Match>
<Match when={props.desktop && props.tablet && !props.mobile}> <Match when={props.desktop && props.tablet && !props.mobile}>
<div class="on-desktop-tablet-only">{props.children}</div> <div class="on-desktop-tablet-only">{props.children}</div>
</Match> </Match>
<Match when={props.desktop && !props.tablet && props.mobile}> <Match when={props.desktop && !props.tablet && props.mobile}>
<div class="on-desktop-mobile-only">{props.children}</div> <div class="on-desktop-mobile-only">{props.children}</div>
</Match> </Match>
<Match when={!props.desktop && props.tablet && props.mobile}> <Match when={!props.desktop && props.tablet && props.mobile}>
<div class="on-tablet-mobile-only">{props.children}</div> <div class="on-tablet-mobile-only">{props.children}</div>
</Match> </Match>
</Switch> </Switch>
</>
) )
} }

View file

@ -35,11 +35,12 @@ export default (props: Props) => {
name="viewport" name="viewport"
content="width=device-width, initial-scale=1, viewport-fit=cover" content="width=device-width, initial-scale=1, viewport-fit=cover"
/> />
<meta name="name" content={props.name} /> <meta name="name" content={config.website.name} />
<meta name="description" content={props.description} /> <meta name="description" content={config.website.description} />
<meta name="title" property="og:title" content={props.name} /> <meta name="title" property="og:title" content={config.website.name} />
<meta name="keywords" content="HTML, CSS, JavaScript" /> <meta name="keywords" content="HTML, CSS, JavaScript" />
<meta name="developer" content={props.author} /> <meta name="developer" content={config.website.developer} />
<meta name="designer" content={config.website.designer} />
<meta property="og:description" content={props.description} /> <meta property="og:description" content={props.description} />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<link rel="icon" type="image/png" href="/favicon.png" /> <link rel="icon" type="image/png" href="/favicon.png" />

View file

@ -1,4 +1,4 @@
import { type JSXElement } from 'solid-js' import type { JSXElement } from 'solid-js'
interface Props { interface Props {
left: number left: number

View file

@ -0,0 +1,23 @@
import { consola } from "consola";
import sharp from "sharp";
(async () => {
try {
const inputSrc = 'src/images/background.png'
const webpOutput = "./@dasig/images/background.webp"
const avifOutput = "./@dasig/images/background.avif"
const avifBuffer = await sharp(inputSrc).avif({ quality: 60 }).resize(1920).toBuffer()
await sharp(avifBuffer).toFile(avifOutput)
consola.success('Background successfully optimized in Avif');
const webpBuffer = await sharp(inputSrc).webp({ quality: 75 }).resize(1920).toBuffer()
await sharp(webpBuffer).toFile(webpOutput)
consola.success('Background successfully optimized in Webp');
} catch (error: any) {
consola.error("Error optimizing background:", error);
if (error.message.includes("missing"))
consola.error(`${name} could not be found on image folder`);
}
})();

View file

@ -1,6 +1,6 @@
.box .dasig-box
padding: 1rem padding: 1rem
.curvedbox .dasig-curvedbox
@extend .box @extend .dasig-box
border-radius: 8px border-radius: 8px

View file

@ -2,6 +2,8 @@
name = "Dasig" name = "Dasig"
short_name = "Dasig" short_name = "Dasig"
description = "An architectural framework for pure speed fullstack development" description = "An architectural framework for pure speed fullstack development"
developer = "Pat Alcala"
designer = "Pat Alcala"
[font] [font]
name = "inter" name = "inter"