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

Mobile how it works #48

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
27,144 changes: 23,830 additions & 3,314 deletions package-lock.json

Large diffs are not rendered by default.

43 changes: 34 additions & 9 deletions src/components/Header.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import styled from "styled-components";
import {Link} from "react-router-dom";
import {Typography} from "@material-ui/core";
import {colors} from "../theme";
import {ReactComponent as Logo} from "../assets/Logo.svg";

export const WhiteContainer = styled.header`
top: 0;
right:0;
width: 100%;
height: 98px;
height: 15vw;
z-index: 100;
display: flex;
position: fixed;
Expand All @@ -15,21 +17,31 @@ export const WhiteContainer = styled.header`
background-color: white;
justify-content: space-between;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.14);

@media(min-width: 30rem){
height: 8.5vw;
}

`;
export const TransparentContainer = styled.header`
top: 0;
right:0;
width: 100%;
height: 98px;
height: 15vw;
z-index: 100;
display: flex;
position: fixed;
overflow: hidden;
align-items: center;
justify-content: space-between;

@media(min-width: 30rem){
height: 8.5vw;
}
`;

export const FilterContainer = styled.div`
@media (min-width: 752px) {
@media (min-width: 30rem) {
display: none;
}
`;
Expand All @@ -39,13 +51,25 @@ export const HiddenContainer = styled.header`
`;

export const LogoWrapper = styled.div`
margin-left: 56px;
margin-left: 5.1vw;
`;

export const StyledLogo = styled(Logo)`
width: 40vw;
height: 25vw;

@media(min-width: 30rem){
width: 20vw;
height: 10vh;

}

`;

export const Menu = styled.div`
height: 100%;
display: flex;
padding-right: 88px;
padding-right: 8.1vw;
align-items: center;
justify-content: flex-end;
`;
Expand All @@ -54,22 +78,23 @@ export const SmallMenuContainer = styled.div`
display: block;
color: black;
text-align: center;
margin-left: 32px;
margin-left: 3vw;
text-decoration: none;
margin:0;

@media (min-width: 752px) {
@media (min-width: 30rem) {
display: none;
}
`;

export const MenuItem = styled(Link)`
display: none;

@media (min-width: 752px) {
@media (min-width: 30rem) {
display: block;
color: black;
text-align: center;
margin-left: 32px;
margin-left: 2.3vw;
text-decoration: none;
}
`;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, {useContext, useEffect, useState} from "react";
import {StyledComponent} from "styled-components";
import {Link, useLocation} from "react-router-dom";
import {ReactComponent as Logo} from "../assets/Logo.svg";

import {FilterBar} from "./results/FilterBar";

Expand All @@ -17,6 +16,7 @@ import {
FilterContainer,
HiddenContainer,
LogoWrapper,
StyledLogo,
Menu,
MenuItem,
SmallMenuContainer,
Expand Down Expand Up @@ -161,7 +161,7 @@ const Header: React.FC = () => {
return (
<Container>
<LogoWrapper>
<Logo role="logo" />
<StyledLogo role="logo" />
</LogoWrapper>
{isResultsPage && (
<FilterContainer>
Expand Down
55 changes: 42 additions & 13 deletions src/components/home/Home.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,69 @@ import styled from "styled-components";
import {ReactComponent as LandingPageSky} from "../../assets/LandingPageSky.svg";

export const PageContainer = styled.div`
display: flex;
flex-direction: column;
`;

export const SectionContainer = styled.div`
display: flex;
flex-wrap: wrap;
min-height: 100vh;
width: 100%;
position: relative;
width: 100%;
display: flex;
flex-direction: column;

@media(min-width: 30rem){
display: flex;
flex-wrap: wrap;
flex-direction: row;
}
`;

export const ImageSection = styled.div`
flex: 1 1 0;
position: relative;
height: 70vw;

@media(min-width: 30rem){
flex: 0.5;
height: 55vw;
}
`;

export const StyledLandingPageSky = styled(LandingPageSky)`
position: absolute;
left: 0px;
width: 80vw;
height: 80vw;

@media(min-width: 30rem){
width: 46vw;
max-width: 530px;
height: 46vw;
max-height: 530px;
}
`;

export const StyledStoreFront = styled.img`
position: absolute;
width: 800px;
height: 800px;
width: 72vw;
height: 72vw;
left: 0px;
top: 150px;
top: 13vw;

@media(min-width: 30rem){
width: 43vw;
max-width: 500px;
height: 43vw;
max-height: 500px;
top: 8vw;
}
`;

export const SearchSection = styled.div`
flex: 1 1 0;
flex: 0.5;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 1;
margin-top: 10vw;

@media(min-width: 30rem){
margin-top: 10vw;
}
`;
3 changes: 2 additions & 1 deletion src/components/home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import React, {useEffect, useRef} from "react";
import {
PageContainer,
Expand Down Expand Up @@ -36,7 +37,7 @@ const Home: React.FC<RouteComponentProps<{}, {}, LocationState>> = ({
<PageContainer>
<SectionContainer>
<ImageSection>
<StyledLandingPageSky title="Landing page sky" />
<StyledLandingPageSky title="Landing page sky" />
<StyledStoreFront src={Storefront} alt="Storefront" />
</ImageSection>
<SearchSection>
Expand Down
68 changes: 47 additions & 21 deletions src/components/home/HowItWorks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,75 @@ import Typography from "@material-ui/core/Typography";

const Container = styled.div`
width: 100%;
padding: 10% 0px;
padding: 1vw 0;
display: flex;
flex-direction: column;
justify-content: center;
`;

const SectionContainer = styled.div`
display: flex;
justify-content: space-evenly;
flex-direction: column;
align-items: center;
flex-wrap: wrap;
margin-top: 85px;
width: 100%;
margin-top: 6vw;

@media(min-width: 30rem){
flex-direction: row;
justify-content: space-evenly;
}
`;

const Section = styled.div`
width: 260px;
height: 523px;
width: 90%;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 7vw;
padding: 1vw;

@media(min-width: 30rem){
width: 23.9vw;
height: 48.1vw;
margin-bottom: 2vw;
}
`;

const SectionHeading = styled.div`
margin-bottom: 24px;
margin-bottom: 2.2vw;
`;

const LeftImg = styled.img`
width: 272px;
height: 253px;
padding: 0px;
margin-bottom: 24px;
width: 60%;

@media(min-width: 30rem){
width: 25vw;
height: 23.2vw;
margin-bottom: 2.2vw;
}
`;

const MiddleImg = styled.img`
width: 259.5px;
height: 253px;
padding: 0px;
margin-bottom: 24px;
width: 60%;

@media(min-width: 30rem){
width: 23.8vw;
height: 23.2vw;
padding: 0px;
margin-bottom: 2.2vw;
}
`;

const RightImg = styled.img`
width: 237px;
height: 253px;
padding: 0px;
margin-bottom: 24px;
width: 60%;

@media(min-width: 30rem){
width: 21vw;
height: 23.2vw;
padding: 0px;
margin-bottom: 2.2vw;
}
`;

const HowItWorks: React.FC = () => {
Expand All @@ -63,7 +89,7 @@ const HowItWorks: React.FC = () => {
<SectionHeading>
<Typography variant="h5">We scrape the internet</Typography>
</SectionHeading>
<Typography>
<Typography variant="body1">
We search across government websites, social media, and fundraising
platforms to look for financial aid. We then help categorize them so
it’s easy for you to find.
Expand All @@ -75,7 +101,7 @@ const HowItWorks: React.FC = () => {
<SectionHeading>
<Typography variant="h5">Search our database</Typography>
</SectionHeading>
<Typography>
<Typography variant="body1">
Here you can filter by grant qualifications. Once you find a loan or
grant, you can apply through the original website.
</Typography>
Expand All @@ -86,7 +112,7 @@ const HowItWorks: React.FC = () => {
<SectionHeading>
<Typography variant="h5">Help us look</Typography>
</SectionHeading>
<Typography>
<Typography variant="body1">
Found a fund that isn’t on our website? Help the community by
letting us know, so we can add it to our database.
</Typography>
Expand Down
Loading