log101-dot-dev/src/pages/index.astro
2024-05-07 19:35:30 +03:00

28 lines
713 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
import Layout from "../layouts/Layout.astro";
import "../styles/header.css";
import "../styles/home.css";
import { getCollection } from "astro:content";
import Post from "../components/Post.astro";
const allTeknikPosts = await getCollection("blog");
---
<Layout title="log101">
<div class="container">
<Header />
<div class="posts">
{
allTeknikPosts
.sort((p1, p2) => p2.data.date.getTime() - p1.data.date.getTime())
.map((p) => <Post data={p.data} />)
}
</div>
<a class="home-all-posts" href="#">Tüm Yayınlar</a>
<Footer />
</div>
</Layout>