From 13f635fd97d35b38f470ad97c3880a7e6d496d19 Mon Sep 17 00:00:00 2001 From: Jason Antwi-Appah Date: Sun, 9 Jun 2024 11:30:53 -0500 Subject: [PATCH] Add page titles, format --- src/components/join.astro | 16 +++++----- src/content/config.ts | 2 +- src/layouts/base.astro | 10 ++++-- src/pages/index.astro | 4 +-- src/pages/links.astro | 49 ++++++++++++++++++------------ src/pages/projects/[...slug].astro | 2 +- src/pages/projects/project.astro | 4 +-- 7 files changed, 51 insertions(+), 36 deletions(-) diff --git a/src/components/join.astro b/src/components/join.astro index 917ffb6..4a88f63 100644 --- a/src/components/join.astro +++ b/src/components/join.astro @@ -2,19 +2,19 @@ import { discordInvite, makerspaceMap } from '../data' interface Props { - theme: 'light' | 'dark'; + theme: 'light' | 'dark' } -const { theme } = Astro.props; +const { theme } = Astro.props -let bgColor = '#D9D9D9'; -let txtColor = 'black'; -let borderStyle = 'none'; +let bgColor = '#D9D9D9' +let txtColor = 'black' +let borderStyle = 'none' if (theme === 'dark') { - bgColor = '#1e1e1e'; - txtColor = 'white'; - borderStyle = 'solid'; + bgColor = '#1e1e1e' + txtColor = 'white' + borderStyle = 'solid' } --- diff --git a/src/content/config.ts b/src/content/config.ts index 653c24e..f24ded1 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -14,7 +14,7 @@ const projectCollection = defineCollection({ deprecated: z.boolean().default(false), stats: z.array(statSchema), mainImage: z.object({ src: z.string(), alt: z.string() }), - draft: z.boolean().default(false) + draft: z.boolean().default(false), }), }) diff --git a/src/layouts/base.astro b/src/layouts/base.astro index c863e80..ddd7936 100644 --- a/src/layouts/base.astro +++ b/src/layouts/base.astro @@ -7,15 +7,21 @@ import '../styles/App.css' import Navbar from '../components/navbar.astro' import Footer from '../components/footer.astro' + +interface Props { + title: string +} + +const { title } = Astro.props --- - + - Comet Robotics at UT Dallas + Comet Robotics at UT Dallas{title ? ` | ${title}` : ''} diff --git a/src/pages/index.astro b/src/pages/index.astro index efe731b..af8170e 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -6,7 +6,7 @@ import Division from '../components/home/division.astro' import Join from '../components/join.astro' --- - + - + diff --git a/src/pages/links.astro b/src/pages/links.astro index 2e16384..79bd6bf 100644 --- a/src/pages/links.astro +++ b/src/pages/links.astro @@ -6,26 +6,35 @@ import BaseLayout from '../layouts/base.astro' import Join from '../components/join.astro' import { linksPageLinks } from '../data' --- - -
-