Skip to content

Commit

Permalink
story dashboard design + changing button.scss and delete small-button
Browse files Browse the repository at this point in the history
  • Loading branch information
polo-potato committed Jul 23, 2018
1 parent 71e4b9b commit 11f1ba3
Show file tree
Hide file tree
Showing 21 changed files with 204 additions and 242 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added src/.DS_Store
Binary file not shown.
23 changes: 15 additions & 8 deletions src/components/ModuleEditCard/ModuleEditCard.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import './ModuleEditCard.css';
import { Trash, Edit, ChevronUp, ChevronDown } from 'react-feather';
import Link from '../../../node_modules/react-router-dom/Link';


export default class ModuleEditCard extends React.Component {
Expand All @@ -14,20 +16,25 @@ export default class ModuleEditCard extends React.Component {
orderDisabled,
text } = this.props;

return <div className="story-module row">
return <div className="story-module row justify-content-between">
<div className="col-md-8">
<h1 className="type-title row">({order + 1}) { type }</h1>
<div className="row">
<p>{ text }</p>
</div>
</div>
<div className="module-button-container col-md-1">
<button disabled={deleteDisabled} className="module-delete row" onClick={(e) => {
if (window.confirm("This is IRREVERSIBLE!"))
onDelete(e);
}}>delete</button>
<button disabled={orderDisabled} className="module-up row" onClick={(e) => onOrderUp(e)}>Up</button>
<button disabled={orderDisabled} className="module-down row" onClick={(e) => onOrderDown(e)}>Down</button>
<div className="col-md-1">
<div className="module-button-container float-right">
<Link disabled={deleteDisabled} className="module-delete row" to="#" onClick={(e) => {
if (window.confirm("This is IRREVERSIBLE!"))
onDelete(e);
}}><Trash size="20"/></Link>
<Link className="module-edit row" to="#"><Edit size="20" /></Link>
<div className="row module-up-down-container align-self-end">
<Link disabled={orderDisabled} className="module-up" to="#" onClick={(e) => onOrderUp(e)}><ChevronUp size="20"/></Link>
<Link disabled={orderDisabled} className="module-down" to="#" onClick={(e) => onOrderDown(e)}><ChevronDown size="20"/></Link>
</div>
</div>
</div>
</div>;
}
Expand Down
20 changes: 16 additions & 4 deletions src/components/ModuleEditCard/ModuleEditCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

.story-module{
background: #fff;
box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.38);
padding: 10px;
box-shadow: 0px 3px 7px rgba(0,0,0,0.38);
border-radius: 10px;
}
.story-module h1{
Expand All @@ -14,7 +13,20 @@
}
.story-module p{
padding: 15px;
font-size: 0.9rem;
}
.module-button-container{
float: right;
.module-button-container .row{
margin-bottom: 0.3rem;
padding-top: 0;
}

.module-delete{
color: $brand-red;
}
.module-edit{
color: $brand-orange
}
.module-up-down-container{
flex-direction: column;

}
36 changes: 0 additions & 36 deletions src/components/button-small/Button.js

This file was deleted.

76 changes: 0 additions & 76 deletions src/components/button-small/Button.scss

This file was deleted.

16 changes: 8 additions & 8 deletions src/components/button/Button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
padding: 1.2em 2.4em;
background-color: $primary-color;
border-radius: 4em;
border: 2px solid #fff;
color: #fff;
transition: all $transition-timing;
vertical-align: center;

&:hover,
&:focus {
color: #fff;
box-shadow: $box-shadow;
transform: translateY(-.1rem);
border: 2px solid $brand-blue;
color: $brand-blue;
background: #fff;
}

&--inverted {
Expand All @@ -26,16 +27,15 @@
background-color: #fff;
&:hover,
&:focus {
color: $primary-color;
color: #fff;
background: $brand-blue;
}
}

&:disabled {
background-color: #aaa;
cursor: not-allowed;
border: none;
box-shadow: 0 0 10px 2px rgba(#888, .8);
cursor: not-allowed;
&:hover {

}
}
&--small {
Expand Down
10 changes: 0 additions & 10 deletions src/components/nav/Navlink.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,3 @@
.navbar-toggler {
background-color: white;
}

.nav-item {
.button:hover,
.button:focus {
color: #fff;
}
&:hover {
border: none;
}
}
Binary file added src/containers/.DS_Store
Binary file not shown.
Binary file added src/containers/views/.DS_Store
Binary file not shown.
13 changes: 6 additions & 7 deletions src/containers/views/AddStories/AddStories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import Button from '../../../components/button/Button';
import SmallButton from '../../../components/button-small/Button';
import Navbar from '../../../components/nav/Navbar';
import Footer from '../../../components/footer/Footer';

Expand Down Expand Up @@ -289,27 +288,27 @@ class AddStories extends React.Component {
<div className="row">Belangrijke locaties</div>
<div className="row">
<div className="col-md-4">
<SmallButton type="button" className={this.state.tags.brugge ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="brugge">Brugge</SmallButton>
<Button size="small" className={this.state.tags.brugge ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="brugge">Brugge</Button>
</div>
<div className="col-md-4">
<SmallButton type="button" className={this.state.tags.ieper ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="ieper">Ieper</SmallButton>
<Button size="small" className={this.state.tags.ieper ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="ieper">Ieper</Button>
</div>
<div className="col-md-4">
<SmallButton type="button" className={this.state.tags.poperinge ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="poperinge">Poperinge</SmallButton>
<Button size="small" className={this.state.tags.poperinge ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="poperinge">Poperinge</Button>
</div>
</div>
</div>
<div>
<div className="row">Categorie</div>
<div className="row">
<div className="col-md-4">
<SmallButton type="button" className={this.state.tags.food ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="food">Voedsel</SmallButton>
<Button size="small" className={this.state.tags.food ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="food">Voedsel</Button>
</div>
<div className="col-md-4">
<SmallButton type="button" className={this.state.tags.sport ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="sport">Sport</SmallButton>
<Button size="small" className={this.state.tags.sport ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="sport">Sport</Button>
</div>
<div className="col-md-4">
<SmallButton type="button" className={this.state.tags.transportation ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="transportation">Transport</SmallButton>
<Button size="small" className={this.state.tags.transportation ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="transportation">Transport</Button>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/containers/views/Admin/CreateUser/CreateUser.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { connect } from 'react-redux';
import Button from '../../../../components/button/Button';
import ButtonSmall from '../../../../components/button-small/Button';
import { Link } from 'react-router-dom';
import { Field, reduxForm, SubmissionError, formValueSelector } from 'redux-form';
import {
Expand Down
9 changes: 6 additions & 3 deletions src/containers/views/DashboardStoryList/DashboardStoryList.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Button from '../../../components/button-small/Button';
import Button from '../../../components/button/Button';
import Navbar from '../../../components/nav/Navbar';
import Footer from '../../../components/footer/Footer';
import Spinner from '../../../components/spinner/Spinner';
Expand Down Expand Up @@ -80,19 +80,22 @@ class DashboardStoryList extends React.Component {

<div className="flex">
<Button
size="small"
onClick={(e) => {
this.props.fetchStory(story.id)
.then(() => history.push(`/dashboardstorylist/${story.id}/edit`));
}}
>Aanpassen</Button>
<Button onClick={(e) => {
<Button
size="small"
onClick={(e) => {
if (window.confirm('Are you sure you wish to delete this item?')) deleteSt(story) } }>
Verwijder
</Button>
</div>

<div className="flex">
<Button onClick={(e) => this.handleVisibility(e)}>Maak onzichtbaar</Button>
<Button size="small" onClick={(e) => this.handleVisibility(e)}>Maak onzichtbaar</Button>
</div>

</div>
Expand Down
13 changes: 6 additions & 7 deletions src/containers/views/EditStory/EditStory.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { connect } from 'react-redux';
import Button from '../../../components/button/Button';
import SmallButton from '../../../components/button-small/Button';
import Navbar from '../../../components/nav/Navbar';
import Footer from '../../../components/footer/Footer';
import Spinner from '../../../components/spinner/Spinner';
Expand Down Expand Up @@ -261,17 +260,17 @@ class EditStory extends React.Component {
<div>
<span>Belangrijke locaties</span>

<SmallButton type="button" className={this.state.tags.brugge ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="brugge">Brugge</SmallButton>
<SmallButton type="button" className={this.state.tags.ieper ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="ieper">Ieper</SmallButton>
<SmallButton type="button" className={this.state.tags.poperinge ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="poperinge">Poperinge</SmallButton>
<Button size="small" className={this.state.tags.brugge ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="brugge">Brugge</Button>
<Button size="small" className={this.state.tags.ieper ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="ieper">Ieper</Button>
<Button size="small" className={this.state.tags.poperinge ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="poperinge">Poperinge</Button>

</div>
<div>
<span>Categorie</span>

<SmallButton type="button" className={this.state.tags.food ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="food">Voedsel</SmallButton>
<SmallButton type="button" className={this.state.tags.sport ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="sport">Sport</SmallButton>
<SmallButton type="button" className={this.state.tags.transportation ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="transportation">Transport</SmallButton>
<Button size="small" className={this.state.tags.food ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="food">Voedsel</Button>
<Button size="small" className={this.state.tags.sport ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="sport">Sport</Button>
<Button size="small" className={this.state.tags.transportation ? 'activeButton': ''} onClick={(e) => this.handleTag(e)} value="transportation">Transport</Button>

</div>

Expand Down
2 changes: 1 addition & 1 deletion src/containers/views/Login/Login.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import Button from '../../../components/button/Button';
import SmallButton from '../../../components/button-small/Button';
import { firebaseAuth, googleAuthProvider } from '../../../helpers/firebase';
import { Field, reduxForm, SubmissionError } from 'redux-form';
import { Link } from 'react-router-dom';
Expand Down Expand Up @@ -56,6 +55,7 @@ const Login = ({ pristine, submitting, handleSubmit, error, showToast }) => {
className="submit_button"
type="submit"
disabled={pristine || submitting}
size="small"
>
Login
</Button>
Expand Down
2 changes: 0 additions & 2 deletions src/containers/views/Register/Register.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
@import '../../../variables.scss';
body{
background-image: url('../bg.svg');
background-repeat: no-repeat;
background-size: cover;
background-position: center;}
.register-title {
color: #3274ff;
Expand Down
Loading

0 comments on commit 11f1ba3

Please sign in to comment.