Source Sets

This commit is contained in:
Firq 2024-10-22 20:45:39 +02:00
parent 564e902b69
commit 9ad6d95889
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
8 changed files with 10 additions and 9 deletions

View file

@ -20,7 +20,7 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: https://code.forgejo.org/actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v3
- name: Run unlighthouse - name: Run unlighthouse
run: unlighthouse-ci --site "http://localhost:8081/" --disable-dynamic-sampling run: unlighthouse-ci --site "http://localhost:8081/"
- name: Prepare artifacts - name: Prepare artifacts
run: cp serve.json unlighthouse-reports run: cp serve.json unlighthouse-reports
- name: Upload reports - name: Upload reports

View file

@ -1,7 +1,7 @@
{ {
"name": "@firq/fgosite", "name": "@firq/fgosite",
"type": "module", "type": "module",
"version": "0.2.0-pre.14", "version": "0.2.0-pre.15",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "astro dev", "dev": "astro dev",

View file

@ -20,7 +20,7 @@ const mlb_image = mlb ? 'mlbalign' : 'hidemlb'
<article> <article>
<div> <div>
<Image src={loadedCEImage} alt={name} class="ce-crop" /> <Image src={loadedCEImage} widths={[85, 128]} sizes={"(max-width: 512px) 85px, 128px"} quality={100} alt={name} class="ce-crop" />
</div> </div>
<div class={mlb_image}> <div class={mlb_image}>
<Image src={mlb_ce} alt="Max-limit broken" class="mlb" /> <Image src={mlb_ce} alt="Max-limit broken" class="mlb" />

View file

@ -25,7 +25,7 @@ const loadedImage = plsLoadImage(images, imagePath)
aria-label=`${name} - new window` aria-label=`${name} - new window`
> >
<div class="heading">{name}</div> <div class="heading">{name}</div>
<Image src={loadedImage} alt={name} loading={'eager'}/> <Image src={loadedImage} widths={[256, 512]} sizes={"(max-width: 512px) 256px, 512px"} quality={100} alt={name} loading={'eager'}/>
<h2 class="subtext"> <h2 class="subtext">
{origin} {origin}
</h2> </h2>

View file

@ -30,14 +30,14 @@ if (bond10 === false) {
--- ---
<article> <article>
<Image src={loadedServantImage} alt={name} /> <Image src={loadedServantImage} widths={[90, 256]} sizes={"(max-width: 512px) 90px, 256px"} quality={100} alt={name} />
<h2 class="subtext"> <h2 class="subtext">
Level {level}<br /> Level {level}<br />
{skills}<br /> {skills}<br />
NP {np} NP {np}
</h2> </h2>
<div class="expand-on-hover"> <div class="expand-on-hover">
<Image src={loadedBondCEImage} alt="" class={bondce_css}/> <Image src={loadedBondCEImage} widths={[106, 150]} sizes={"(max-width: 512px) 106px, 150px"} quality={100} alt="" class={bondce_css}/>
<h2 class="subtext">Mana Loading: {ml === 'Not Unlocked' && <br />}{ml}</h2> <h2 class="subtext">Mana Loading: {ml === 'Not Unlocked' && <br />}{ml}</h2>
</div> </div>
</article> </article>

View file

@ -44,7 +44,7 @@ if (user !== undefined) {
<a href={link} target="_blank" rel="noopener noreferrer" aria-label={title}> <a href={link} target="_blank" rel="noopener noreferrer" aria-label={title}>
<article> <article>
<Image src={loadedTargetImage} alt={title} class="icon" /> <Image src={loadedTargetImage} widths={[112, 128]} sizes={"(max-width: 512px) 112px, 128px"} quality={100} alt={title} class="icon" />
<div class="title"> <div class="title">
<h2>{title}</h2> <h2>{title}</h2>
</div> </div>

View file

@ -1,4 +1,4 @@
export function plsLoadImage(record: Record<string, () => Promise<{default: ImageMetadata}>>, path: string) { export async function plsLoadImage(record: Record<string, () => Promise<{default: ImageMetadata}>>, path: string) {
const loadedImage = record[path]?.(); const loadedImage = record[path]?.();
if (!loadedImage) throw new Error("Asset was not found:" + path); if (!loadedImage) throw new Error("Asset was not found:" + path);
return loadedImage; return loadedImage;

View file

@ -10,12 +10,13 @@ export default {
}, },
ci: { ci: {
budget: 50, budget: 50,
buildStatic: true buildStatic: true,
}, },
scanner: { scanner: {
device: 'mobile', device: 'mobile',
sitemap: true, sitemap: true,
throttle: false, throttle: false,
dynamicSampling: false,
}, },
outputPath: "unlighthouse-reports", outputPath: "unlighthouse-reports",
} }