diff --git a/src/components/ListadoPostsHorizontal.astro b/src/components/ListadoPostsHorizontal.astro new file mode 100644 index 0000000..7aa0c3d --- /dev/null +++ b/src/components/ListadoPostsHorizontal.astro @@ -0,0 +1,26 @@ +--- +const posts = await Astro.glob("../pages/posts/*.md"); +--- + +
+ { + posts.slice(0, 3).map((post) => ( +
+
+
+
+ {post.frontmatter.titulo} +
+

+ {post.frontmatter.descripcion} + ... +

+ + Leer más + +
+
+
+ )) + } +
\ No newline at end of file diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 48ccb95..ac1efbc 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -1,13 +1,22 @@ --- - +import { Image } from "astro:assets"; ---
+ + diff --git a/src/layouts/PostStyle.astro b/src/layouts/PostStyle.astro new file mode 100644 index 0000000..e41e729 --- /dev/null +++ b/src/layouts/PostStyle.astro @@ -0,0 +1,19 @@ +--- +const { titulo } = Astro.props; +--- + + + + + + + EcoFuturo + + +
+

{titulo}

+ +
+ + + diff --git a/src/pages/index.astro b/src/pages/index.astro index d98f431..ff683ed 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,5 +1,6 @@ --- // Component Imports +import ListadoPostsHorizontal from "../components/ListadoPostsHorizontal.astro"; import Navbar from "../components/Navbar.astro"; const animateOnScroll = ` @@ -40,14 +41,14 @@ const animateOnScroll = ` rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" /> - EcoFuturo + Ecobjetivos

Ecobjetivos

@@ -169,37 +170,16 @@ const animateOnScroll = `
-

+

Posts Recientes

-
- { - [1, 2, 3].map((num) => ( -
-
-
-
- Título del Post {num} -
-

- Breve descripción del post {num} - ... -

- - Leer más - -
-
-
- )) - } -
+
-

+

Nuestros Proyectos

@@ -277,6 +257,29 @@ const animateOnScroll = ` +