diff --git a/package-lock.json b/package-lock.json index df2cfef..d514a3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@onwidget/astrowind", - "version": "1.0.0-beta.47", + "version": "1.0.0-beta.49", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@onwidget/astrowind", - "version": "1.0.0-beta.47", + "version": "1.0.0-beta.49", "dependencies": { "@astrojs/rss": "^4.0.10", "@astrojs/sitemap": "^3.2.1", @@ -10782,4 +10782,4 @@ } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 526f059..1aba6da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@onwidget/astrowind", - "version": "1.0.0-beta.47", + "version": "1.0.0-beta.49", "description": "AstroWind: A free template using Astro 5.0 and Tailwind CSS. Astro starter theme.", "type": "module", "private": true, diff --git a/src/components/blog/GridItem.astro b/src/components/blog/GridItem.astro index cf7ed14..cd02fa8 100644 --- a/src/components/blog/GridItem.astro +++ b/src/components/blog/GridItem.astro @@ -17,7 +17,9 @@ const image = await findImage(post.image); const link = APP_BLOG?.post?.isEnabled ? getPermalink(post.permalink, 'post') : ''; --- -
+
{ image && diff --git a/src/components/blog/ListItem.astro b/src/components/blog/ListItem.astro index 3fef240..6a416d6 100644 --- a/src/components/blog/ListItem.astro +++ b/src/components/blog/ListItem.astro @@ -21,7 +21,9 @@ const image = (await findImage(post.image)) as ImageMetadata | undefined; const link = APP_BLOG?.post?.isEnabled ? getPermalink(post.permalink, 'post') : ''; --- -
+
{ image && (link ? ( diff --git a/src/components/blog/RelatedPosts.astro b/src/components/blog/RelatedPosts.astro index 8d55ecd..f4036e9 100644 --- a/src/components/blog/RelatedPosts.astro +++ b/src/components/blog/RelatedPosts.astro @@ -18,7 +18,10 @@ const relatedPosts = post.tags ? await getRelatedPosts(post, 4) : []; { APP_BLOG.isRelatedPostsEnabled ? (
-
+

diff --git a/src/components/common/BasicScripts.astro b/src/components/common/BasicScripts.astro index 4ee6a64..c7290b2 100644 --- a/src/components/common/BasicScripts.astro +++ b/src/components/common/BasicScripts.astro @@ -160,3 +160,96 @@ import { UI } from 'astrowind:config'; onPageShow(); }); + + diff --git a/src/components/common/Image.astro b/src/components/common/Image.astro index ada4f27..75ad9ad 100644 --- a/src/components/common/Image.astro +++ b/src/components/common/Image.astro @@ -41,15 +41,12 @@ const _image = await findImage(props.src); let image: ImageType | undefined = undefined; -if (typeof _image === 'string') { - if ((_image.startsWith('http://') || _image.startsWith('https://')) && isUnpicCompatible(_image)) { - image = await getImagesOptimized(_image, props, unpicOptimizer); - } else { - image = { - src: _image, - attributes: { ...props, src: undefined }, - }; - } +if ( + typeof _image === 'string' && + (_image.startsWith('http://') || _image.startsWith('https://')) && + isUnpicCompatible(_image) +) { + image = await getImagesOptimized(_image, props, unpicOptimizer); } else if (_image) { image = await getImagesOptimized(_image, props, astroAsseetsOptimizer); } diff --git a/src/components/ui/ItemGrid.astro b/src/components/ui/ItemGrid.astro index fe560a3..36ce071 100644 --- a/src/components/ui/ItemGrid.astro +++ b/src/components/ui/ItemGrid.astro @@ -33,7 +33,7 @@ const { )} > {items.map(({ title, description, icon, callToAction, classes: itemClasses = {} }) => ( -

+
{(icon || defaultIcon) && ( diff --git a/src/components/ui/ItemGrid2.astro b/src/components/ui/ItemGrid2.astro index 34a902e..d79ccbc 100644 --- a/src/components/ui/ItemGrid2.astro +++ b/src/components/ui/ItemGrid2.astro @@ -33,7 +33,13 @@ const { )} > {items.map(({ title, description, icon, callToAction, classes: itemClasses = {} }) => ( -
+
{(icon || defaultIcon) && ( )} diff --git a/src/components/ui/Timeline.astro b/src/components/ui/Timeline.astro index 8154604..73076aa 100644 --- a/src/components/ui/Timeline.astro +++ b/src/components/ui/Timeline.astro @@ -24,7 +24,13 @@ const { items && items.length && (
{items.map(({ title, description, icon, classes: itemClasses = {} }, index = 0) => ( -
+
diff --git a/src/components/ui/WidgetWrapper.astro b/src/components/ui/WidgetWrapper.astro index a53df1d..c42c751 100644 --- a/src/components/ui/WidgetWrapper.astro +++ b/src/components/ui/WidgetWrapper.astro @@ -22,7 +22,10 @@ const WrapperTag = as;
diff --git a/src/components/widgets/Footer.astro b/src/components/widgets/Footer.astro index 2b7fb6e..1e51d2a 100644 --- a/src/components/widgets/Footer.astro +++ b/src/components/widgets/Footer.astro @@ -28,7 +28,9 @@ const { socialLinks = [], secondaryLinks = [], links = [], footNote = '', theme