From 00b7d9270f074c2c0446f331bb07292ef48ed84c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20B?= <54446028+prototypa@users.noreply.github.com> Date: Fri, 4 Oct 2024 03:44:56 -0400 Subject: [PATCH 01/12] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3cdaefb..f00bb9f 100644 --- a/README.md +++ b/README.md @@ -146,8 +146,8 @@ All commands are run from the root of the project, from a terminal: | `npm run dev` | Starts local dev server at `localhost:3000` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | -| `npm run format` | Format codes with Prettier | -| `npm run lint:eslint` | Run Eslint | +| `npm run check` | Check your project for errors | +| `npm run fix` | Run Eslint and format codes with Prettier | | `npm run astro ...` | Run CLI commands like `astro add`, `astro preview` |
From 04f3ba30afeeaabb3b9e9d7397a1660941dda8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20B?= <54446028+prototypa@users.noreply.github.com> Date: Fri, 4 Oct 2024 03:47:07 -0400 Subject: [PATCH 02/12] Fix format --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f00bb9f..27142cb 100644 --- a/README.md +++ b/README.md @@ -140,15 +140,15 @@ Any static assets, like images, can be placed in the `public/` directory if they All commands are run from the root of the project, from a terminal: -| Command | Action | -| :-------------------- | :------------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run check` | Check your project for errors | -| `npm run fix` | Run Eslint and format codes with Prettier | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro preview` | +| Command | Action | +| :------------------ | :------------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | +| `npm run check` | Check your project for errors | +| `npm run fix` | Run Eslint and format codes with Prettier | +| `npm run astro ...` | Run CLI commands like `astro add`, `astro preview` |
From c1f345181e3ffa316ecf9db2dfca890a254eae4e Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Tue, 8 Oct 2024 19:18:49 +0800 Subject: [PATCH 03/12] fix(config): resolve tailwind styles loss in bun environment Change the export syntax in tailwind.config.js from CommonJS to ES modules. This modification fixes the issue of missing Tailwind CSS styles when running the application with bun. Signed-off-by: Ivan Li --- tailwind.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tailwind.config.js b/tailwind.config.js index 32b3139..8606ce3 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,7 +1,7 @@ import defaultTheme from 'tailwindcss/defaultTheme'; import typographyPlugin from '@tailwindcss/typography'; -module.exports = { +export default { content: ['./src/**/*.{astro,html,js,jsx,json,md,mdx,svelte,ts,tsx,vue}'], theme: { extend: { From 21830b3d58b06f8f13b9c946facdad531c6e061e Mon Sep 17 00:00:00 2001 From: prototypa Date: Thu, 10 Oct 2024 01:51:32 -0400 Subject: [PATCH 04/12] Fix issue #530: Image Optimization for remote Images does not work --- src/components/common/Image.astro | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) 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); } From 37916f72537fa23e74fcbb431c76399aa786a668 Mon Sep 17 00:00:00 2001 From: prototypa Date: Thu, 10 Oct 2024 02:05:33 -0400 Subject: [PATCH 05/12] Fix issue #490: characters in header cannot be displayed horizontally --- src/components/widgets/Header.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/widgets/Header.astro b/src/components/widgets/Header.astro index 608e1b8..2952831 100644 --- a/src/components/widgets/Header.astro +++ b/src/components/widgets/Header.astro @@ -90,7 +90,7 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`;
  • {links?.length ? ( <> - @@ -113,7 +113,7 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`; ) : ( Date: Thu, 10 Oct 2024 02:22:28 -0400 Subject: [PATCH 06/12] Fix prettier styles --- src/components/widgets/Header.astro | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/widgets/Header.astro b/src/components/widgets/Header.astro index 2952831..ff4a3aa 100644 --- a/src/components/widgets/Header.astro +++ b/src/components/widgets/Header.astro @@ -90,7 +90,10 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`;
  • {links?.length ? ( <> - From 38db18b05bf38580d0c9e4e094b88df331c9642a Mon Sep 17 00:00:00 2001 From: prototypa Date: Sun, 13 Oct 2024 03:33:40 -0400 Subject: [PATCH 07/12] Add basic animation --- src/components/blog/GridItem.astro | 4 +- src/components/blog/ListItem.astro | 4 +- src/components/blog/RelatedPosts.astro | 5 +- src/components/blog/SinglePost.astro | 6 +- src/components/common/BasicScripts.astro | 119 ++++++++++++++++++++++ src/components/ui/ItemGrid.astro | 2 +- src/components/ui/ItemGrid2.astro | 8 +- src/components/ui/Timeline.astro | 8 +- src/components/ui/WidgetWrapper.astro | 5 +- src/components/widgets/Footer.astro | 4 +- src/components/widgets/Hero.astro | 19 +++- src/components/widgets/Hero2.astro | 17 +++- src/components/widgets/HeroText.astro | 17 +++- src/components/widgets/Pricing.astro | 2 +- src/components/widgets/Stats.astro | 2 +- src/components/widgets/Testimonials.astro | 2 +- tailwind.config.js | 19 +++- 17 files changed, 216 insertions(+), 27 deletions(-) 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..f1ce6b6 100644 --- a/src/components/common/BasicScripts.astro +++ b/src/components/common/BasicScripts.astro @@ -160,3 +160,122 @@ import { UI } from 'astrowind:config'; onPageShow(); }); + + 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