---
import BaseHead from '../components/BaseHead.astro';
import Footer from '../components/Footer.astro';
import Header from '../components/Header.astro';
import { SITE_DESCRIPTION, SITE_TITLE } from '../consts';

import { getCollection } from 'astro:content';

const latest = (await getCollection('blog'))
  .filter((p) => !(((p.data as any).draft) ?? false))
  .sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf())
  .slice(0, 5);
---

<!doctype html>
<html lang="en">
	<head>
		<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
	</head>
	<body>
		<Header />
		<main>
			<h1>Sean's Cloud!</h1>
			<h3>Infrastructure • Cloud • Systems Thinking • Leadership</h3>

			<p>
				seans.cloud is an evolving space focused on building, testing, and refining modern IT and cloud practices with an eye toward what’s next. It serves as a foundation for future projects in cloud architecture, automation, security, and operational excellence—along with the leadership thinking that supports sustainable systems.
			</p>
			<p>
				As this site grows, it will become a place to share practical insights, real-world experiments, and lessons learned from working with infrastructure at scale. Future content may include technical guides, architecture patterns, tooling evaluations, and perspectives on how technology, process, and people intersect to create resilient organizations.
			</p>

			<p>On this site you’ll find:</p>
			<ul>
				<li>Technical experiments and lab notes</li>
				<li>Cloud and infrastructure architecture thinking</li>
				<li>Reflections on reliability, security, and process</li>
				<li>Lessons learned from real-world systems</li>
			</ul>

			<hr />

			<h2>Latest Posts</h2>
			{latest.length === 0 ? (
				<p>No posts yet.</p>
			) : (
				<ul>
					{latest.map((post) => (
						<li>
							<a href={`/blog/${post.id}/`}>{post.data.title}</a>
							{post.data.description ? <p>{post.data.description}</p> : null}
						</li>
					))}
				</ul>
			)}
		</main>
		<Footer />
	</body>
</html>

