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

Header #11

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
75 changes: 40 additions & 35 deletions src/assets/rocket-monitor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions src/components/Activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import styles from "../css/Activity.module.css";

export default props => {
return (
<div id={styles.container}>
<div className={styles.squareBackground}></div>
<img style={props.imagePos} src={props.image} className={styles.image} alt={props.altText} />
<>
<div className={styles.squareBackground}>
<img style={props.imagePos} src={props.image} className={styles.image} alt={props.altText} />
</div>
<div className={styles.text}>
<h1 id={styles.textTitle}>{props.title}</h1>
<p id={styles.textBody}>{props.msg}</p>
</div>
</div>
</>
)
}
34 changes: 34 additions & 0 deletions src/components/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';

import Button from './Button'
import styles from '../css/Header.module.css';

import surge from "../assets/surge.svg"
import rocketMonitor from "../assets/rocket-monitor.svg"

export default props => {
return (
<div className={styles.wrapper}>
<div className={styles.backgroundContainer}>
<img className={styles.logo} src={surge} alt="SFU Surge Logo" />
<div className={styles.headerText}>
<h1 className={styles.mandate}>{props.mandate}</h1>
<p className={styles.mission}>{props.mission}</p>
</div>
<div className={styles.btn}>
<Button
text="Join the Movement"
// link="/mailchimp"
style={{ width: "40%", height: "35px", fontSize: "12px", backgroundColor: "var(--color-btnPrimary)", margin: "0" }}
/>
<Button
text="Learn More"
// link="/about"
style={{ width: "40%", height: "35px", fontSize: "12px", backgroundColor: "var(--color-btnSecondary", margin: "0" }}
/>
</div>
</div>
<img className={styles.rocketMonitor} src={rocketMonitor} alt="" />
</div>
)
}
2 changes: 1 addition & 1 deletion src/components/UpcomingEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default props => {
<img src={clock} alt="Time" />
<p>{props.time}</p>
</div>
<a className={styles.fbEvent} href={props.link}>{props.title}</a>
<a className={styles.fbEvent} href={props.fbLink}>{props.title}</a>
</div>
</div>
)
Expand Down
18 changes: 5 additions & 13 deletions src/css/Activity.module.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
#container {
position: relative;
margin-left: 12%;
margin-bottom: 250px;
}

.squareBackground {
width: 75%;
width: 90%;
height: calc(65vw);
background-color: var(--color-img);
}

.image {
width: 70%;
float: right;
margin-right: 15%;
transform: translateY(-105%);
width: 90%;
}

.text {
position: absolute;
width: 85%;
/* width: 90%; */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commented style, either remove or uncomment

text-align: left;
color: var(--color-main);
margin-top: -10px;
margin-bottom: 45px;
}

#textTitle {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

font-weight should be 600, also font-size should be set to --fontSize-mobile-subHeading

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this might just be a differnt PR/branch to clean up homepage as a whole, but there is not style tag named textBody in this file, but one is used to style the <p> tag in Activity.js

Expand Down
1 change: 1 addition & 0 deletions src/css/Button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
background-color: var(--color-btnPrimary);
font-family: var(--color-main);
font-weight: 600;
font-size: 20px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont use hardcoded fontsize.

color: #FFFFFF;
text-decoration: none;
}
Expand Down
47 changes: 47 additions & 0 deletions src/css/Header.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.wrapper {
height: 100%;
margin-bottom: 30px;
display: flex;
flex-direction: column;
text-align: center;
align-items: center;
}

.backgroundContainer {
background-image: url(../assets/frontpage-background.svg);
background-size: cover;
height: 475px;
}

.logo {
margin-top: 50px;
}

.headerText {
color: var(--color-main);
justify-content: center;
text-align: center;
}

.mandate {
font-size: var(--fontSize-mobile-subHeading);
font-size: 20px;
}

.mission {
width: 75%;
margin: auto;
text-align: left;
font-size: 16px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use hardcoded font-size (use --fontSize-mobile-body in this case)

}

.btn {
margin-top: 20px;
display: flex;
justify-content: space-evenly;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really what happing in the designs, I would recommend you set justify-content: space-between;, margin: 20px auto 0 auto (replace margin-top) and give this container the same width as the .mission.

}

.rocketMonitor {
width: 80%;
margin-top: -30%;
}
37 changes: 37 additions & 0 deletions src/css/Homepage.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.wrapper {
display: flex;
flex-direction: column;
justify-content: center;
}

.title {
color: var(--color-main);
font-size: 20px;
text-align: center;
margin-bottom: 25px;
}

.activities {
display: flex;
flex-direction: column;
justify-content: center;
align-self: center;
width: 80%;
}

.spotlight {
margin: -30px auto 10px auto;
width: 80%;
}

.stream {
font-size: 16px;
color: var(--color-btnSecondary)
}

.upcomingEvents {
font-size: 30px;
font-weight: 600;
color: var(--color-main);
text-align: center;
}
Loading