Skip to content

Commit 38b475f

Browse files
committed
Update the site to be even cleaner I hope
1 parent f5e770e commit 38b475f

File tree

8 files changed

+52
-44
lines changed

8 files changed

+52
-44
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
> _Personal website and blog made with Astro!_
44
5-
![source](https://noel-is.gay/images/7ea225ba.png)
5+
![source](https://noel-is.gay/images/025d5c8a.png)

src/components/Container.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<div class="container mx-auto mt-10 lg:mt-6 lg:items-center lg:justify-center lg:max-w-7xl">
1+
<div class="container mx-auto mt-4 lg:mt-6 lg:items-center lg:justify-center lg:max-w-7xl">
22
<slot />
33
</div>

src/components/Navbar.astro

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Icon } from 'astro-icon';
44

55
<nav class="relative">
66
<header
7-
class="flex items-center justify-center max-lg:flex-col lg:justify-between bg-[#2B2C3B] py-3 px-1.5 lg:pl-2 lg:shadow-md lg:max-w-screen-xl lg:mx-auto lg:mt-4 lg:rounded-lg"
7+
class="flex items-center justify-center max-lg:flex-col lg:justify-between bg-[#2B2C3B] py-3 px-1.5 lg:pl-2 lg:shadow-md lg:max-w-screen-xl lg:mx-auto lg:mt-1.5 rounded-lg"
88
>
99
<div class="flex flex-row align-middle gap-2">
1010
<div class="flex flex-row gap-3">
@@ -21,14 +21,15 @@ import { Icon } from 'astro-icon';
2121
<span class="my-auto ml-2">&bull;</span>
2222
<a
2323
href="/"
24-
class="mr-2 my-auto font-mono text-white text-xl hover:bg-[#35353A] hover:shadow-md py-2 px-2 rounded-lg"
24+
class="my-auto font-mono text-white text-xl hover:bg-[#35353A] hover:shadow-md py-2 px-2 rounded-lg"
2525
>
2626
Home
2727
</a>
2828

29+
<span class="my-auto">&bull;</span>
2930
<a
3031
href="/blog"
31-
class="mr-1 my-auto font-mono text-white text-xl hover:bg-[#35353A] hover:shadow-md py-2 px-2 rounded-lg"
32+
class="my-auto font-mono text-white text-xl hover:bg-[#35353A] hover:shadow-md py-2 px-2 rounded-lg"
3233
>
3334
Blog
3435
</a>
@@ -46,7 +47,7 @@ import { Icon } from 'astro-icon';
4647
<Icon name="fa-brands:twitter" size="32" class="text-white bg-[#1DA1F2] py-1 px-1 rounded-lg" />
4748
</a>
4849

49-
<a id="icon" href="https://wuff.space/@noel" class="mr-2" title="Mastodon">
50+
<a id="icon" href="https://wuff.space/@noel" rel="me" class="mr-2" title="Mastodon">
5051
<Icon name="fa-brands:mastodon" size="32" class="text-white bg-[#563ACC] py-1 px-1 rounded-lg" />
5152
</a>
5253

src/env.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,3 @@
2323

2424
/// <reference path="../.astro/types.d.ts" />
2525
/// <reference types="astro/client" />
26-
27-
declare module 'astro-icon/pack' {
28-
import { createIconPack } from 'astro-icon/lib/createIconPack';
29-
30-
export { createIconPack };
31-
}

src/icons/radix.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* SOFTWARE.
2222
*/
2323

24+
// @ts-ignore
2425
import { createIconPack } from 'astro-icon/pack';
2526

2627
export default createIconPack({

src/pages/blog/[...slug].astro

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { getEntryBySlug } from 'astro:content';
33
import Container from '~/components/Container.astro';
44
import Navbar from '~/components/Navbar.astro';
5-
import Page from '~/components/Page.astro';
5+
import Head from '~/components/Head.astro';
66
77
import '~/styles/global.css';
88
@@ -20,8 +20,10 @@ const { render, data } = page;
2020
const { Content } = await render();
2121
---
2222

23-
<Page description={data.description} bodyClass="relative" title={data.title} path={`/blog/${slug}`}>
24-
<main class="min-h-screen">
23+
<!DOCTYPE html>
24+
<html lang="en">
25+
<Head title={data.title} description={data.description} path={`/blog/${slug}`} />
26+
<body class="relative max-lg:px-3 py-4">
2527
<Navbar />
2628
<Container>
2729
<div class="flex mt-3 mx-auto border border-pink-300 lg:w-[80rem] rounded-lg shadow-md py-2 px-3">
@@ -41,22 +43,13 @@ const { Content } = await render();
4143
</div>
4244
</div>
4345
</div>
44-
<main class="flex container mx-auto pb-8 mt-9">
46+
<main class="flex container mx-auto mt-5">
4547
<article
46-
class="lg:max-w-[80rem] prose prose-p:break-words prose-p:text-zinc-200 prose-p:text-2xl prose-headings:font-serif prose-headings:text-zinc-200 prose-strong:text-slate-200 prose-code:text-slate-200 prose-a:text-rose-200 hover:prose-a:text-fuchsia-400 prose-a:underline prose-li:text-slate-300 prose-img:mx-auto"
48+
class="lg:max-w-full max-w-md prose prose-p:break-words prose-p:text-zinc-200 prose-p:text-2xl prose-headings:font-serif prose-headings:text-zinc-200 prose-strong:text-slate-200 prose-code:text-slate-200 prose-a:text-rose-200 hover:prose-a:text-fuchsia-400 prose-a:underline prose-li:text-slate-300 prose-img:mx-auto"
4749
>
4850
<Content />
4951
</article>
5052
</main>
5153
</Container>
52-
<footer class="relative bottom-0 left-0 text-center">
53-
<p class="font-serif text-xl">
54-
Copyright &copy; 2018-{currentYear}
55-
<a class="text-[#f4b5d5] underline" href="https://floofy.dev" target="_blank">Noel</a> &bull;
56-
<a class="text-[#f4b5d5] underline" href="https://github.com/auguwu/floofy.dev" target="_blank">
57-
Source Code
58-
</a>
59-
</p>
60-
</footer>
61-
</main>
62-
</Page>
54+
</body>
55+
</html>

src/pages/blog/index.astro

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import Head from '~/components/Head.astro';
66
77
import '~/styles/global.css';
88
9+
const formatter = new Intl.DateTimeFormat('en-GB', {
10+
dateStyle: 'medium',
11+
timeStyle: 'medium'
12+
});
13+
914
const posts = await getCollection('blog').then((posts) =>
1015
posts.sort((a, b) => b.data.createdAt.valueOf() - a.data.createdAt.valueOf())
1116
);
@@ -14,23 +19,37 @@ const posts = await getCollection('blog').then((posts) =>
1419
<!DOCTYPE html>
1520
<html lang="en">
1621
<Head title="Blog" description="📝 Collection of my writing I post time from time" path="/blog" />
17-
<body class="relative">
22+
<body class="relative max-lg:px-3 py-4">
1823
<Navbar />
1924
<Container>
20-
<div class="flex mt-3 mx-auto border border-pink-300 lg:w-[80rem] rounded-lg shadow-md py-2 px-3">
21-
<div>
22-
<img
23-
src="https://cdn.floofy.dev/images/August.png"
24-
class="md:w-[148px] md:h-[148px] max-sm:hidden h-[72px] w-[72px] rounded-md lg:shadow-sm"
25-
alt="noel avatar"
26-
draggable="false"
27-
/>
28-
</div>
29-
<div class="my-auto ml-4">
30-
<h1 class="font-mono md:text-4xl">📝 Blog</h1>
31-
<h2 class="md:text-2xl mt-2">All of my posts that I have written!</h2>
32-
</div>
25+
<div class="flex container flex-col mt-8 space-y-3">
26+
<h1 class="font-serif text-5xl">Blog Posts</h1>
27+
<h2 class="text-3xl mt-2">
28+
Collection of all of my blog posts, they are probably not worth reading though.
29+
</h2>
30+
<hr />
3331
</div>
32+
33+
<Container>
34+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-3 items-center [&>*]:h-full">
35+
{
36+
posts.map((post) => (
37+
<div class="py-4 px-3 rounded-md shadow-md bg-[#2B2C3B] space-y-3 space-x-2">
38+
<div>
39+
<a
40+
href={`/blog/${post.slug}`}
41+
class="ml-2 font-serif text-2xl text-semibold hover:border-b-2 hover:border-slate-500"
42+
>
43+
{post.data.title}
44+
</a>
45+
<h5 class="ml-2 mt-1.5">{post.data.description}</h5>
46+
<span class="ml-2 mt-2">{formatter.format(new Date(post.data.createdAt))}</span>
47+
</div>
48+
</div>
49+
))
50+
}
51+
</div>
52+
</Container>
3453
</Container>
3554
</body>
3655
</html>

src/pages/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const projects: Props['data'][] = [
4747

4848
<html lang="en">
4949
<Head path="/" />
50-
<body>
50+
<body class="max-lg:px-3 py-2">
5151
<Navbar />
5252
<div class="flex flex-col container mx-auto max-md:justify-center max-md:items-center lg:max-w-7xl">
5353
<div class="flex container flex-col mt-8 space-y-3">
@@ -60,7 +60,7 @@ const projects: Props['data'][] = [
6060
</h3>
6161
</div>
6262

63-
<h2 class="text-3xl mt-5">Projects</h2>
63+
<h2 class="text-3xl lg:mt-5 mt-2">Projects</h2>
6464
<Container>
6565
<div class="grid grid-cols-1 lg:grid-cols-3 gap-3 items-center [&>*]:h-full">
6666
{projects.map((data) => <ProjectCard data={data} />)}

0 commit comments

Comments
 (0)