Skip to content

Commit 99e2c50

Browse files
author
Ryan Hodge
committed
Fixing owl logo
1 parent 4123fab commit 99e2c50

File tree

8 files changed

+115
-135
lines changed

8 files changed

+115
-135
lines changed

src/assets/pics/logos/TransRoboOwl.svg

Lines changed: 51 additions & 99 deletions
Loading

src/pages/events/EventList.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { EventObject } from '../../tools/CustomTypes'
33

44
import Styles from './EventListStyles'
55

6+
const dayOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
7+
68
class EventList extends React.Component<{events: EventObject[], loading: boolean}, never> {
79
render (): React.ReactElement {
810
if (this.props.events.length === 0) {
@@ -14,8 +16,11 @@ class EventList extends React.Component<{events: EventObject[], loading: boolean
1416
return (
1517
<Styles.EventItemContainer key={i}>
1618
<h2 className='title'>{event.title}</h2>
17-
<div className='date'>
19+
<div className='date' style={{display: 'flex', flexDirection: 'column', rowGap: '13%'}}>
1820
<p>{!isNaN(event.date.getMonth()) ? `${event.date.getMonth() + 1}/${event.date.getDate()}` : 'TBD'}</p>
21+
<p className='day-of-week' style={{margin: '0'}}>
22+
{event?.weekly ? `Weekly on ${dayOfWeek[event.date.getDay()]}'s` : ''}
23+
</p>
1924
</div>
2025
<div className='location'>
2126
<p>Location: {event.location}</p>

src/pages/events/EventListStyles.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,9 @@ export default class EventListStyles {
6565
& > div > p {
6666
margin: 0;
6767
}
68+
69+
& > div > .day-of-week {
70+
${FONT_FAMILY.BODY}
71+
}
6872
`
6973
}

src/pages/events/Events.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Contact from '../general/contact/Contact'
1010
import { EventObject } from '../../tools/CustomTypes'
1111
import { COLORS } from '../../tools/Constants'
1212
import { getEvents } from '../../tools/services/getEvents'
13-
import EventSignUp from './EventSignUp'
13+
// import EventSignUp from './EventSignUp'
1414
import EVENT_SIGNUP_INFO from '../../data/EventSignUpInfo'
1515

1616
export type EventsState = {
@@ -59,9 +59,10 @@ class Events extends React.Component<unknown, EventsState>{
5959
<h2 className='title'>Events</h2>
6060
<AiOutlineDash/>
6161
</Styles.TitleContainer>
62-
<Styles.EventSignUps>
62+
{/* Uncomment for event sign-ups */}
63+
{/* <Styles.EventSignUps>
6364
{EVENT_SIGNUP_INFO.map((event, i) => <EventSignUp key={i} events={event}/>)}
64-
</Styles.EventSignUps>
65+
</Styles.EventSignUps> */}
6566
{this.renderEvents(parseFloat(width) * 0.03)}
6667
<Contact/>
6768
</Styles.EventsContainer>

src/pages/events/EventsStyles.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ export default class EventsStyles {
99
align-items: center;
1010
grid-template-rows:
1111
calc(var(--vh) * .2)
12-
calc(var(--vh) * .2)
12+
/* Uncomment for event sign-ups */
13+
/* calc(var(--vh) * .2) */
1314
calc(var(--vh) * ${props => props.numOfEvents === 0 ? 1 : props.numOfEvents} * .2)
1415
calc(var(--vh) * .2);
1516

src/pages/home/Home.tsx

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import Button from '../general/button/Button'
1212
// Images
1313
import nasaLogo from '../../assets/pics/logos/nasa.png'
1414
import HOME_CAROUSEL_INFO from '../../data/HomeCarouselInfo'
15-
import TOwl from '../../assets/pics/logos/TransRoboOwl.svg'
1615
const TEAMS = `https://teams.microsoft.com/l/team/19%3aeaf903fd81cd48eba95d8e769ed78544%40thread.tacv2/conversations?groupId=8f
1716
78ecbb-62f3-4b2c-bda7-7488eca908ee&tenantId=716e81ef-b522-4473-8e31-10bd02ccf6e5`
17+
1818
const Home = (): React.ReactElement => {
1919
return (
2020
<Styles.HomeContainer>
@@ -36,37 +36,27 @@ const Home = (): React.ReactElement => {
3636
<img src={nasaLogo} alt='NASA'/>
3737
</Styles.VideoSource>
3838

39-
<Styles.SectionHeader>
40-
<h2>
41-
<img src={TOwl}
42-
alt='Owl'
43-
style={{
44-
width: '150px', // Set the width of the image
45-
height: '150px', // Set the height of the image
46-
margin: '0 0 0 -100px',// Set the margin around the image
47-
float: 'left'
48-
// us a .docx
49-
50-
}}
51-
/>
52-
Sign up and contact us on teams!</h2>
53-
<div className='button-container'>
54-
<Button text={'Sign up here!'} size={'large'} source={'https://forms.gle/rp6BY6h4doLkZQ2E8'}/>
55-
<Button text='Join Teams Here!' source={TEAMS}/>
56-
</div>
57-
</Styles.SectionHeader>
39+
<Styles.SectionHeaderGradient>
40+
<Styles.SectionHeader>
41+
<h2>Sign up and contact us on teams!</h2>
42+
<div className='button-container'>
43+
<Button text={'Sign up here!'} size={'large'} source={'https://forms.gle/rp6BY6h4doLkZQ2E8'}/>
44+
<Button text='Join Teams Here!' source={TEAMS}/>
45+
</div>
46+
</Styles.SectionHeader>
47+
</Styles.SectionHeaderGradient>
5848

5949

6050

6151
<Carousel slideInfo={HOME_CAROUSEL_INFO}/>
6252

63-
<Styles.SectionHeader>
53+
<Styles.MerchHeader>
6454
<h2>Help Temple Space Exploration get to the moon!</h2>
6555
<div className='button-container'>
6656
<Button source={'https://temple-robotics.creator-spring.com/?'} text={'Buy Merchandise'} size={'large'}/>
6757
<Button source={'/sponsors'} text={'Become a Sponsor'} size={'large'} local/>
6858
</div>
69-
</Styles.SectionHeader>
59+
</Styles.MerchHeader>
7060

7161
{/* TODO: Put in a merchandise section */}
7262

src/pages/home/HomeStyles.tsx

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import styled from 'styled-components'
22

33
import { COLORS, FONT_FAMILY } from '../../tools/Constants'
4+
import TOwl from '../../assets/pics/logos/TransRoboOwl.svg'
45

56
export default class HomeStyles {
67

@@ -54,7 +55,38 @@ export default class HomeStyles {
5455
${FONT_FAMILY.SUBTITLE}
5556
`
5657

58+
static readonly SectionHeaderGradient = styled.div`
59+
display: flex;
60+
height: 100%;
61+
background: linear-gradient(200deg, ${COLORS.PRIMARY}, #996b72, ${COLORS.PRIMARY});
62+
`
63+
5764
static readonly SectionHeader = styled.div`
65+
display: flex;
66+
justify-content: center;
67+
width: 100%;
68+
flex-direction: column;
69+
background-image: url(${TOwl});
70+
background-repeat: no-repeat no-repeat;
71+
background-position: center;
72+
row-gap: 10%;
73+
height: 80%;
74+
align-self: center;
75+
76+
& > h2 {
77+
text-align: center;
78+
${FONT_FAMILY.SECONDARY_TITLE}
79+
}
80+
81+
& > .button-container {
82+
width: 100%;
83+
display: flex;
84+
column-gap: 10%;
85+
justify-content: center;
86+
}
87+
`
88+
89+
static readonly MerchHeader = styled.div`
5890
display: flex;
5991
flex-direction: column;
6092
align-items: center;
@@ -76,13 +108,6 @@ export default class HomeStyles {
76108
justify-content: center;
77109
align-items: center;
78110
}
79-
80-
& > img {
81-
width: 50%; // Set the width of the image
82-
height: 50%; // Set the height of the image
83-
float: left;
84-
/* margin: 0 0 0 -500px; */
85-
}
86111
`
87112

88113
static readonly VideoSource = styled.div`

src/tools/services/getEvents.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ function handleWeeklyEvents(events: EventObject[]): EventObject[] {
3030
// Handle weekly dates
3131
events.forEach(event => {
3232
const currentDayForWeek = new Date()
33-
if (event.weekly) {
34-
event.date.setDate(currentDayForWeek.getDate() + (7 + event.date.getDay() - currentDayForWeek.getDay()) % 7)
33+
const dayOffset = (7 + event.date.getDay() - currentDayForWeek.getDay()) % 7
34+
if (event.weekly && event.date < currentDayForWeek) {
35+
const newDate = currentDayForWeek.getTime() + dayOffset * 24 * 60 * 60 * 1000
36+
event.date = new Date(newDate)
3537
}
3638
})
3739

0 commit comments

Comments
 (0)