Skip to content

Commit

Permalink
First adds to home page
Browse files Browse the repository at this point in the history
  • Loading branch information
javpet committed Nov 30, 2019
1 parent c758662 commit 589be16
Show file tree
Hide file tree
Showing 11 changed files with 219 additions and 8 deletions.
Binary file added public/images/polaroid-sing-for-needs-1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/polaroid-sing-for-needs-2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/polaroid-sing-for-needs-3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/sing-for-needs-home-page-bg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/components/Layout/Footer/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
display: flex;
flex-wrap: wrap;
width: 100%;
margin-top: $margin-l;
}

.footer-container__copyright {
Expand Down Expand Up @@ -67,6 +68,10 @@
}

@media only screen and (min-width: 576px) {
.footer__container {
margin-top: $margin-l;
}

.footer-container__copyright {
text-align: left;
}
Expand Down
3 changes: 1 addition & 2 deletions src/components/Layout/Header/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
z-index: 100;
width: 100%;
background-color: $primary-color-darkblue-lighter;
box-shadow: 0 12px 30px rgba($primary-color-darkblue, .4);
box-shadow: 0 12px 30px rgba($primary-color-darkblue, 0.4);
top: 0;
@media only screen and (min-width: 992px) {
position: static;
}
}

34 changes: 33 additions & 1 deletion src/containers/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,39 @@ import React, { Component } from 'react'

class Home extends Component {
render() {
return <div>Home</div>
return (
<div className="home-container">
<div className="intro-text">
<h1 className="intro-heading">Drive the change with music</h1>
<p className="intro-paragraph">
Sing for Needs is a donation platform, which connects music
performances with inspiring causes to create change together with
the fans
</p>
<button className="intro-cta">Get started with Sing for Needs</button>
<p className="intro-usp">
Join over 100,000 artists, causes and changemakers
</p>
</div>
<div className="intro-visuals">
<img
id="image-1"
src="images/polaroid-sing-for-needs-1.jpg"
alt="Singer on the chair -- photo from Unsplash.com"
/>
<img
id="image-2"
src="images/polaroid-sing-for-needs-2.jpg"
alt="Singer on the chair -- photo from Unsplash.com"
/>
<img
id="image-3"
src="images/polaroid-sing-for-needs-3.jpg"
alt="Singer on the chair -- photo from Unsplash.com"
/>
</div>
</div>
)
}
}

Expand Down
159 changes: 159 additions & 0 deletions src/containers/Home/Home.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
.home-container {
display: flex;
justify-content: space-between;
flex-direction: column;
grid-column: 1/-1;
margin-top: $margin-l;
margin-bottom: $margin-xxl;
background-color: $primary-color-accent;
height: 500px;
background-image: radial-gradient(
ellipse at 50%,
rgba(21, 24, 40, 0.31) 0%,
$primary-color-darkblue 70%
),
url("/images/sing-for-needs-home-page-bg.jpg");
background-size: cover;

h1,
p {
color: $primary-color-white;
}

h1 {
font-family: "proxima-nova", sans-serif;
font-weight: 800;
font-style: normal;
font-size: 3.157rem;
line-height: 0.9;
margin-bottom: $margin-s;
}

button {
margin-top: $margin-r;
margin-bottom: $margin-xs;
max-width: fit-content;
}

.intro-text {
display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
margin-bottom: $margin-l;

p.intro-usp {
color: $primary-color-white-darkest;
}
}

.intro-visuals {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
width: 100%;
height: 350px;
margin-top: $margin-xxl;

img {
position: absolute;
width: 50%;
box-shadow: 0 19px 38px rgba($primary-color-darkblue-lighter, 0.3),
0 15px 12px rgba($primary-color-darkblue-lighter, 0.22);
}

#image-1 {
top: auto;
left: -1%;
transform: rotate(-15deg);
transition: transform 300ms ease;

&:hover {
transform: rotate(-15deg) translateY(-10px);
z-index: 3;
}
}

#image-2 {
transition: transform 300ms ease;

&:hover {
transform: translateY(-10px);
z-index: 3;
}
}

#image-3 {
bottom: auto;
left: 50%;
transform: rotate(15deg);
transition: transform 300ms ease;

&:hover {
transform: rotate(15deg) translateY(-10px);
z-index: 3;
}
}
}
}

@media only screen and (min-width: 576px) {
.home-container {
.intro-text {
margin-bottom: $margin-xxl;
}

.intro-visuals {
img {
width: 40%;
}
}
}
}

@media only screen and (min-width: 992px) {
.home-container {
flex-direction: row;

button {
margin-top: $margin-xl;
}

.intro-text {
width: 55%;

h1 {
font-family: "proxima-nova", sans-serif;
font-weight: 800;
font-style: normal;
font-size: 4.209rem;
line-height: 0.9;
}

p {
width: 80%;
}
}

.intro-visuals {
width: 50%;

img {
width: 50%;
}

#image-1 {
top: 10%;
}

#image-2 {
}

#image-3 {
bottom: 5%;
}
}
}
}
21 changes: 18 additions & 3 deletions src/containers/Home/Home.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,23 @@ import { shallow } from 'enzyme'

// Need at least 1 test to pass Travis CI
describe('<Home />', () => {
it('contains the text Home', () => {
const homeWrapper = shallow(<Home />)
expect(homeWrapper.text()).toEqual('Home')
let homeWrapper

beforeEach(() => {
homeWrapper = shallow(<Home />)
})

it("contains the headline 'Drive the change with music'", () => {
expect(homeWrapper.find('h1').text()).toEqual(
'Drive the change with music'
)
})

it('contains a call to action button', () => {
expect(homeWrapper.find('button').length).toEqual(1)
})

it('contains 3 mood images about artists', () => {
expect(homeWrapper.find('img').length).toEqual(3)
})
})
1 change: 1 addition & 0 deletions src/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@import "components/Layout/Footer/footer.scss";
@import "components/Layout/NavBar/navBar.scss";
@import "components/Layout/Logo/Logo.scss";
@import "containers/Home/Home.scss";
@import "containers/Artist/artist.scss";
@import "containers/About/About.scss";
@import "containers/Contact/Contact.scss";
Expand Down
4 changes: 2 additions & 2 deletions src/styles/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ h1,
font-weight: 800;
font-style: normal;
font-size: 4.209rem;
line-height: 1;
line-height: 0.9;
}

h2,
Expand All @@ -29,7 +29,7 @@ h2,
font-weight: 800;
font-style: normal;
font-size: 3.157rem;
line-height: 1;
line-height: 0.9;
}

h3,
Expand Down

0 comments on commit 589be16

Please sign in to comment.