mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-11 10:46:07 +09:00
chore: updated imageMod and font settings
This commit is contained in:
+3
-1
@@ -23,7 +23,9 @@ function parseFontString(fontStr) {
|
||||
}
|
||||
}
|
||||
|
||||
return { name, weights };
|
||||
// remove + from font name and add space
|
||||
const cleanName = name.replace(/\+/g, " ");
|
||||
return { name: cleanName, weights };
|
||||
}
|
||||
|
||||
// Build fonts configuration from theme.json
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "astroplate",
|
||||
"version": "6.0.1",
|
||||
"version": "6.0.2",
|
||||
"description": "Astro and Tailwindcss boilerplate",
|
||||
"author": "zeon.studio",
|
||||
"license": "MIT",
|
||||
@@ -24,7 +24,7 @@
|
||||
"@astrojs/sitemap": "3.7.1",
|
||||
"@digi4care/astro-google-tagmanager": "^1.6.0",
|
||||
"@justinribeiro/lite-youtube": "^1.9.0",
|
||||
"astro": "6.0.2",
|
||||
"astro": "6.0.4",
|
||||
"astro-auto-import": "^0.5.1",
|
||||
"astro-swiper": "^2.2.1",
|
||||
"date-fns": "^4.1.0",
|
||||
@@ -39,13 +39,13 @@
|
||||
"remark-collapse": "^0.1.2",
|
||||
"remark-toc": "^9.0.0",
|
||||
"sharp": "^0.34.5",
|
||||
"vite": "^7.3.1"
|
||||
"vite": "^8.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/forms": "^0.5.11",
|
||||
"@tailwindcss/typography": "^0.5.19",
|
||||
"@tailwindcss/vite": "^4.2.1",
|
||||
"@types/node": "25.4.0",
|
||||
"@types/node": "25.5.0",
|
||||
"@types/react": "19.2.14",
|
||||
"@types/react-dom": "19.2.3",
|
||||
"concurrently": "^9.2.1",
|
||||
@@ -56,6 +56,6 @@
|
||||
"tailwind-bootstrap-grid": "^7.0.0",
|
||||
"tailwindcss": "^4.2.1",
|
||||
"typescript": "^5.9.3",
|
||||
"wrangler": "^4.72.0"
|
||||
"wrangler": "^4.73.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
</h2>
|
||||
|
||||
<p align=center>
|
||||
<a href="https://github.com/withastro/astro/releases/tag/astro%406.0.2">
|
||||
<img src="https://img.shields.io/static/v1?label=ASTRO&message=6.0.2&color=000&logo=astro" alt="Astro Version 6.0.2"/>
|
||||
<a href="https://github.com/withastro/astro/releases/tag/astro%406.0.4">
|
||||
<img src="https://img.shields.io/static/v1?label=ASTRO&message=6.0.4&color=000&logo=astro" alt="Astro Version 6.0.4"/>
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/zeon-studio/astroplate/blob/main/LICENSE">
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
### 📦 Dependencies
|
||||
|
||||
- astro v6.0.2
|
||||
- astro v6.0.4
|
||||
- node v22.12.0+ (see `.nvmrc`)
|
||||
- yarn v1.22+
|
||||
- tailwind v4+
|
||||
|
||||
@@ -11,12 +11,24 @@ interface Props {
|
||||
loading?: "eager" | "lazy" | null | undefined;
|
||||
decoding?: "async" | "auto" | "sync" | null | undefined;
|
||||
format?: "auto" | "avif" | "jpeg" | "png" | "svg" | "webp";
|
||||
fit?: "cover" | "contain" | "fill" | "none" | "scale-down";
|
||||
class?: string;
|
||||
style?: any;
|
||||
}
|
||||
|
||||
// Destructuring Astro.props to get the component's props
|
||||
let { src, alt, width, height, loading, decoding, class: className, format, style } = Astro.props;
|
||||
let {
|
||||
src,
|
||||
alt,
|
||||
width,
|
||||
height,
|
||||
loading,
|
||||
decoding,
|
||||
class: className,
|
||||
format,
|
||||
style,
|
||||
fit,
|
||||
} = Astro.props;
|
||||
|
||||
src = `/public${src}`;
|
||||
|
||||
@@ -28,7 +40,9 @@ const isValidPath = images[src] ? true : false;
|
||||
|
||||
// Log a warning message in red if the image is not found
|
||||
!isValidPath &&
|
||||
console.error(`\x1b[31mImage not found - ${src}.\x1b[0m Make sure the image is in the /public/images folder.`);
|
||||
console.error(
|
||||
`\x1b[31mImage not found - ${src}.\x1b[0m Make sure the image is in the /public/images folder.`,
|
||||
);
|
||||
---
|
||||
|
||||
{
|
||||
@@ -39,6 +53,7 @@ const isValidPath = images[src] ? true : false;
|
||||
width={width}
|
||||
height={height}
|
||||
loading={loading}
|
||||
fit={fit ? fit : "contain"}
|
||||
decoding={decoding}
|
||||
class={className}
|
||||
format={format}
|
||||
|
||||
Reference in New Issue
Block a user