Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Kandles11 committed Jun 9, 2024
2 parents 977e68c + 05474fe commit fd6165f
Show file tree
Hide file tree
Showing 17 changed files with 5,287 additions and 5,283 deletions.
10,449 changes: 5,196 additions & 5,253 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"@astrojs/check": "^0.5.4",
"@astrojs/react": "^3.0.10",
"@astrojs/sitemap": "^3.0.5",
"@fontsource-variable/open-sans": "^5.0.29",
"@fontsource-variable/unbounded": "^5.0.20",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"astro": "^4.3.6",
Expand Down
21 changes: 20 additions & 1 deletion src/components/footer.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
---
import { socialLinks, clubEmail, footerLinks, sponsorLinks } from '../data'
import {
socialLinks,
clubEmail,
footerLinks,
sponsorLinks,
websiteRepo,
} from '../data'
import childProcess from 'child_process'
// obtain Git commit hash
const hash = childProcess
.execSync('git rev-parse --short HEAD')
.toString()
.trim()
---

<footer
Expand Down Expand Up @@ -40,4 +54,9 @@ import { socialLinks, clubEmail, footerLinks, sponsorLinks } from '../data'
))
}
</div>
<p>
Commit hash: <a target="_blank" href={`${websiteRepo}/commit/${hash}`}
><code>{hash}</code></a
>
</p>
</footer>
2 changes: 1 addition & 1 deletion src/components/home/hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<h1>
We are Comet Robotics,<br /> the premiere robotics club at UT Dallas.
</h1>
<a style={{ fontWeight: 500 }} href="#home-summary">
<a style={{ fontWeight: 500 }} id="to-summary" href="#to-summary">
scroll down to learn more
<span style={{ marginLeft: '1rem' }}> &darr;</span>
</a>
Expand Down
5 changes: 3 additions & 2 deletions src/components/join.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
import '../styles/App.css'
import { discordInvite, makerspaceMap } from '../data'
interface Props {
Expand Down Expand Up @@ -31,6 +30,7 @@ if (theme === 'dark') {
<div style={{ display: 'flex', padding: '15px' }}>
<a
href={discordInvite}
target="_blank"
style={{
backgroundColor: '#1e1e1e',
color: 'white',
Expand All @@ -49,6 +49,7 @@ if (theme === 'dark') {
</a>
<a
href={makerspaceMap}
target="_blank"
style={{
backgroundColor: '#1e1e1e',
color: 'white',
Expand All @@ -61,7 +62,7 @@ if (theme === 'dark') {
>
<h3>Find the Makerspace</h3>
<span>
Our meeting are hosted at the UTDesign Makerspace, located on the 2nd
Our meetings are hosted at the UTDesign Makerspace, located on the 2nd
floor of the Synergy Park North building (SPN 2.220).
</span>
</a>
Expand Down
5 changes: 3 additions & 2 deletions src/components/navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { HOME_LINK, discordInvite, mainNavLinks } from '../data'
display: 'flex',
gap: '2rem',
alignItems: 'center',
fontFamily: 'Mashine, sans-serif',
fontFamily: "'Mashine', sans-serif",
}}
>
{mainNavLinks.map((link) => <a href={link.href}>{link.name}</a>)}
Expand All @@ -41,9 +41,10 @@ import { HOME_LINK, discordInvite, mainNavLinks } from '../data'
padding: '0.5rem 1rem',
color: 'white',
borderRadius: '999px',
fontFamily: 'Mashine, sans-serif',
fontFamily: "'Mashine', sans-serif",
}}
href={discordInvite}
target="_blank"
>
Join
</a>
Expand Down
31 changes: 31 additions & 0 deletions src/content/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { defineCollection, z } from 'astro:content'

const statSchema = z.object({
name: z.string(),
value: z.number(),
icon: z.string(),
})

const termSchema = z.object({
season: z.enum(['Spring', 'Summer', 'Fall']),
year: z.number(),
})

const projectSchema = z.object({
projectTitle: z.string(),
shortDescription: z.string(),
deprecated: z.boolean().default(false),
stats: z.array(statSchema),
startSeason: termSchema,
endSeason: termSchema.optional(),
mainImage: z.object({ src: z.string().url(), alt: z.string() }),
})

const projectCollection = defineCollection({
type: 'content',
schema: projectSchema,
})

export const collections = {
projects: projectCollection,
}
8 changes: 4 additions & 4 deletions src/data.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interface LinkType { name: string, href: string }
type LinkWithIconType = LinkType & { icon: string }
const HOME_LINK: LinkType = { name: 'Home', href: '#' }
const HOME_LINK: LinkType = { name: 'Home', href: '/' }

const mainNavLinks: LinkType[] = [
HOME_LINK,
Expand Down Expand Up @@ -49,7 +49,7 @@ const clubEmail = '[email protected]'
const discordInvite = 'https://discord.gg/dTGwav3PVM'

const makerspaceMap = 'https://g.page/utdesign-makerspace?share'

const websiteRepo = 'https://github.com/Comet-Robotics/cometrobotics.org'
const footerLinks: LinkType[] = [
{
name: 'Discord',
Expand All @@ -61,7 +61,7 @@ const footerLinks: LinkType[] = [
},
{
name: 'Source Code',
href: 'https://github.com/Comet-Robotics/cometrobotics.org',
href: websiteRepo,
},
{
name: 'SharePoint',
Expand Down Expand Up @@ -96,4 +96,4 @@ const linksPageLinks: LinkType[] = [
},
]

export { mainNavLinks, HOME_LINK, footerLinks, socialLinks, clubEmail, sponsorLinks, discordInvite, makerspaceMap, linksPageLinks }
export { mainNavLinks, HOME_LINK, footerLinks, socialLinks, clubEmail, sponsorLinks, discordInvite, makerspaceMap, websiteRepo, linksPageLinks }
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />
4 changes: 3 additions & 1 deletion src/layouts/base.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
import '@fontsource-variable/unbounded'
import '@fontsource-variable/open-sans'
import '../styles/reset.css'
import '../styles/index.css'
import '../styles/App.css'
import Navbar from '../components/navbar.astro'
import Navbar from '../components/navbar.astro'
import Footer from '../components/footer.astro'
---

Expand Down
3 changes: 0 additions & 3 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
import '../styles/reset.css'
import '../styles/index.css'
import '../styles/App.css'
import Hero from '../components/home/hero.astro'
import BaseLayout from '../layouts/base.astro'
import Summary from '../components/home/summary.astro'
Expand Down
3 changes: 0 additions & 3 deletions src/pages/projects/project.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
import '../../styles/reset.css'
import '../../styles/index.css'
import '../../styles/App.css'
import '../../styles/project.css'
import BaseLayout from '../../layouts/base.astro'
import Join from '../../components/join.astro'
Expand Down
14 changes: 14 additions & 0 deletions src/pages/version.json.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import childProcess from 'node:child_process'

// obtain Git commit hash
const hash = childProcess
.execSync('git rev-parse --short HEAD')
.toString()
.trim()

export async function GET() {
const versionMetadata = {
hash,
}
return new Response(JSON.stringify(versionMetadata))
}
8 changes: 3 additions & 5 deletions src/styles/App.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');
@font-face {
font-family: Mashine;
font-family: 'Mashine';
src:
url('/fonts/MashineBold.woff2') format('woff2'),
url('/fonts/MashineBold.woff') format('woff');
Expand All @@ -11,7 +9,7 @@
}

@font-face {
font-family: Mashine;
font-family: 'Mashine';
src:
url('/fonts/MashineSemiBold.woff2') format('woff2'),
url('/fonts/MashineSemiBold.woff') format('woff');
Expand Down Expand Up @@ -50,7 +48,7 @@ main {
justify-content: flex-end;
text-align: left;
color: var(--text);
font-family: Unbounded, sans-serif;
font-family: 'Unbounded Variable', sans-serif;
align-self: flex-start;
}

Expand Down
3 changes: 1 addition & 2 deletions src/styles/index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');
:root {
font-family: 'Open Sans', sans-serif;
font-family: 'Open Sans Variable', sans-serif;
line-height: 1.5;
font-weight: 400;

Expand Down
9 changes: 4 additions & 5 deletions src/styles/project.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
}

.title {
font-family: Unbounded, sans-serif;
font-family: 'Unbounded Variable', sans-serif;
}

.short-description {
font-family: Unbounded, sans-serif;
font-family: 'Unbounded Variable', sans-serif;
font-size: 2em;
opacity: 90%;
}
Expand All @@ -43,11 +43,11 @@
}

.stats h2 {
font-family: Unbounded, sans-serif;
font-family: 'Unbounded Variable', sans-serif;
}

.stats span {
font-family: Unbounded, sans-serif;
font-family: 'Unbounded Variable', sans-serif;
font-size: 1.2em;
}

Expand Down Expand Up @@ -141,7 +141,6 @@
}

@media (max-width: 768px) {

.main-container {
padding: 0px;
padding-top: 120px;
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/strict",
"extends": "astro/tsconfigs/strictest",
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react"
Expand Down

0 comments on commit fd6165f

Please sign in to comment.