Skip to content

Commit

Permalink
(srp) Create SRP FUnctions
Browse files Browse the repository at this point in the history
  • Loading branch information
Easybuoy committed Mar 17, 2019
1 parent c7b6424 commit ad9ab84
Show file tree
Hide file tree
Showing 17 changed files with 577 additions and 591 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@babel/preset-react": "^7.0.0",
"@material-ui/core": "^3.0.3",
"@material-ui/icons": "^3.0.1",
"coveralls": "^3.0.3",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.11.2",
"grommet": "^1.11.0",
Expand Down
82 changes: 30 additions & 52 deletions src/components/card/Card.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
// eslint-disable-next-line import/no-extraneous-dependencies
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
Expand Down Expand Up @@ -50,11 +51,35 @@ class RecipeReviewCard extends React.Component {
render() {
const { classes } = this.props;

let button = <Button className="primary-color"><Link to = {`${this.props.buttonURL}`} style={{'color': 'white'}} > {this.props.buttonText}</Link></Button>;
let button = (
<Button className="primary-color">
<Link to={`${this.props.buttonURL}`} style={{'color': 'white'}}>
{' '}
{this.props.buttonText}
</Link>

</Button>
);
if(this.props.isExternalLink === 'true'){
button = <Button className="primary-color"><a target="_blank" style={{'color': 'white'}} href= {this.props.buttonURL}> {this.props.buttonText}</a></Button>;
button = (
<Button className="primary-color">
<a target="_blank" style={{'color': 'white'}} href={this.props.buttonURL}>
{' '}
{this.props.buttonText}
</a>

</Button>
);
}else if(this.props.ReloadLink){
button = <Button className="primary-color"><a style={{'color': 'white'}} href= {this.props.buttonURL}> {this.props.buttonText}</a></Button>;
button = (
<Button className="primary-color">
<a style={{'color': 'white'}} href={this.props.buttonURL}>
{' '}
{this.props.buttonText}
</a>

</Button>
);
}


Expand Down Expand Up @@ -88,60 +113,13 @@ class RecipeReviewCard extends React.Component {
}
} */}
<br></br>
<br></br>
<br />
<br />
{button}
{/* <Button className="primary-color"><a target="_blank" style={{'color': 'white'}} href= {this.props.buttonURL}> {this.props.buttonText}</a></Button> */}

</Typography>
</CardContent>
{/* <CardActions className={classes.actions} disableActionSpacing>
<IconButton aria-label="Add to favorites">
<FavoriteIcon />
</IconButton>
<IconButton aria-label="Share">
<ShareIcon />
</IconButton>
<IconButton
className={classnames(classes.expand, {
[classes.expandOpen]: this.state.expanded,
})}
onClick={this.handleExpandClick}
aria-expanded={this.state.expanded}
aria-label="Show more"
>
<ExpandMoreIcon />
</IconButton>
</CardActions> */}
{/* <Collapse in={this.state.expanded} timeout="auto" unmountOnExit>
<CardContent>
<Typography paragraph variant="body2">
Method:
</Typography>
<Typography paragraph>
Heat 1/2 cup of the broth in a pot until simmering, add saffron and set aside for 10
minutes.
</Typography>
<Typography paragraph>
Heat oil in a (14- to 16-inch) paella pan or a large, deep skillet over medium-high
heat. Add chicken, shrimp and chorizo, and cook, stirring occasionally until lightly
browned, 6 to 8 minutes. Transfer shrimp to a large plate and set aside, leaving
chicken and chorizo in the pan. Add pimentón, bay leaves, garlic, tomatoes, onion,
salt and pepper, and cook, stirring often until thickened and fragrant, about 10
minutes. Add saffron broth and remaining 4 1/2 cups chicken broth; bring to a boil.
</Typography>
<Typography paragraph>
Add rice and stir very gently to distribute. Top with artichokes and peppers, and cook
without stirring, until most of the liquid is absorbed, 15 to 18 minutes. Reduce heat
to medium-low, add reserved shrimp and mussels, tucking them down into the rice, and
cook again without stirring, until mussels have opened and rice is just tender, 5 to 7
minutes more. (Discard any mussels that don’t open.)
</Typography>
<Typography>
Set aside off of the heat to let rest for 10 minutes, and then serve.
</Typography>
</CardContent>
</Collapse> */}

</Card>

Expand Down
33 changes: 8 additions & 25 deletions src/components/navigation/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,45 +26,28 @@ render() {
<div className="navbar">
<Navbar style={bgBlue} dark expand="md" scrolling fixed="top">
<NavbarBrand href="/">
<strong><img src={navigationimg} alt="navigationimg" style={{width:'50px', height: '50px', borderRadius: '50%'}}></img>
</strong>
<strong>
<img src={navigationimg} alt="navigationimg" style={{width:'50px', height: '50px', borderRadius: '50%'}} />
</strong>
</NavbarBrand>
<NavbarToggler onClick={ this.onClick } />
<Collapse isOpen = { this.state.collapse } navbar>
<NavbarToggler onClick={this.onClick} />
<Collapse isOpen={this.state.collapse} navbar>
<NavbarNav left>
<NavItem active>
<NavLink to="/">Home</NavLink>
<NavLink to="/">Home</NavLink>
</NavItem>
<NavItem>
<NavLink to="movies">Movies</NavLink>
<NavLink to="movies">Movies</NavLink>
</NavItem>
<NavItem>
<NavLink to="tvseries">TV Series</NavLink>
<NavLink to="tvseries">TV Series</NavLink>
</NavItem>
<NavItem>
<NavLink to="/about">About</NavLink>
</NavItem>
</NavbarNav>
{/* <NavbarNav right>
<NavItem>
<NavLink target="_blank" to="https://github.com/easybuoy"><Fa icon="github" /></NavLink>
</NavItem>
<NavItem>
<NavLink target="_blank" to="https://codepen.io/easybuoy-the-flexboxer/"><Fa icon="codepen" /></NavLink>
</NavItem>
<NavItem>
<NavLink to="/www.twitter.com/easybuoy/"><Fa icon="twitter" /></NavLink>
</NavItem>
</NavbarNav> */}
</Collapse>
</Navbar>
{/* <Container style={container} className="text-center mt-5">
<h2>This Navbar is fixed</h2>
<h5>It will always stay visible on the top, even when you scroll do </h5>
<br/>
<p>Full page intro with background image will be always displayfull screen mode, regardless of device </p>
</Container> */}
</div>
);
}
Expand Down

0 comments on commit ad9ab84

Please sign in to comment.