Skip to content

Commit

Permalink
Bp 7 build before and after component (#12)
Browse files Browse the repository at this point in the history
* Added design for the homepage.

* Added Before and After photos and text.

* Styled the before and after component.

* Style before and after, add pathing and pictures out of public/

* Changed spacing in Before and After Component.

* Addressed Feedback, including style changes and font changes.

Co-authored-by: Minh Lu <[email protected]>
  • Loading branch information
micksumm and MinhLu12 authored Jun 22, 2020
1 parent 359c969 commit bafd4e0
Show file tree
Hide file tree
Showing 18 changed files with 132 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
SASS_PATH=src/
SASS_PATH=src/
NODE_PATH=src/
5 changes: 4 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import React from "react";
import Navigation from "./components/Navigation/Navigation";
import ContactInfo from "./components/ContactInfo/ContactInfo";
import BeforeAndAfter from "./components/BeforeAndAfter/BeforeAndAfter";

export default function App() {
return (
<>
<Navigation></Navigation>
<div style={{minHeight: "1000px"}}></div>
<div style={{minHeight: "507px"}}></div>
<BeforeAndAfter></BeforeAndAfter>
<div style={{minHeight: "400px"}}></div>
<ContactInfo></ContactInfo>
</>
)
Expand Down
Binary file added src/assets/before_and_after/teeth-after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/before_and_after/teeth-before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/fonts/OpenSans-Regular.ttf
Binary file not shown.
Binary file added src/assets/fonts/PlayfairDisplay-Bold.ttf
Binary file not shown.
Binary file added src/assets/fonts/PlayfairDisplay-Regular.ttf
Binary file not shown.
Binary file added src/assets/fonts/Raleway-Bold.ttf
Binary file not shown.
Binary file added src/assets/fonts/Raleway-Regular.ttf
Binary file not shown.
28 changes: 28 additions & 0 deletions src/components/BeforeAndAfter/BeforeAndAfter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react';
import cn from './BeforeAndAfter.module.scss';
import teethBefore from 'assets/before_and_after/teeth-before.png';
import teethAfter from 'assets/before_and_after/teeth-after.png';

const BeforeAndAfter = () => {
return (
<>
<div className={cn.BeforeAndAfter}>

<div className={cn.Images}>
<img src={teethBefore}></img>
<img src={teethAfter}></img>
</div>

<div className={cn.Text}>
<span className={cn.Header}>Creating Smiles with a Gentle touch.</span>
<span className={cn.Captions}>
<a href="#">Click here</a> to view our full smile gallery.
</span>
</div>

</div>
</>
)
}

export default BeforeAndAfter;
45 changes: 45 additions & 0 deletions src/components/BeforeAndAfter/BeforeAndAfter.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@import 'global.scss';

.BeforeAndAfter {
display: flex;
justify-content: center;
background-color: $teriary-background-color;
min-height: 160px;
color: $primary-text;
}

.Images {
align-items: center;
display: flex;
justify-content: flex-end;
}

.Images :nth-child(2) {
margin-left: 6%;
}

.Text {
margin-left: 2%;
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

.Header {
font-family: PlayfairDisplay-Bold;
font-size: 30px;
margin-bottom: 0px;
}

.Captions {
font-family: PlayfairDisplay-Regular;
font-size: 27px;
color: $primary-text;
margin-top: 0;
display: inline-block;
}

.Captions a {
color: $primary-text;
}
4 changes: 2 additions & 2 deletions src/components/ContactInfo/ContactInfo.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'scss/global.scss';
@import 'global.scss';

.ContactInfo {
display: flex;
Expand All @@ -10,7 +10,7 @@
line-height: 10px;
font-size: 14px;
letter-spacing: 0.02857em;
color: $primary-text;;
color: $primary-text;
text-transform: uppercase;
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/Navigation/Navigation.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'scss/global.scss';
@import 'global.scss';

.AppBar {
background-color: $primary-background-color;
Expand Down Expand Up @@ -27,6 +27,6 @@
}

.Button {
background-color: $secondary-background-color;
background-color: $teriary-background-color;
color: $primary-text;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'scss/global.scss';
@import 'global.scss';

.TabUnderline {
background-color: transparent !important;
Expand Down
47 changes: 47 additions & 0 deletions src/global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Background colors
$primary-background-color: #304774 !important;
$secondary-background-color: #E4EAF1 !important;
$teriary-background-color: #73305B !important;

// Texts
$primary-text: white !important;

body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

@font-face {
font-family: 'OpenSans-Regular';
src: local('OpenSans-Regular'), url(./assets/fonts/OpenSans-Regular.ttf) format('truetype');
}

@font-face {
font-family: 'PlayfairDisplay-Bold';
src: local('PlayfairDisplay-Bold'), url(./assets/fonts/PlayfairDisplay-Bold.ttf) format('truetype');
}

@font-face {
font-family: 'PlayfairDisplay-Regular';
src: local('PlayfairDisplay-Regular'), url(./assets/fonts/PlayfairDisplay-Regular.ttf) format('truetype');
}

@font-face {
font-family: 'Raleway-Bold';
src: local('Raleway-Bold'), url(./assets/fonts/Raleway-Bold.ttf) format('truetype');
}

@font-face {
font-family: 'Raleway-Regular';
src: local('Raleway-Regular'), url(./assets/fonts/Raleway-Regular.ttf) format('truetype');
}

13 changes: 0 additions & 13 deletions src/index.css

This file was deleted.

2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import './global.scss';
import App from './App';

ReactDOM.render(
Expand Down
6 changes: 0 additions & 6 deletions src/scss/global.scss

This file was deleted.

0 comments on commit bafd4e0

Please sign in to comment.