From ae20d39d4d64698977d664a83b8b9454917aacad Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 11 Feb 2024 22:37:30 -0500 Subject: Blog changes; Homepage changes; Set locale to en-ca --- src/layouts/Default.astro | 6 ++--- src/layouts/Page.astro | 34 +-------------------------- src/pages/blog/index.astro | 57 +++++++++++++++++++++++----------------------- src/pages/blog/rss.xml.js | 2 +- src/pages/index.astro | 13 ++++++++++- src/styles/Page.css | 27 ++++++++++++++++++++++ src/styles/index.css | 6 ++++- 7 files changed, 77 insertions(+), 68 deletions(-) create mode 100644 src/styles/Page.css (limited to 'src') diff --git a/src/layouts/Default.astro b/src/layouts/Default.astro index db559c0..c7ef6bd 100644 --- a/src/layouts/Default.astro +++ b/src/layouts/Default.astro @@ -11,12 +11,12 @@ const date = new Date(); --- - + - + @@ -29,7 +29,7 @@ const date = new Date(); - + diff --git a/src/layouts/Page.astro b/src/layouts/Page.astro index 3731d5e..ea191f8 100644 --- a/src/layouts/Page.astro +++ b/src/layouts/Page.astro @@ -1,6 +1,7 @@ --- import Layout from './Default.astro'; const { title, description } = Astro.props; +import '../styles/Page.css'; --- @@ -12,36 +13,3 @@ const { title, description } = Astro.props; - - diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index bc8844c..a35537a 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -1,33 +1,40 @@ --- -import Page from "../../layouts/Page.astro"; +import Page from "../../layouts/Default.astro"; import { getCollection } from "astro:content"; import {formatDate} from "../../util"; +import '../../styles/Page.css'; import "../../styles/cards.css"; import {Icon} from "astro-icon/components"; const allBlogPosts = (await getCollection('blog')).sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()); --- - +
-
- - - -
-
- {allBlogPosts.map((post) => ( -
-

{post.data.title}

- {formatDate(post.data.pubDate)} -

{post.data.description}

-
- {post.data.tags.map((tag) => ( - {tag} - ))} -
-
- )) - } +
+

+ Blog + + + +

+

Where I post can be anything!

+
+
+
+ {allBlogPosts.map((post) => ( +
+

{post.data.title}

+ {formatDate(post.data.pubDate)} +

{post.data.description}

+
+ {post.data.tags.map((tag) => ( + {tag} + ))} +
+
+ )) + } +
@@ -38,12 +45,4 @@ const allBlogPosts = (await getCollection('blog')).sort((a, b) => b.data.pubDate gap: 1em; } - .header { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - gap: 0.5em; - font-size: 3em; - } diff --git a/src/pages/blog/rss.xml.js b/src/pages/blog/rss.xml.js index fe17f91..bb67243 100644 --- a/src/pages/blog/rss.xml.js +++ b/src/pages/blog/rss.xml.js @@ -25,7 +25,7 @@ export async function GET(context) { link: `/blog/${post.slug}/`, content: sanitizeHtml(parser.render(post.body)), // (optional) inject custom xml - customData: `en-us`, + customData: `en-ca`, })), }); } diff --git a/src/pages/index.astro b/src/pages/index.astro index b87e151..99a14a1 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -42,7 +42,18 @@ const allBlogPosts = (await getCollection('blog')).sort((a, b) => b.data.pubDate

About me

-

I have been into computers since I was a kid, and it has been my passion for a long time.
Currently studying “Computing Support” (more preferably IT) at a vocational school.

+ History +

Hey, I am Andrew Lee, a 19 year old who has a passion with computers. + I am currently a student at a vocational school in Pearson Electrotechnology Centre. + For years, I have been into programming, tinkering with virtual machines, and messing with Linux.

+
+
+

Skills

+
    +
  • Linux
  • +
  • Graphic Design
  • +
  • Web Development
  • +

Computer Specs

diff --git a/src/styles/Page.css b/src/styles/Page.css new file mode 100644 index 0000000..2a8f877 --- /dev/null +++ b/src/styles/Page.css @@ -0,0 +1,27 @@ +header { + display: flex; + flex-direction: column; + gap: 0.5em; + margin: 0; + text-align: center; + padding: 0 0 1em; +} + +.header-text { + font-size: 2em; + margin: 0; +} + +h2.header-text { + font-size: 1.5em; + font-weight: 300; +} +.container { + margin: 1em 10em 1em 10em; +} + +@media (max-width: 992px) { + .container { + margin: 10px 20px 10px 20px; + } +} diff --git a/src/styles/index.css b/src/styles/index.css index ae3e9db..c581da0 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -55,13 +55,17 @@ .latest-posts { grid-column: 2; - grid-row: 1 / span 2; + grid-row: 1 / span 3; } .blog-title { margin-bottom: 2px; } +.link { + font-size: 1.2em; +} + /* Mobile view */ @media (max-width: 992px) { .social { -- cgit v1.2.3