Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #67

Merged
merged 16 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .github/workflows/deploy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/gatsby-transformer-monday/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const assemblePositionData = require('./assemble-positions')
const assembleColumnData = require('./assemble-columns')
const assembleDatesData = require('./assemble-dates')

const DEBUG = true
const DEBUG = false

async function onCreateNode({
actions,
Expand Down
43 changes: 9 additions & 34 deletions src/components/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'swiper/css/pagination';
import 'swiper/css/navigation';
import { Keyboard, Navigation, Pagination } from 'swiper/modules';

import { StudentSlide, MobileSlide } from './student-slide'
import { StudentSlide } from './student-slide'

export const Carousel = ({students}) => {

Expand All @@ -16,17 +16,20 @@ export const Carousel = ({students}) => {
keyboard={{
enabled: true,
}}
// navigation={{
// enabled: true,
// }}
navigation={{
enabled: true,
}}
pagination={{
clickable: true,
}}
grabCursor={true}
slidesPerView={2}
centeredSlides={true}
spaceBetween={60}
spaceBetween={80}
loop={true}
breakpoints={{
800: {slidesPerView: 2},
0: {slidesPerView: 1}
}}
>
{
students.map((student) => (
Expand All @@ -38,31 +41,3 @@ export const Carousel = ({students}) => {
</Swiper>
);
}

export const MobileCarousel = ({students}) => {

return (
<Swiper
modules={[ Keyboard, Navigation, Pagination]}
keyboard={{
enabled: true,
}}
pagination={{
clickable: true,
}}
grabCursor={true}
slidesPerView={1}
centeredSlides={true}
spaceBetween={60}
loop={true}
>
{
students.map((student) => (
<SwiperSlide key={`mobile-${student.student_name}`}>
<MobileSlide student={student}/>
</SwiperSlide>
))
}
</Swiper>
)
}
11 changes: 1 addition & 10 deletions src/components/sections/important-dates.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@ import { Section } from "../section"
import { DatesTable } from '../dates-table'
import ImportantDatesContent from '../../content/sections/important-dates.yaml'

export const ImportantDates = ({ content }) => {
const rows = content.nodes.map(({ name, dates, audience }) => ({
name,
dates: dates.reduce((acc, d) => {
acc[d.year] = d.date
return acc
}, {}),
audience,
}))

export const ImportantDates = ( ) => {

return (
<Section title='Important Dates' backgroundColor="#fff" height="55vh">
Expand Down
37 changes: 33 additions & 4 deletions src/components/sections/key-contacts.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,52 @@
import React from 'react'
import { Section } from '../section'
import { ParagraphGrid } from '../paragraph-grid';
import Grid from '@mui/joy/Grid';
import { Card, CardContent, AspectRatio, Typography } from '@mui/joy';
import { Link } from '../link'

export const KeyContacts = ({ content }) => {

return (
<Section
backgroundColor="#1A1B2F"
title={content.title}
textColor="#fff"
>
<Grid container spacing={2}>
<Grid container spacing={2} mb={3}>
{
content.people.map((person) => (
<ParagraphGrid key={`contact-${person.name}`} heading={person.name} body={person.description} color="#fff"/>
<Grid key={`contact-${person.name}`} xs={12} sm={12} md={6} >
<Card orientation="horizontal" size="lg"
sx={{ backgroundColor: '#ECF1F2' }}
>
<AspectRatio flex ratio="1" maxHeight={182} sx={{ minWidth: 182 }}>
<img loading="lazy" alt=""
src={person.photoURL}
/>
</AspectRatio>
<CardContent>
<Typography fontSize="xl" fontWeight="lg" >
{person.name}
</Typography>
<Typography>
{person.description}
</Typography>
</CardContent>
</Card>
</Grid>
))
}
</Grid>

<Typography level="h3" sx={{
textAlign: 'center', color: '#fff'
}}>Questions?</Typography>
<Typography sx={{textAlign: 'center', color: '#fff'}}>
Contact the team at <Link
to="mailto:[email protected]">[email protected]
</Link>
</Typography>

</Section>
)
}
15 changes: 0 additions & 15 deletions src/components/sections/programs/starShipPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,9 @@ import {
MainPanelButton
} from '../../program-tabs'
import ImportantDatesContent from '../../../content/sections/important-dates.yaml'
import { useStaticQuery, graphql } from "gatsby"
import { DatesTable } from '../../dates-table'

const datesQuery = graphql`query {
dates: allImportantDate {
nodes {
id
name
dates {
date
year
}
}
}
}`

export const StarShipPanel = ({title, content}) => {
const data = useStaticQuery(datesQuery)

return (
<Container maxWidth="md" sx={{margin: '1.5rem auto'}}>
Expand Down
11 changes: 3 additions & 8 deletions src/components/sections/star-showcase.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import React from 'react'
import { Carousel, MobileCarousel } from '../carousel'
import { Carousel } from '../carousel'
import { Sheet, Typography } from '@mui/joy'
import { useWindowWidth } from '../../hooks'

export const StarShowcase = ({ content }) => {
const { isCompact } = useWindowWidth();

return (
<Sheet
component="section"
Expand All @@ -19,10 +16,8 @@ export const StarShowcase = ({ content }) => {
my: 2,
color: '#fff'
}}>{content.title}</Typography>

{
isCompact ? <MobileCarousel students={content.students} /> : <Carousel students={content.students} />
}

<Carousel students={content.students} />

</Sheet>
)
Expand Down
100 changes: 16 additions & 84 deletions src/components/student-slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Button } from './button'
export const StudentSlide = ({student}) => {
const {
student_name,
semester,
title,
project_description,
project_link_text,
Expand All @@ -14,11 +15,11 @@ export const StudentSlide = ({student}) => {
return (
<Card
sx={{
height: '220px',
flexWrap: 'wrap',
marginTop: '1rem',
px: '3.5rem',
py: '2.5rem',
height: {xs: '180px', sm: '200px', md: '220px'},
px: {xs: '1rem', sm: '2rem', md: '2.5'},
pt: '1rem', pb: '3rem',
mt: '0.5rem',
mx: '1rem',
backgroundColor: '#ECF1F2',
}}
>
Expand All @@ -27,108 +28,39 @@ export const StudentSlide = ({student}) => {
flexDirection: 'column',
justifyContent: 'center'
}}>
<Typography
level="h3"
align="center"
<Typography level="h3" align="center"
sx={{
fontSize: '1.5rem',
fontSize: {xs: '1.2rem', sm: '1.25rem', md: '1.6rem'},
fontWeight: 600
}}
>
{student_name}
{project_description}
</Typography>

<Typography
align="center"
<Typography level="h4" align="center"
sx={{
fontSize: '1.2rem'
}}
>
{title}
</Typography>

<Typography
align="center"
sx={{
fontSize: '1rem',
fontStyle: 'italic',
}}
>{project_description}</Typography>
</CardContent>
<CardActions sx={{margin: '0 auto'}}>
<Button
component={Link}
to={project_link}
noIcon
external
>{project_link_text}</Button>
</CardActions>
</Card>
)
}


export const MobileSlide = ({student}) => {
const {
student_name,
title,
project_description,
project_link_text,
project_link } = student

return (
<Card
sx={{
height: {xs: '180px', sm: '200px'},
flexWrap: 'wrap',
marginTop: '1rem',
px: {xs: '1rem', sm: '2rem'},
pb: {xs: '2rem', sm: '2rem'},
mx: '1rem',
backgroundColor: '#ECF1F2',
}}
>
<CardContent sx={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center'
}}>
<Typography
level="h3"
align="center"
sx={{
fontSize: {xs: '1.2rem', sm: '1.25rem'},
fontWeight: 600
fontSize: '1.2rem',
}}
>
{student_name}
</Typography>

<Typography
align="center"
<Typography align="center"
sx={{
fontSize: {xs: '0.9rem', sm: '1rem'},
}}
>
{title}
{title}, {semester}
</Typography>

<Typography
align="center"
sx={{
fontSize: {xs: '1rem', sm: '1.1rem', md: '1.5rem'},
fontStyle: 'italic',
}}
>{project_description}</Typography>
</CardContent>
<CardActions sx={{margin: '0 auto'}}>
<Button
component={Link}
to={project_link}
noIcon
external
>{project_link_text}</Button>
>{project_link_text}</Button>
</CardActions>
</Card>
)
}


6 changes: 2 additions & 4 deletions src/content/sections/key-contacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ title: Key Contacts
people:
- name: Bryttany Todd
description: STAR Program Manager
photoURL: https://renci.org/wp-content/uploads/2019/05/RENCI_201905_Photo_Todd_Bryttany.jpg
- name: Ashley Hukins
description: STAR Program Coordinator
- name: Questions?
description: >
Contact the team at [email protected] or
join our slack channel, #star-program-info.
photoURL: https://ca.slack-edge.com/T0450N0TQ-U044V4MNF1B-263648a9357a-512
4 changes: 2 additions & 2 deletions src/content/sections/programs-overview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ starVenturesContent:
- heading: "Dates"
contentType: "ul"
content:
- title: "This year’s program will run from July 15 - August 2, 2024."
- title: "Registration is open from mid-April until spots are filled."
- title: "This program runs for 3 weeks during the summer. Check back later for Summer 2025 dates."
- title: "Registration will open in early 2025. Check back for registration deadlines and link."
- heading: "Requirements"
contentType: "ul"
content:
Expand Down
Loading