diff --git a/src/components/astro/utils/BasicScripts.astro b/src/components/core/BasicScripts.astro similarity index 100% rename from src/components/astro/utils/BasicScripts.astro rename to src/components/core/BasicScripts.astro diff --git a/src/components/astro/utils/MetaTags.astro b/src/components/core/MetaTags.astro similarity index 68% rename from src/components/astro/utils/MetaTags.astro rename to src/components/core/MetaTags.astro index ea45d63..8e5f1c6 100644 --- a/src/components/astro/utils/MetaTags.astro +++ b/src/components/core/MetaTags.astro @@ -4,16 +4,16 @@ import { getImage } from "@astrojs/image"; const { src: defaultImage } = await getImage({ src: import("~/assets/images/default.png"), width: 1200, - height: 628 + height: 628, }); const { title = "AstroWind", description = "", image = defaultImage, + canonical, } = Astro.props; -const canonicalURL = new URL(Astro.url.pathname, Astro.site); const absoluteImageUrl = new URL(image, Astro.site); --- @@ -23,7 +23,7 @@ const absoluteImageUrl = new URL(image, Astro.site); {title} - +{canonical && } @@ -31,23 +31,27 @@ const absoluteImageUrl = new URL(image, Astro.site); - +{canonical && } +{canonical && } - - - - + - + diff --git a/src/components/astro/utils/Picture.astro b/src/components/core/Picture.astro similarity index 63% rename from src/components/astro/utils/Picture.astro rename to src/components/core/Picture.astro index 7868d67..e744ba1 100644 --- a/src/components/astro/utils/Picture.astro +++ b/src/components/core/Picture.astro @@ -14,21 +14,28 @@ const { ...attrs } = Astro.props; -const { image, sources } = await getPicture({ - src, - widths, - formats, - aspectRatio, -}); +const { image, sources = [] } = + !src ? { image: {}} + : (typeof src === "string" + ? { image: { src } } + : + await getPicture({ + src, + widths, + formats, + aspectRatio, + })) --- +{ (src || !image) && {sources.map((attrs) => )} +} + \ No newline at end of file diff --git a/src/components/astro/icons/IconArrowDownRight.astro b/src/components/icons/IconArrowDownRight.astro similarity index 100% rename from src/components/astro/icons/IconArrowDownRight.astro rename to src/components/icons/IconArrowDownRight.astro diff --git a/src/components/astro/icons/IconArrowRight.astro b/src/components/icons/IconArrowRight.astro similarity index 100% rename from src/components/astro/icons/IconArrowRight.astro rename to src/components/icons/IconArrowRight.astro diff --git a/src/components/astro/icons/IconFacebook.astro b/src/components/icons/IconFacebook.astro similarity index 100% rename from src/components/astro/icons/IconFacebook.astro rename to src/components/icons/IconFacebook.astro diff --git a/src/components/astro/icons/IconGithub.astro b/src/components/icons/IconGithub.astro similarity index 100% rename from src/components/astro/icons/IconGithub.astro rename to src/components/icons/IconGithub.astro diff --git a/src/components/astro/icons/IconInstagram.astro b/src/components/icons/IconInstagram.astro similarity index 100% rename from src/components/astro/icons/IconInstagram.astro rename to src/components/icons/IconInstagram.astro diff --git a/src/components/astro/icons/IconMenu.astro b/src/components/icons/IconMenu.astro similarity index 100% rename from src/components/astro/icons/IconMenu.astro rename to src/components/icons/IconMenu.astro diff --git a/src/components/astro/icons/IconSun.astro b/src/components/icons/IconSun.astro similarity index 100% rename from src/components/astro/icons/IconSun.astro rename to src/components/icons/IconSun.astro diff --git a/src/components/astro/icons/IconTwitter.astro b/src/components/icons/IconTwitter.astro similarity index 100% rename from src/components/astro/icons/IconTwitter.astro rename to src/components/icons/IconTwitter.astro diff --git a/src/components/astro/icons/index.js b/src/components/icons/index.js similarity index 100% rename from src/components/astro/icons/index.js rename to src/components/icons/index.js diff --git a/src/components/react/.gitkeep b/src/components/react/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/svelte/.gitkeep b/src/components/svelte/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/astro/ctas/BasicCTA.astro b/src/components/widgets/BasicCTA.astro similarity index 58% rename from src/components/astro/ctas/BasicCTA.astro rename to src/components/widgets/BasicCTA.astro index 1c27317..bd5cd8d 100644 --- a/src/components/astro/ctas/BasicCTA.astro +++ b/src/components/widgets/BasicCTA.astro @@ -5,17 +5,24 @@ const {} = Astro.props;
-
-

- Astro + Tailwind CSS +
+

+ Astro + Tailwind CSS +

- Be very surprised by these huge fake numbers you are seeing on this page. Don't waste more time! :P + Be very surprised by these huge fake numbers you are seeing on this + page. Don't waste more time! :P

-

+

Frequently Asked Questions

@@ -19,33 +22,40 @@ import { IconArrowDownRight } from "~/components/astro/icons"; What do I need to start?

- Space, the final frontier. These are the voyages of the Starship Enterprise. Its five-year mission: to - explore strange new worlds. + Space, the final frontier. These are the voyages of the Starship + Enterprise. Its five-year mission: to explore strange new worlds.

- Many say exploration is part of our destiny, but it’s actually our duty to future generations. + Many say exploration is part of our destiny, but it’s actually our + duty to future generations.

- How to install the Astro + Tailwind CSS template?

-

- Well, the way they make shows is, they make one show. That show's called a pilot. + How to install the Astro + Tailwind CSS template?

- Then they show that show to the people who make shows, and on the strength of that one show they decide if - they're going to make more shows. Some pilots get picked and become television programs.Some don't, become - nothing. She starred in one of the ones that became nothing. + Well, the way they make shows is, they make one show. That show's + called a pilot. +

+

+ Then they show that show to the people who make shows, and on the + strength of that one show they decide if they're going to make more + shows. Some pilots get picked and become television programs.Some + don't, become nothing. She starred in one of the ones that became + nothing.

- Is the Space Pope reptilian!?

+ Is the Space Pope reptilian!? +

- A flower in my garden, a mystery in my panties. Heart attack never stopped old Big Bear. I didn't even know - we were calling him Big Bear. + A flower in my garden, a mystery in my panties. Heart attack never + stopped old Big Bear. I didn't even know we were calling him Big + Bear.

@@ -53,31 +63,38 @@ import { IconArrowDownRight } from "~/components/astro/icons";

- How much money you got on you?

+ How much money you got on you? +

- Michael Knight a young loner on a crusade to champion the cause of the innocent. The helpless. The powerless - in a world of criminals who operate above the law. Here he comes Here comes Speed Racer. He's a demon on - wheels. + Michael Knight a young loner on a crusade to champion the cause of + the innocent. The helpless. The powerless in a world of criminals + who operate above the law. Here he comes Here comes Speed Racer. + He's a demon on wheels.

- Galaxies Orion's sword globular star cluster?

-

- A business big enough that it could be listed on the NASDAQ goes belly up. Disappears! + Galaxies Orion's sword globular star cluster?

- It ceases to exist without me. No, you clearly don't know who you're talking to, so let me clue you in. + A business big enough that it could be listed on the NASDAQ goes + belly up. Disappears! +

+

+ It ceases to exist without me. No, you clearly don't know who you're + talking to, so let me clue you in.

- When has justice ever been as simple as a rule book?

+ When has justice ever been as simple as a rule book? +

- This is not about revenge. This is about justice. A lot of things can change in twelve years, Admiral. Well, - that's certainly good to know. About four years. I got tired of hearing how young I looked. + This is not about revenge. This is about justice. A lot of things + can change in twelve years, Admiral. Well, that's certainly good to + know. About four years. I got tired of hearing how young I looked.

diff --git a/src/components/astro/features/BasicFeatures.astro b/src/components/widgets/BasicFeatures.astro similarity index 93% rename from src/components/astro/features/BasicFeatures.astro rename to src/components/widgets/BasicFeatures.astro index 242ea97..a0355c3 100644 --- a/src/components/astro/features/BasicFeatures.astro +++ b/src/components/widgets/BasicFeatures.astro @@ -15,7 +15,7 @@ const {} = Astro.props;

@@ -36,7 +36,7 @@ const {} = Astro.props;

@@ -58,7 +58,7 @@ const {} = Astro.props;

@@ -79,7 +79,7 @@ const {} = Astro.props;

@@ -101,7 +101,7 @@ const {} = Astro.props;

@@ -122,7 +122,7 @@ const {} = Astro.props;

diff --git a/src/components/astro/blog/BlogFeaturesFourCols.astro b/src/components/widgets/BlogFeaturesPosts.astro similarity index 50% rename from src/components/astro/blog/BlogFeaturesFourCols.astro rename to src/components/widgets/BlogFeaturesPosts.astro index 1edbc7d..4b812e5 100644 --- a/src/components/astro/blog/BlogFeaturesFourCols.astro +++ b/src/components/widgets/BlogFeaturesPosts.astro @@ -1,66 +1,93 @@ --- -import Picture from "~/components/astro/utils/Picture.astro"; +import Picture from "~/components/core/Picture.astro"; const {} = Astro.props; ---
-

- Find out more content in our Blog +

+ Find out more content in our Blog +

- The blog will be used to display AstroWind documentation. Each new article will be an important step that you will - need to know to be an expert in creating a website using Astro + Tailwind CSS The blog does not exist yet, but - very soon. Astro is a very interesting technology. Thanks. + The blog will be used to display AstroWind documentation. Each new article + will be an important step that you will need to know to be an expert in + creating a website using Astro + Tailwind CSS The blog does not exist yet, + but very soon. Astro is a very interesting technology. Thanks.

+
-
+
-

Get started with AstroWind

+

+ Get started with AstroWind + +

- I'll be sure to note that in my log. Smooth as an android's bottom, eh, Data? When has justice ever been as - simple as a rule book? + I'll be sure to note that in my log. Smooth as an android's bottom, eh, + Data? When has justice ever been as simple as a rule book?

-
+ +
-

How to customize the template

+

+ How to customize the template + +

- O for awesome, this chocka full cuzzie is as rip-off as a cracker. Meanwhile, in behind the bicycle shed, - Hercules Morse. + O for awesome, this chocka full cuzzie is as rip-off as a cracker. + Meanwhile, in behind the bicycle shed, Hercules Morse.

-
+ +
-

Helpful tools and resources to design

+

+ Helpful tools and resources to design + +

- Yolo ipsum dolor sit amet, consectetur adipiscing elit. Ut ac suscipit leo. Carpe diem vulputate est nec commodo - rutrum. + Yolo ipsum dolor sit amet, consectetur adipiscing elit. Ut ac suscipit + leo. Carpe diem vulputate est nec commodo rutrum.

-
+ +
-

AstroWind template in depth

+

+ AstroWind template in depth + +

- I'll be sure to note that in my log. Smooth as an android's bottom, eh, Data? When has justice ever been as - simple as a rule book? + I'll be sure to note that in my log. Smooth as an android's bottom, eh, + Data? When has justice ever been as simple as a rule book?

diff --git a/src/components/widgets/BlogPostCard.astro b/src/components/widgets/BlogPostCard.astro new file mode 100644 index 0000000..88585e7 --- /dev/null +++ b/src/components/widgets/BlogPostCard.astro @@ -0,0 +1,62 @@ +--- +import Picture from "~/components/core/Picture.astro"; + +const { post } = Astro.props; + +const images = import.meta.glob("../../assets/images/*"); +const imageSrc = + typeof images[post.image] === "function" + ? (await images[post.image]())["default"] + : typeof post.image === "string" + ? post.image + : null; +--- + +
+ + + +
+
+

+ + {post.title} + +

+
+

+ {post.excerpt || post.description} +

+
+
+ + + +
+
+
+
diff --git a/src/components/widgets/Error404.astro b/src/components/widgets/Error404.astro new file mode 100644 index 0000000..8f30380 --- /dev/null +++ b/src/components/widgets/Error404.astro @@ -0,0 +1,28 @@ +--- +--- + +
+
+
+

+ Error404 +

+

+ Sorry, we couldn't find this page. +

+

+ But dont worry, you can find plenty of other things on our homepage. +

+ Back to homepage + +
+
+
diff --git a/src/components/astro/footers/BasicFooter.astro b/src/components/widgets/Footer.astro similarity index 56% rename from src/components/astro/footers/BasicFooter.astro rename to src/components/widgets/Footer.astro index e2deda8..2ed14e9 100644 --- a/src/components/astro/footers/BasicFooter.astro +++ b/src/components/widgets/Footer.astro @@ -1,14 +1,21 @@ --- -import { IconTwitter, IconInstagram, IconFacebook, IconArrowRight } from "~/components/astro/icons"; +import { + IconTwitter, + IconInstagram, + IconFacebook, + IconArrowRight, +} from "~/components/icons"; const {} = Astro.props; ---