Updated
This commit is contained in:
parent
8e724b166a
commit
b5e92165c8
33 changed files with 82 additions and 223 deletions
|
|
@ -1,17 +0,0 @@
|
||||||
import sharp from 'sharp'
|
|
||||||
|
|
||||||
const convertBackground = async () => {
|
|
||||||
const inputSrc = 'src/assets/images/background.png'
|
|
||||||
const webpOutput = 'fwt/images/background.webp'
|
|
||||||
const avifOutput = 'fwt/images/background.avif'
|
|
||||||
|
|
||||||
const avifBuffer = await sharp(inputSrc).avif({ quality: 60 }).resize(1920).toBuffer()
|
|
||||||
await sharp(avifBuffer).toFile(avifOutput)
|
|
||||||
|
|
||||||
const webpBuffer = await sharp(inputSrc).webp({ quality: 75 }).resize(1920).toBuffer()
|
|
||||||
await sharp(webpBuffer).toFile(webpOutput)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default () => {
|
|
||||||
convertBackground()
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
import sharp from 'sharp'
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
src: string
|
|
||||||
size?: number
|
|
||||||
}
|
|
||||||
|
|
||||||
const convertImage = async (props: Props) => {
|
|
||||||
const avifOutputPath = `fwt/images/${props.src.split('.').slice(0, -1).join('.')}.avif`
|
|
||||||
const webpOutputPath = `fwt/images/${props.src.split('.').slice(0, -1).join('.')}.webp`
|
|
||||||
|
|
||||||
const avifBuffer = await sharp(`src/assets/images/${props.src}`).avif({ quality: 60 }).resize(props.size).toBuffer()
|
|
||||||
await sharp(avifBuffer).toFile(avifOutputPath)
|
|
||||||
|
|
||||||
const webpBuffer = await sharp(`src/assets/images/${props.src}`).webp({ quality: 75 }).resize(props.size).toBuffer()
|
|
||||||
await sharp(webpBuffer).toFile(webpOutputPath)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default (props: Props) => {
|
|
||||||
convertImage(props)
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
import sharp from 'sharp'
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
size?: number
|
|
||||||
favicon?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
const convertLogo = async (props: Props) => {
|
|
||||||
const inputSrc = 'src/assets/images/logo.png'
|
|
||||||
const webpImage = 'fwt/images/logo.webp'
|
|
||||||
const avifImage = 'fwt/images/logo.avif'
|
|
||||||
|
|
||||||
const avifBuffer = await sharp(inputSrc).avif({ quality: 60 }).resize(props.size).toBuffer()
|
|
||||||
await sharp(avifBuffer).toFile(avifImage)
|
|
||||||
|
|
||||||
const webpBuffer = await sharp(inputSrc).webp({ quality: 75 }).resize(props.size).toBuffer()
|
|
||||||
await sharp(webpBuffer).toFile(webpImage)
|
|
||||||
}
|
|
||||||
|
|
||||||
const generateFavicon = async (props: Props) => {
|
|
||||||
const inputSrc = 'src/assets/images/logo.png'
|
|
||||||
const favicon = 'public/favicon.png'
|
|
||||||
|
|
||||||
const faviconBuffer = await sharp(inputSrc).png({ quality: 90 }).resize(50).toBuffer()
|
|
||||||
await sharp(faviconBuffer).toFile(favicon)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default (props: Props) => {
|
|
||||||
convertLogo(props)
|
|
||||||
|
|
||||||
if (props.favicon) {
|
|
||||||
generateFavicon(props)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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 class={boxClass()} style={{ border: `${props.thickness}px solid ${props.color || 'white'}` }}>
|
<section class={boxClass()} style={{ border: `${props.thickness}px solid ${props.color || 'white'}` }}>
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ export default (props: Props) => {
|
||||||
</Match>
|
</Match>
|
||||||
<Match when={!props.design}>
|
<Match when={!props.design}>
|
||||||
<a href={props.to} aria-label={props.label} rel="noopener" target={props.newtab ? '_blank' : '_self'} data-astro-prefetch>
|
<a href={props.to} aria-label={props.label} rel="noopener" target={props.newtab ? '_blank' : '_self'} data-astro-prefetch>
|
||||||
<button class="button" style={borderRadius}>
|
<button class="dasig-button" style={borderRadius}>
|
||||||
{props.label || 'Click Me!'}
|
{props.label || 'Click Me!'}
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -65,13 +65,13 @@ export default (props: Props) => {
|
||||||
</Match>
|
</Match>
|
||||||
<Match when={!props.design}>
|
<Match when={!props.design}>
|
||||||
<Show when={props.submit}>
|
<Show when={props.submit}>
|
||||||
<button class="button" type="submit" style={borderRadius}>
|
<button class="dasig-button" type="submit" style={borderRadius}>
|
||||||
{props.label || 'Click Me!'}
|
{props.label || 'Click Me!'}
|
||||||
</button>
|
</button>
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
<Show when={!props.submit}>
|
<Show when={!props.submit}>
|
||||||
<button class="button" onClick={props.onClick} style={borderRadius}>
|
<button class="dasig-button" onClick={props.onClick} style={borderRadius}>
|
||||||
{props.label || 'Click Me!'}
|
{props.label || 'Click Me!'}
|
||||||
</button>
|
</button>
|
||||||
</Show>
|
</Show>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ 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={`dasig-column-${props.content || 'center'}`} style={`gap: ${props.gap}rem`}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</section>
|
</section>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ interface Props {
|
||||||
export default (props: Props) => {
|
export default (props: Props) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<footer class="footer">
|
<footer class="dasig-footer">
|
||||||
<small>{props.children}</small>
|
<small>{props.children}</small>
|
||||||
</footer>
|
</footer>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,10 @@ interface Props {
|
||||||
|
|
||||||
export default (props: Props) => {
|
export default (props: Props) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<picture>
|
||||||
<picture>
|
<source srcset={props.avif} type="image/avif" />
|
||||||
<source srcset={props.avif} type="image/avif" />
|
<source srcset={props.webp} type="image/webp" />
|
||||||
<source srcset={props.webp} type="image/webp" />
|
<img style={`border-radius: ${props.radius}rem`} width={props.size} height="auto" decoding="async" loading="lazy" alt={props.alt} />
|
||||||
<img style={`border-radius: ${props.radius}rem`} width={props.size} height="auto" decoding="async" loading="lazy" alt={props.alt} />
|
</picture>
|
||||||
</picture>
|
|
||||||
</>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ export default (props: Props) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<input class="input" type="text" placeholder={props.placeholder} value={inputValue()} onInput={handleChange} />
|
<input class="dasig-input" type="text" placeholder={props.placeholder} value={inputValue()} onInput={handleChange} />
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { type JSXElement } from 'solid-js'
|
import type { JSXElement } from 'solid-js'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
left: number
|
left: number
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { Show } from 'solid-js'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children?: any
|
children?: any
|
||||||
alignment?: 'row' | 'column'
|
alignment?: 'dasig-page-row' | 'dasig-page-column'
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (props: Props) => {
|
export default (props: Props) => {
|
||||||
|
|
@ -13,7 +13,7 @@ export default (props: Props) => {
|
||||||
<main class={props.alignment}>{props.children}</main>
|
<main class={props.alignment}>{props.children}</main>
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={!props.alignment}>
|
<Show when={!props.alignment}>
|
||||||
<main class="page">{props.children}</main>
|
<main class="dasig-page">{props.children}</main>
|
||||||
</Show>
|
</Show>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,13 @@ export default (props: Props) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Show when={props.gap}>
|
<Show when={props.gap}>
|
||||||
<section class={`row-${props.content || 'center'}`} style={`gap: ${props.gap}rem`}>
|
<section class={`dasig-row-${props.content || 'center'}`} style={`gap: ${props.gap}rem`}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</section>
|
</section>
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
<Show when={!props.gap}>
|
<Show when={!props.gap}>
|
||||||
<section class={`row-${props.content || 'center'}`}>{props.children}</section>
|
<section class={`dasig-row-${props.content || 'center'}`}>{props.children}</section>
|
||||||
</Show>
|
</Show>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
BIN
@dasig/images/logo.avif
Normal file
BIN
@dasig/images/logo.avif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
BIN
@dasig/images/logo.webp
Normal file
BIN
@dasig/images/logo.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
|
|
@ -16,6 +16,6 @@ export { default as Display } from './components/Display'
|
||||||
export { default as Padding } from './components/Padding'
|
export { default as Padding } from './components/Padding'
|
||||||
export { default as Modal } from './components/Modal'
|
export { default as Modal } from './components/Modal'
|
||||||
|
|
||||||
export { default as OptimizeBackground } from './Optimizers/OptimizeBackground'
|
// export { default as OptimizeBackground } from './Optimizers/OptimizeBackground'
|
||||||
export { default as OptimizeImage } from './Optimizers/OptimizeImage'
|
// export { default as OptimizeImage } from './Optimizers/OptimizeImage'
|
||||||
export { default as OptimizeLogo } from './Optimizers/OptimizeLogo'
|
// export { default as OptimizeLogo } from './Optimizers/OptimizeLogo'
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ try {
|
||||||
const config = toml.parse(fs.readFileSync("configs/config.site.toml", "utf8"));
|
const config = toml.parse(fs.readFileSync("configs/config.site.toml", "utf8"));
|
||||||
|
|
||||||
if (fs.existsSync(dirPath)) {
|
if (fs.existsSync(dirPath)) {
|
||||||
const inputSrc = "./src/assets/images/favicon.png";
|
const inputSrc = "./src/images/favicon.png";
|
||||||
const favicon = dirPath + "/favicon.png";
|
const favicon = dirPath + "/favicon.png";
|
||||||
const chrome192 = dirPath + "/android-chrome-192x192.png";
|
const chrome192 = dirPath + "/android-chrome-192x192.png";
|
||||||
const chrome512 = dirPath + "/android-chrome-512x512.png";
|
const chrome512 = dirPath + "/android-chrome-512x512.png";
|
||||||
|
|
|
||||||
23
@dasig/scripts/node/optimizeBackground.ts
Normal file
23
@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`);
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
@ -26,14 +26,14 @@ import { hideBin } from "yargs/helpers";
|
||||||
const avifOutputPath = `./@dasig/images/${name.toString().split(".").slice(0, -1).join(".")}.avif`;
|
const avifOutputPath = `./@dasig/images/${name.toString().split(".").slice(0, -1).join(".")}.avif`;
|
||||||
const webpOutputPath = `./@dasig/images/${name.toString().split(".").slice(0, -1).join(".")}.webp`;
|
const webpOutputPath = `./@dasig/images/${name.toString().split(".").slice(0, -1).join(".")}.webp`;
|
||||||
|
|
||||||
const avifBuffer = await sharp(`./src/assets/images/${name}`)
|
const avifBuffer = await sharp(`./src/images/${name}`)
|
||||||
.avif({ quality: 60 })
|
.avif({ quality: 60 })
|
||||||
.resize(size)
|
.resize(size)
|
||||||
.toBuffer();
|
.toBuffer();
|
||||||
await sharp(avifBuffer).toFile(avifOutputPath);
|
await sharp(avifBuffer).toFile(avifOutputPath);
|
||||||
consola.success(`${name} successfully optimized in Avif`);
|
consola.success(`${name} successfully optimized in Avif`);
|
||||||
|
|
||||||
const webpBuffer = await sharp(`./src/assets/images/${name}`)
|
const webpBuffer = await sharp(`./src/images/${name}`)
|
||||||
.webp({ quality: 75 })
|
.webp({ quality: 75 })
|
||||||
.resize(size)
|
.resize(size)
|
||||||
.toBuffer();
|
.toBuffer();
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import { hideBin } from "yargs/helpers";
|
||||||
try {
|
try {
|
||||||
const webpImage = "./@dasig/images/logo.webp";
|
const webpImage = "./@dasig/images/logo.webp";
|
||||||
const avifImage = "./@dasig/images/logo.avif";
|
const avifImage = "./@dasig/images/logo.avif";
|
||||||
const inputSrc = "./src/assets/images/logo.png";
|
const inputSrc = "./src/images/logo.png";
|
||||||
|
|
||||||
const avifBuffer = await sharp(inputSrc)
|
const avifBuffer = await sharp(inputSrc)
|
||||||
.avif({ quality: 60 })
|
.avif({ quality: 60 })
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ $bootstrapInfo: rgb(49, 210, 242)
|
||||||
$bootstrapLight: rgb(211, 212, 213)
|
$bootstrapLight: rgb(211, 212, 213)
|
||||||
$bootstrapDark: rgb(33, 37, 41)
|
$bootstrapDark: rgb(33, 37, 41)
|
||||||
|
|
||||||
.button
|
.dasig-button
|
||||||
background-color: $primaryColor
|
background-color: $primaryColor
|
||||||
border: none
|
border: none
|
||||||
color: white
|
color: white
|
||||||
|
|
@ -56,7 +56,7 @@ $bootstrapDark: rgb(33, 37, 41)
|
||||||
transform: scale(0.95)
|
transform: scale(0.95)
|
||||||
|
|
||||||
.bu-primary
|
.bu-primary
|
||||||
@extend .button
|
@extend .dasig-button
|
||||||
font-family: fonts.$Inter
|
font-family: fonts.$Inter
|
||||||
background-color: $bulmaPrimary
|
background-color: $bulmaPrimary
|
||||||
color: $bulmaPrimaryText
|
color: $bulmaPrimaryText
|
||||||
|
|
@ -145,7 +145,7 @@ $bootstrapDark: rgb(33, 37, 41)
|
||||||
text-decoration: underline
|
text-decoration: underline
|
||||||
|
|
||||||
.bo-primary
|
.bo-primary
|
||||||
@extend .button
|
@extend .dasig-button
|
||||||
font-family: 'Segoe UI', fonts.$Roboto
|
font-family: 'Segoe UI', fonts.$Roboto
|
||||||
background-color: $bootstrapPrimary
|
background-color: $bootstrapPrimary
|
||||||
color: $bootstrapTextLight
|
color: $bootstrapTextLight
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
.column-top
|
.dasig-column-top
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
align-items: center
|
align-items: center
|
||||||
align-content: center
|
align-content: center
|
||||||
|
|
||||||
.column-center
|
.dasig-column-center
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
align-items: center
|
align-items: center
|
||||||
align-content: center
|
align-content: center
|
||||||
|
|
||||||
.column-right
|
.dasig-column-right
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
align-items: center
|
align-items: center
|
||||||
align-content: center
|
align-content: center
|
||||||
|
|
||||||
.column-split
|
.dasig-column-split
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
align-items: center
|
align-items: center
|
||||||
align-content: center
|
align-content: center
|
||||||
|
|
||||||
.column-spaced
|
.dasig-column-spaced
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
@use '../../configs/design/sizes' as view
|
@use '../../configs/design/sizes' as view
|
||||||
|
|
||||||
.footer
|
.dasig-footer
|
||||||
padding: 1rem 0
|
padding: 1rem 0
|
||||||
margin: 0 2rem
|
margin: 0 2rem
|
||||||
position: fixed
|
position: fixed
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
.input
|
.dasig-input
|
||||||
font-size: 1rem
|
font-size: 1rem
|
||||||
padding: 0.5rem 1rem
|
padding: 0.5rem 1rem
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
.page
|
.dasig-page
|
||||||
margin: 2rem
|
margin: 2rem
|
||||||
height: auto
|
height: auto
|
||||||
min-height: 90vh
|
min-height: 90vh
|
||||||
|
|
||||||
.column
|
.dasig-page-column
|
||||||
@extend .page
|
@extend .dasig-page
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
|
|
||||||
.row
|
.dasig-page-row
|
||||||
@extend .column
|
@extend .dasig-page
|
||||||
flex-direction: row
|
flex-direction: row
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
.row-left
|
.dasig-row-left
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: row
|
flex-direction: row
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
align-items: center
|
align-items: center
|
||||||
align-content: center
|
align-content: center
|
||||||
|
|
||||||
.row-center
|
.dasig-row-center
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: row
|
flex-direction: row
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
align-items: center
|
align-items: center
|
||||||
align-content: center
|
align-content: center
|
||||||
|
|
||||||
.row-right
|
.dasig-row-right
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: row
|
flex-direction: row
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
align-items: center
|
align-items: center
|
||||||
align-content: center
|
align-content: center
|
||||||
|
|
||||||
.row-split
|
.dasig-row-split
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: row
|
flex-direction: row
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
align-items: center
|
align-items: center
|
||||||
align-content: center
|
align-content: center
|
||||||
|
|
||||||
.row-spaced
|
.dasig-row-spaced
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: row
|
flex-direction: row
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
align-items: center
|
align-items: center
|
||||||
align-content: center
|
align-content: center
|
||||||
|
|
||||||
.row-even
|
.dasig-row-even
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: row
|
flex-direction: row
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
|
||||||
3
Makefile
3
Makefile
|
|
@ -26,3 +26,6 @@ logo:
|
||||||
|
|
||||||
image:
|
image:
|
||||||
node ./@dasig/scripts/node/optimizeImage.ts --name $(name) --size $(size)
|
node ./@dasig/scripts/node/optimizeImage.ts --name $(name) --size $(size)
|
||||||
|
|
||||||
|
background:
|
||||||
|
node ./@dasig/scripts/node/optimizeBackground.ts
|
||||||
|
|
|
||||||
101
README.md
101
README.md
|
|
@ -1,100 +1,7 @@
|
||||||

|
<div align=center>
|
||||||
|
|
||||||
# Fast WebApp Template
|
# DASIG - ASTRO
|
||||||
|
|
||||||
## How to Use
|
An architecture framework for pure speed static website developemnt
|
||||||
|
|
||||||
#### Clone the Repo
|
</div>
|
||||||
|
|
||||||
```
|
|
||||||
git clone --depth 1 https://git.patalcala.com/patalcala9/fwt.git <project-name>
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Navigate to the project
|
|
||||||
|
|
||||||
```
|
|
||||||
cd <project-name>
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Refresh GIT
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo rm -rf .git
|
|
||||||
git init
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Install Depedencies
|
|
||||||
|
|
||||||
```
|
|
||||||
pnpm install
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Make sure to update the dependencies first
|
|
||||||
|
|
||||||
```
|
|
||||||
pnpm update
|
|
||||||
```
|
|
||||||
|
|
||||||
## To Use Background
|
|
||||||
|
|
||||||
Place your background image in `assets/images/background.avif` or `assets/images/background.webp`.
|
|
||||||
|
|
||||||
Then, enable by adding `<Background image />` or `<Background color="#123456">`
|
|
||||||
|
|
||||||
## How to Run
|
|
||||||
|
|
||||||
```
|
|
||||||
pnpm dev
|
|
||||||
```
|
|
||||||
|
|
||||||
## How to Deploy
|
|
||||||
|
|
||||||
### Standard
|
|
||||||
|
|
||||||
```
|
|
||||||
pnpm build
|
|
||||||
```
|
|
||||||
|
|
||||||
### Docker
|
|
||||||
|
|
||||||
#### Edit name and port on docker-compose.yml
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo vim docker-compose.yml
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Run Docker Compose
|
|
||||||
|
|
||||||
```
|
|
||||||
docker compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
### Podman
|
|
||||||
|
|
||||||
#### Run Podman Compose
|
|
||||||
|
|
||||||
```
|
|
||||||
podman-compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
### Podman Quadlet
|
|
||||||
|
|
||||||
#### Edit Quadlet Container
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo vim quadlet/quadlet.container
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Copy and Rename the Quadlet to proper directory
|
|
||||||
|
|
||||||
```
|
|
||||||
mkdir -p ~/.config/containers/systemd/
|
|
||||||
sudo cp quadlet/quadlet.container ~/.config/containers/systemd/<name>.container
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Start at Systemd
|
|
||||||
|
|
||||||
```
|
|
||||||
systemctl --user daemon-reload
|
|
||||||
systemctl --user start <name>
|
|
||||||
```
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=FWT
|
Description=DASIG-ASTRO
|
||||||
|
|
||||||
[Container]
|
[Container]
|
||||||
ContainerName=fwt
|
ContainerName=dasig-astro
|
||||||
Image=localhost/fwt
|
Image=localhost/dasig-astro
|
||||||
PublishPort=8080:8080
|
PublishPort=4321:4321
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
|
||||||
BIN
src/images/background.png
Normal file
BIN
src/images/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 MiB |
BIN
src/images/favicon.png
Normal file
BIN
src/images/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
src/images/logo.png
Normal file
BIN
src/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
src/images/sample.png
Normal file
BIN
src/images/sample.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
Loading…
Add table
Add a link
Reference in a new issue