Skip to content

Commit

Permalink
Add page titles, format
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonappah committed Jun 9, 2024
1 parent cd74c9e commit 13f635f
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 36 deletions.
16 changes: 8 additions & 8 deletions src/components/join.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
---

Expand Down
2 changes: 1 addition & 1 deletion src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}),
})

Expand Down
10 changes: 8 additions & 2 deletions src/layouts/base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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
---

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- TODO: proper meta tags + dynamic titles -->
<!-- TODO: proper meta tags -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Comet Robotics at UT Dallas</title>
<title>Comet Robotics at UT Dallas{title ? ` | ${title}` : ''}</title>
<link rel="sitemap" href="/sitemap-index.xml" />
</head>
<Navbar />
Expand Down
4 changes: 2 additions & 2 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Division from '../components/home/division.astro'
import Join from '../components/join.astro'
---

<BaseLayout>
<BaseLayout title="Home">
<Hero />
<Summary />
<Division
Expand All @@ -28,5 +28,5 @@ import Join from '../components/join.astro'
images={['home/spiderbite.png', 'home/impulse.png']}
learnMoreHref="#"
/>
<Join theme='light'/>
<Join theme="light" />
</BaseLayout>
49 changes: 29 additions & 20 deletions src/pages/links.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,35 @@ import BaseLayout from '../layouts/base.astro'
import Join from '../components/join.astro'
import { linksPageLinks } from '../data'
---
<BaseLayout>
<div class="main-container" style="padding-top: 120px; display: flex; background: linear-gradient(#230508 70%, var(--text-dark));">
<div class="links-container" style=" margin: auto; max-width: 30em; width: 100%">
<div style=" width: 100%; padding: 20px; border-radius: 25px; border-style: solid; margin: 30px; border-color: #380D0D; background-color: #250F0F;">
<h2>Email</h2>
<p>
For general inquiries, reach out to our leadership team via email.
</p>
<a>[email protected]</a>

<BaseLayout title="Links">
<div
class="main-container"
style="padding-top: 120px; display: flex; background: linear-gradient(#230508 70%, var(--text-dark));"
>
<div
class="links-container"
style=" margin: auto; max-width: 30em; width: 100%"
>
<div
style=" width: 100%; padding: 20px; border-radius: 25px; border-style: solid; margin: 30px; border-color: #380D0D; background-color: #250F0F;"
>
<h2>Email</h2>
<p>
For general inquiries, reach out to our leadership team via email.
</p>
<a>[email protected]</a>
</div>
{
linksPageLinks.map((link) => (
<a href={link.href}>
<div style=" width: 100%; padding: 20px; border-radius: 25px; border-style: solid; margin: 30px;">
<h2>{link.name}</h2>
</div>
{
linksPageLinks.map((link) => (
<a href={link.href}>
<div style=" width: 100%; padding: 20px; border-radius: 25px; border-style: solid; margin: 30px;">
<h2>{link.name}</h2>
</div>
</a>
))
}
</div>
</a>
))
}
</div>
<Join theme='dark'/>
</div>
<Join theme="dark" />
</BaseLayout>
2 changes: 1 addition & 1 deletion src/pages/projects/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const { entry } = Astro.props
const { Content } = await entry.render()
---

<BaseLayout>
<BaseLayout title={entry.data.projectTitle}>
<div class="main-container">
<div class="content-container">
<div class="description">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/projects/project.astro
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let stats: Stat[] = [
]
---

<BaseLayout>
<BaseLayout title={projectTitle}>
<div class="main-container">
<div class="content-container">
<div class="description">
Expand Down Expand Up @@ -86,5 +86,5 @@ let stats: Stat[] = [
</p>
</div>
</div>
<Join theme='dark'/>
<Join theme="dark" />
</BaseLayout>

0 comments on commit 13f635f

Please sign in to comment.