linter fixes

This commit is contained in:
2025-05-20 00:43:02 -06:00
parent e0da76f503
commit 321fa66338
3 changed files with 29 additions and 18 deletions

View File

@ -24,10 +24,10 @@ export default defineConfig({
}, },
integrations: [preact(), mdx(), icon({ integrations: [preact(), mdx(), icon({
include: { include: {
mdi: ["clock", "tag", "arrow-right", "link", "email", "rss", "download", "web", "arrow-left"], mdi: ["clock", "tag", "arrow-right", "link", "email", "rss", "download", "web", "arrow-left"],
}, },
}), }),
], ],
adapter: node({ adapter: node({

View File

@ -1,8 +1,8 @@
--- ---
import { Image } from 'astro:assets'; import { Image } from "astro:assets";
import SocialLinks from '../components/SocialLinks.astro'; import SocialLinks from "../components/SocialLinks.astro";
import TechLinks from '../components/TechLinks.astro'; import TechLinks from "../components/TechLinks.astro";
import Layout from '../layouts/Layout.astro'; import Layout from "../layouts/Layout.astro";
--- ---
<Layout> <Layout>
@ -13,11 +13,13 @@ import Layout from '../layouts/Layout.astro';
width={150} width={150}
/> />
<h1 class="bg-gradient-to-r from-primary via-secondary to-accent bg-clip-text text-transparent text-4xl sm:text-6xl font-bold text-center"> <h1
class="bg-gradient-to-r from-primary via-secondary to-accent bg-clip-text text-transparent text-4xl sm:text-6xl font-bold text-center"
>
Atridad Lahiji Atridad Lahiji
</h1> </h1>
<h2 class="text-xl sm:text-3xl font-bol text-center"> <h2 class="text-xl sm:text-3xl font-bol text-center">
Researcher, Full-Stack Developer, and IT Professional. Researcher, Full-Stack Developer, and IT Professional.
</h2> </h2>

View File

@ -8,23 +8,32 @@ const posts = await getCollection("posts");
// Sort posts by date, newest first // Sort posts by date, newest first
const sortedPosts = posts.sort( const sortedPosts = posts.sort(
(a: CollectionEntry<"posts">, b: CollectionEntry<"posts">) => new Date(b.data.pubDate).valueOf() - new Date(a.data.pubDate).valueOf() (a: CollectionEntry<"posts">, b: CollectionEntry<"posts">) =>
new Date(b.data.pubDate).valueOf() - new Date(a.data.pubDate).valueOf(),
); );
--- ---
<Layout> <Layout>
<div class="min-h-screen p-4 sm:p-8"> <div class="min-h-screen p-4 sm:p-8">
<h1 class="text-3xl sm:text-4xl font-bold text-primary mb-6 sm:mb-8 text-center"> <h1
class="text-3xl sm:text-4xl font-bold text-primary mb-6 sm:mb-8 text-center"
>
Posts Posts
</h1> </h1>
<div class="flex flex-row flex-wrap justify-center gap-4 sm:gap-6 max-w-6xl mx-auto"> <div
{sortedPosts.map((post: CollectionEntry<"posts">) => ( class="flex flex-row flex-wrap justify-center gap-4 sm:gap-6 max-w-6xl mx-auto"
>
{sortedPosts.map((post) => (
<PostCard post={post} /> <PostCard post={post} />
))} ))}
</div> </div>
{sortedPosts.length === 0 && ( {
<p class="text-center text-gray-500 mt-12">No posts available yet. Check back soon!</p> sortedPosts.length === 0 && (
)} <p class="text-center text-gray-500 mt-12">
No posts available yet. Check back soon!
</p>
)
}
</div> </div>
</Layout> </Layout>