Skip to content

Commit

Permalink
updating for final deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
snmln committed Apr 23, 2020
1 parent 33ca9fa commit c72bf27
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 101 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
-->
<!--Google fonts-->
<link href="https://fonts.googleapis.com/css?family=Oswald|Roboto&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@900&display=swap" rel="stylesheet">
<!--FontAwesome-->
<link rel="stylesheet" href="//use.fontawesome.com/releases/v5.0.7/css/all.css">
<!--<script src="https://use.fontawesome.com/9e4f30b371.js"></script>-->
Expand Down
17 changes: 14 additions & 3 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
:root{
--mainGrey: #BABBC5 ;
--mainGrey: #d9d9d9;
--LightGrey: #e8e8e8;
--mainWhite: #f3f3f3;
<<<<<<< HEAD
--mainWhite: #ffffff;
--mainDark: #0E1024 ;
--mainBlue: #C94343 ;
=======
--mainWhite: #f3f3f3;
--mainDark: #828282;
--mainBlue: #1414ff;
>>>>>>> parent of 33ca9fa... Changing products and updates
}

body{
Expand All @@ -13,11 +19,16 @@ body{
}

.text-title{
font-family: "Oswald", sans-serif;
font-family: 'Rubik', sans-serif;
letter-spacing: 0.3rem;
text-transform: uppercase;
}

.company-name{
font-family: 'Rubik', sans-serif !important;
font-size: 0.8rem !important;
}

.text-blue{
color:var(--mainBlue);
}
Expand Down
3 changes: 3 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ function App() {
<Route path="/details" component={Details} />
<Route path="/cart" component={Cart} />
<Route component={Default} />



</Switch>
<Modal />
</React.Fragment>
Expand Down
12 changes: 0 additions & 12 deletions src/components/Cart.js

This file was deleted.

30 changes: 3 additions & 27 deletions src/components/Cart/CartTotals.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import {Link} from "react-router-dom";
import NumberFormat from 'react-number-format';

export default function CartTotals({value}) {
const{cartSubtotal, cartTax, cartTotal, clearCart} = value;
Expand All @@ -21,41 +20,18 @@ export default function CartTotals({value}) {
<span className="text-title">
subtotal:
</span>
<NumberFormat
value={cartSubtotal}
displayType={'text'}
thousandSeparator={true}
prefix={'$'}
decimalScale ={2}
fixedDecimalScale ={true}
renderText={cartSubtotal => <strong>{cartSubtotal}</strong>} />

<strong>$ {cartSubtotal}</strong>
</h5>
<h5>
<span className="text-title">
tax:
</span>
<NumberFormat
value={cartTax}
displayType={'text'}
thousandSeparator={true}
prefix={'$'}
decimalScale ={2}
fixedDecimalScale ={true}
renderText={cartTax => <strong>{cartTax}</strong>} />
</span><strong>$ {cartTax}</strong>
</h5>
<h5>
<span className="text-title">
Total:
</span>
<NumberFormat
value={cartTotal}
displayType={'text'}
thousandSeparator={true}
prefix={'$'}
decimalScale ={2}
fixedDecimalScale ={true}
renderText={cartTotal => <strong>{cartTotal}</strong>} />
<strong>$ {cartTotal}</strong>
</h5>
</div>
</div>
Expand Down
18 changes: 11 additions & 7 deletions src/components/Details.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, {Component} from 'react';
import {ProductConsumer} from '../Context'
import {Link} from "react-router-dom";
import {ButtonContainer} from "./Button";
import NumberFormat from 'react-number-format';

export default class Details extends Component {
render() {
Expand All @@ -15,24 +14,26 @@ export default class Details extends Component {
{/*TITLE*/}
<div className="row">
<div className="col-10 mx-auto text-center text-blue text-slanted my-5">
<h1>{title}</h1>
<h1 className="text-title">{title}</h1>
</div>
</div>
{/*TITLE*/}
{/*Product info*/}
<div className="row">
<div className="col-10 mx-auto col-md-6 my-3 text-capitalize">
<div className="col-10 mx-auto col-md-6 my-3 ">
<img src={img} className="img-fluid" alt="product"/>
</div>

{/*Product text*/}

<div className="col-10 mx-auto col-md-6 my-3 text-capitalize">
<div className="col-10 mx-auto col-md-6 my-3 text-capitalize px-5">
<h2> model: {title}</h2>
<h4 className="text-title text-uppercase text-muted mt-3 mb-2">
<h4 className=" text-uppercase mt-3 mb-2">
made by: <span className="text-uppercase">
{company}</span>
</h4>

<<<<<<< HEAD
<hr/>
<h4 className="text-blue">
<strong>
<NumberFormat
Expand All @@ -45,11 +46,14 @@ export default class Details extends Component {
renderText={price => <span>{price}</span>} />{/*<span>${price}</span>*/}
</strong>
</h4>
=======
<h4 className="text-blue"><strong><span>${price}</span></strong></h4>
>>>>>>> parent of 33ca9fa... Changing products and updates
<p className="text-capitalize font-weight-bold mt-3 mb-0"> some info about the product</p>
<p className="text-muted lead">{info}</p>
{/*Buttons*/}

<div >
<div>
<Link to="/">
<ButtonContainer> Back to product</ButtonContainer>
</Link>
Expand Down
4 changes: 3 additions & 1 deletion src/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {ButtonContainer} from "./Button";
import {Link} from "react-router-dom";


export default class Modal extends Component {
class Modal extends Component {
render() {
return (
<ProductConsumer>
Expand Down Expand Up @@ -50,6 +50,8 @@ export default class Modal extends Component {
}
}

export default Modal;

const ModalContainer = styled.div`
position:fixed;
top:0;
Expand Down
15 changes: 9 additions & 6 deletions src/components/Product.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import styled from 'styled-components';
import {Link} from 'react-router-dom';
import {ProductConsumer} from "../Context";
import PropTypes from 'prop-types';
import NumberFormat from 'react-number-format';

export default class Product extends Component {
render() {
const {id, title, img, price, inCart, company} = this.props.product;
//var NumberFormat = require('react-number-format');
const {id, title, img, price, inCart} = this.props.product;

return (
<ProductWrapper className="col-9 mx-auto col-md-6 col-lg-3 my-3">
Expand All @@ -19,6 +17,7 @@ export default class Product extends Component {
className="img-container p-5"
onClick={()=>{
value.handleDetail(id);
value.openModal(id)
}}>
<Link to="/details">
<img src={img} alt="product" className="card-img-top"/>
Expand All @@ -28,8 +27,6 @@ export default class Product extends Component {
disabled={inCart ? true : false}
onClick={()=> {
value.addToCart(id);
value.openModal(id)

}
} >
{inCart ? (<p className="text-capitalize mb-0" disabled>In Cart</p>):(<i className="fa fa-cart-plus" />)}
Expand All @@ -41,7 +38,8 @@ export default class Product extends Component {
<div className="card-footer d-flex justify-content-between">
<p className="align-self-center mb-0">
{title}
<br/><strong>{company}</strong>
<<<<<<< HEAD
<br/><strong className="company-name">{company}</strong>
<hr className="py-2 w-auto"></hr>
<h5 className="text-blue font-italic mb-0">
{/*<span>${price}</span>*/}
Expand All @@ -56,6 +54,11 @@ export default class Product extends Component {
renderText={price => <span>{price}</span>} />

</h5>
=======
<h5 className="text-blue font-italic mb-0">
<span className="mr-1">${price}</span>
</h5>
>>>>>>> parent of 33ca9fa... Changing products and updates
</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProductList.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class ProductList extends Component{
<React.Fragment>
<div className="py-5">
<div className="container">
<Title name="our" title="products"/>
<Title name="OUR PRODUCTS"/>

<div className="row">
<ProductConsumer>
Expand Down
Loading

0 comments on commit c72bf27

Please sign in to comment.