Updated
This commit is contained in:
parent
cde344cb59
commit
b8a0d0179e
12 changed files with 70 additions and 44 deletions
|
|
@ -9,7 +9,7 @@ interface Props {
|
|||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
const boxClass = createMemo(() => (props.curved ? "curvedbox" : "box"));
|
||||
const boxClass = createMemo(() => (props.curved ? "dasig-curvedbox" : "dasig-box"));
|
||||
|
||||
return (
|
||||
<section
|
||||
|
|
|
|||
|
|
@ -9,10 +9,8 @@ interface Props {
|
|||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<section class={`column-${props.content || 'center'}`} style={`gap: ${props.gap}rem`}>
|
||||
{props.children}
|
||||
</section>
|
||||
</>
|
||||
<section class={`column-${props.content || 'center'}`} style={`gap: ${props.gap}rem`}>
|
||||
{props.children}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 () => {
|
||||
return (
|
||||
<>
|
||||
<span>
|
||||
Copyright © {$copyRightYear.get()} {$companyName.get()} All Rights Reserved.
|
||||
</span>
|
||||
</>
|
||||
<span>
|
||||
Copyright © {config.copyright.year} {config.copyright.name} All Rights Reserved.
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,32 +10,30 @@ interface Props {
|
|||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<Switch>
|
||||
<Match when={props.desktop && !props.tablet && !props.mobile}>
|
||||
<div class="on-desktop-only">{props.children}</div>
|
||||
</Match>
|
||||
<Switch>
|
||||
<Match when={props.desktop && !props.tablet && !props.mobile}>
|
||||
<div class="on-desktop-only">{props.children}</div>
|
||||
</Match>
|
||||
|
||||
<Match when={!props.desktop && props.tablet && !props.mobile}>
|
||||
<div class="on-tablet-only">{props.children}</div>
|
||||
</Match>
|
||||
<Match when={!props.desktop && props.tablet && !props.mobile}>
|
||||
<div class="on-tablet-only">{props.children}</div>
|
||||
</Match>
|
||||
|
||||
<Match when={!props.desktop && !props.tablet && props.mobile}>
|
||||
<div class="on-mobile-only">{props.children}</div>
|
||||
</Match>
|
||||
<Match when={!props.desktop && !props.tablet && props.mobile}>
|
||||
<div class="on-mobile-only">{props.children}</div>
|
||||
</Match>
|
||||
|
||||
<Match when={props.desktop && props.tablet && !props.mobile}>
|
||||
<div class="on-desktop-tablet-only">{props.children}</div>
|
||||
</Match>
|
||||
<Match when={props.desktop && props.tablet && !props.mobile}>
|
||||
<div class="on-desktop-tablet-only">{props.children}</div>
|
||||
</Match>
|
||||
|
||||
<Match when={props.desktop && !props.tablet && props.mobile}>
|
||||
<div class="on-desktop-mobile-only">{props.children}</div>
|
||||
</Match>
|
||||
<Match when={props.desktop && !props.tablet && props.mobile}>
|
||||
<div class="on-desktop-mobile-only">{props.children}</div>
|
||||
</Match>
|
||||
|
||||
<Match when={!props.desktop && props.tablet && props.mobile}>
|
||||
<div class="on-tablet-mobile-only">{props.children}</div>
|
||||
</Match>
|
||||
</Switch>
|
||||
</>
|
||||
<Match when={!props.desktop && props.tablet && props.mobile}>
|
||||
<div class="on-tablet-mobile-only">{props.children}</div>
|
||||
</Match>
|
||||
</Switch>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,11 +35,12 @@ export default (props: Props) => {
|
|||
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="name" content={config.website.name} />
|
||||
<meta name="description" content={config.website.description} />
|
||||
<meta name="title" property="og:title" content={config.website.name} />
|
||||
<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:type" content="website" />
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { type JSXElement } from 'solid-js'
|
||||
import type { JSXElement } from 'solid-js'
|
||||
|
||||
interface Props {
|
||||
left: number
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import * as toml from 'toml'
|
|||
try {
|
||||
const dirPath = path.resolve("./public");
|
||||
const config = toml.parse(fs.readFileSync("configs/config.site.toml", "utf8"));
|
||||
|
||||
|
||||
if (fs.existsSync(dirPath)) {
|
||||
const inputSrc = "./src/images/favicon.png";
|
||||
const favicon = dirPath + "/favicon.png";
|
||||
|
|
|
|||
23
frontend/@dasig/scripts/node/optimizeBackground.ts
Normal file
23
frontend/@dasig/scripts/node/optimizeBackground.ts
Normal 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`);
|
||||
}
|
||||
})();
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
.box
|
||||
.dasig-box
|
||||
padding: 1rem
|
||||
|
||||
.curvedbox
|
||||
@extend .box
|
||||
.dasig-curvedbox
|
||||
@extend .dasig-box
|
||||
border-radius: 8px
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
name = "Dasig"
|
||||
short_name = "Dasig"
|
||||
description = "An architectural framework for pure speed fullstack development"
|
||||
developer = "Pat Alcala"
|
||||
designer = "Pat Alcala"
|
||||
|
||||
[font]
|
||||
name = "inter"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue