diff --git a/src/assets/hero.png b/src/assets/hero.png new file mode 100644 index 0000000..c92012e Binary files /dev/null and b/src/assets/hero.png differ diff --git a/src/components/features.astro b/src/components/features.astro new file mode 100644 index 0000000..365666d --- /dev/null +++ b/src/components/features.astro @@ -0,0 +1,55 @@ +--- +const features = [ + { + title: "Bring Your Own Framework", + description: + "Build your site using React, Svelte, Vue, Preact, web components, or just plain ol' HTML + JavaScript.", + }, + { + title: "100% Static HTML, No JS", + description: + "Astro renders your entire page to static HTML, removing all JavaScript from your final build by default.", + }, + { + title: "On-Demand Components", + description: + "Need some JS? Astro can automatically hydrate interactive components when they become visible on the page. If the user never sees it, they never load it.", + }, + { + title: "Broad Integration", + description: + "Astro supports TypeScript, Scoped CSS, CSS Modules, Sass, Tailwind, Markdown, MDX, and any of your favorite npm packages.", + }, + { + title: "SEO Enabled", + description: + "Automatic sitemaps, RSS feeds, pagination and collections take the pain out of SEO and syndication.", + }, + { + title: "Community", + description: + "Astro is an open source project powered by hundreds of contributors making thousands of individual contributions.", + }, +]; +--- + +
+

+ Everything you need to start a website +

+

+ Astro comes batteries included. It takes the best parts of state-of-the-art + tools and adds its own innovations. +

+
+ +
+ { + features.map((item) => ( +
+

{item.title}

{" "} +

{item.description}

+
+ )) + } +
diff --git a/src/components/hero.astro b/src/components/hero.astro index 48b755f..d869c5b 100644 --- a/src/components/hero.astro +++ b/src/components/hero.astro @@ -1,10 +1,18 @@ --- import { Image } from "@astrojs/image/components"; -import heroImage from "assets/hero.avif"; +import heroImage from "assets/hero.png"; import Link from "@components/ui/link.astro"; --- -
+
+
+ Astronaut in the air +

Marketing website done with Astro @@ -14,8 +22,8 @@ import Link from "@components/ui/link.astro"; pages. Built with Astro.build, TailwindCSS & Alpine.js. You can quickly create any website with this starter.

-
- Get Started +
+ Get Started
-
- -

diff --git a/src/components/navbar/navbar.astro b/src/components/navbar/navbar.astro index 182c131..8f67640 100644 --- a/src/components/navbar/navbar.astro +++ b/src/components/navbar/navbar.astro @@ -100,7 +100,7 @@ const menuitems = [
diff --git a/src/components/ui/button.astro b/src/components/ui/button.astro index 07c0252..8c7f739 100644 --- a/src/components/ui/button.astro +++ b/src/components/ui/button.astro @@ -1,9 +1,29 @@ --- -const { ...rest } = Astro.props; +const { + size = "lg", + style = "primary", + class: className, + ...rest +} = Astro.props; + +const sizes = { + lg: "px-5 py-2.5", +}; + +const styles = { + outline: "border-2 border-black hover:bg-black text-black hover:text-white", + primary: + "bg-black text-white hover:bg-slate-900 border-2 border-transparent", +}; --- diff --git a/src/components/ui/link.astro b/src/components/ui/link.astro index dedc99d..c6680f2 100644 --- a/src/components/ui/link.astro +++ b/src/components/ui/link.astro @@ -1,4 +1,12 @@ --- +interface Props { + href: string; + size?: string; + style?: string; + class?: string; + [x: string]: any; +} + const { href, size = "lg", @@ -9,6 +17,7 @@ const { const sizes = { lg: "px-5 py-2.5", + md: "px-4 py-2", }; const styles = { @@ -22,7 +31,7 @@ const styles = { href={href} {...rest} class:list={[ - " rounded transition focus-visible:ring-2 ring-offset-2 ring-gray-200", + " rounded text-center transition focus-visible:ring-2 ring-offset-2 ring-gray-200", sizes[size], styles[style], className, diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 2416e34..9dac656 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,11 +1,18 @@ --- +import { getImage } from "@astrojs/image"; import Navbar from "@components/navbar/navbar.astro"; - import "@fontsource/inter/variable.css"; export interface Props { title: string; } +const { src } = await getImage({ + src: "../../assets/hero.png", + width: 800, + height: 742, + format: "avif", +}); +console.log(src); const { title } = Astro.props; --- @@ -17,6 +24,8 @@ const { title } = Astro.props; + + {title} {title && "|"} Astro Ship diff --git a/src/pages/index.astro b/src/pages/index.astro index ba18eab..17e1056 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,6 +1,7 @@ --- import Card from "@components/Card.astro"; import Container from "@components/container.astro"; +import Features from "@components/features.astro"; import Hero from "@components/hero.astro"; import Layout from "@layouts/Layout.astro"; --- @@ -8,5 +9,6 @@ import Layout from "@layouts/Layout.astro"; + diff --git a/tsconfig.json b/tsconfig.json index e306986..393c5db 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,9 @@ "@layouts/*": [ "layouts/*" ], + "@assets/*": [ + "assets/*" + ], } } } \ No newline at end of file