From 27053ad40121adcf08603c7d7c9c3f48af5246f5 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Thu, 12 Jun 2025 22:25:57 +0200 Subject: Initial page works --- src/pages/index.astro | 160 ++++++++++++++++++++++++++++---------------------- 1 file changed, 90 insertions(+), 70 deletions(-) (limited to 'src/pages/index.astro') diff --git a/src/pages/index.astro b/src/pages/index.astro index a88712c..1981ec1 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,78 +1,98 @@ --- -import Counter from "../components/Counter"; -import StandardLayout from "../layouts/StandardLayout.astro"; import { getCollection } from "astro:content"; -// Get the latest 3 blog posts -const latestPosts = await getCollection("blog"); -latestPosts.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()); -const featuredPosts = latestPosts.slice(0, 3); +import "../styles/global.css"; + +// Get all names from the collection +const allNames = await getCollection("names"); +const members = allNames.filter(name => name.data.candidate !== true); +const candidates = allNames.filter(name => name.data.candidate === true); --- - -
-
-

- Welcome to Astro -

-

- A modern framework for building fast, content-focused websites. -

-
- -
-
-
+ + + + + Domain Name Hack Club + + + + + + + + + + +

Doma.in Na.me + Ha.ck Cl.ub

+

An exclusive club of geeks that serve their personal homepage from the domain hack to their name. Are you + one of us? Join the club by opening a pull + request on Github or send us an + email at join@namehack.club.

-
-
-
-

- Latest Blog Posts -

- View all posts → -
+

💎 Members

+
    + {members.map((name) => { + const nameParts = name.data.name.toLowerCase().split(" "); + const domain = name.data.domain.replace(".", ""); + const url = name.data.url || `https://${name.data.domain}`; + + return ( +
  • +
    + {nameParts.map((part, index) => ( + <> + {index > 0 && " "} + {part === domain ? ( + + {name.data.domain} + + ) : ( + {part} + )} + + ))} +
    +
    {name.data.title}
    +
  • + ); + })} +
-
- { - featuredPosts.map((post) => ( -
- - {post.data.image && ( - {post.data.title} +

⭐ Candidates

+
- )) - } -
-
-
-
+ + ))} + + + ); + })} + + +
+ + + -- cgit v1.3.1