From 0f726e0a54c456b6596d54e44418f0df32905ac3 Mon Sep 17 00:00:00 2001 From: Jaspreet Singh Date: Thu, 23 Feb 2017 20:56:21 -0800 Subject: [PATCH] Add nav, links not working yet --- src/client/views/Fitness/index.js | 30 +----------------------- src/client/views/Navigation/index.js | 21 +++++++++++++++++ src/client/views/Navigation/styles.css | 29 +++++++++++++++++++++++ src/client/views/WorkoutForm/index.js | 32 ++++++++++++++++++++++++++ src/client/views/index.js | 2 ++ src/server/index.html | 1 + 6 files changed, 86 insertions(+), 29 deletions(-) create mode 100644 src/client/views/Navigation/index.js create mode 100644 src/client/views/Navigation/styles.css diff --git a/src/client/views/Fitness/index.js b/src/client/views/Fitness/index.js index 5a5f284..e0d3c3f 100644 --- a/src/client/views/Fitness/index.js +++ b/src/client/views/Fitness/index.js @@ -18,40 +18,12 @@ class FitnessRoute extends Relay.Route { class Fitness extends Component { - handleSubmit = (e) => { - e.preventDefault() - Relay.Store.update( - new CreateWorkoutMutation({ - workout: this.refs.Workout.value, - workoutDate: this.refs.WorkoutDate.value, - duration: this.refs.Duration.value, - calories: this.refs.Calories.value, - fatBurnTime: this.refs.FatBurnTime.value, - fitnessTime: this.refs.FitnessTime.value, - avgHeartRate: this.refs.AvgHeartRate.value, - maxHeartRate: this.refs.MaxHeartRate.value, - workoutType: this.refs.WorkoutType.value, - store: this.props.store - }) - ) - } render() { return (
-
- - - - - - - - - - -
+
{ diff --git a/src/client/views/Navigation/index.js b/src/client/views/Navigation/index.js new file mode 100644 index 0000000..1082fd9 --- /dev/null +++ b/src/client/views/Navigation/index.js @@ -0,0 +1,21 @@ +import React, { Component } from 'react' +import styles from './styles.css' + +class Nav extends Component { + + render() { + return ( +
+ + Workout Buddy + + + Input + Workouts + Trends +
+ ) + } +} + +export default Nav diff --git a/src/client/views/Navigation/styles.css b/src/client/views/Navigation/styles.css new file mode 100644 index 0000000..d3762a9 --- /dev/null +++ b/src/client/views/Navigation/styles.css @@ -0,0 +1,29 @@ +.nav { + display: flex; + background-color: #E8DDB5; + padding: 20px 10px 20px 10px; +} + +.verticalRuleNav { + margin-left: 30px; + margin-right: 30px; + height: 3em; + border: 1px solid; + color: grey; + opacity: 0.6; +} + +.navLink { + margin-top: auto; + margin-bottom: auto; + margin-right: 30px; + font-family: 'Open Sans', sans-serif; +} + +.workoutBuddy { + font-family: 'Quicksand', sans-serif; + font-size: 2.5em; + margin-top:auto; + margin-bottom:auto; + margin-left:22px; +} \ No newline at end of file diff --git a/src/client/views/WorkoutForm/index.js b/src/client/views/WorkoutForm/index.js index 777d0db..53c5fcb 100644 --- a/src/client/views/WorkoutForm/index.js +++ b/src/client/views/WorkoutForm/index.js @@ -43,10 +43,42 @@ class WorkoutInput extends React.Component { } } + //handleSubmit = (e) => { + // e.preventDefault() + // Relay.Store.update( + // new CreateWorkoutMutation({ + // workout: this.refs.Workout.value, + // workoutDate: this.refs.WorkoutDate.value, + // duration: this.refs.Duration.value, + // calories: this.refs.Calories.value, + // fatBurnTime: this.refs.FatBurnTime.value, + // fitnessTime: this.refs.FitnessTime.value, + // avgHeartRate: this.refs.AvgHeartRate.value, + // maxHeartRate: this.refs.MaxHeartRate.value, + // workoutType: this.refs.WorkoutType.value, + // store: this.props.store + // }) + // ) + //} + + render() { const { finished, stepIndex } = this.state; const contentStyle = { margin: '0 16px' }; + //
+ // + // + // + // + // + // + // + // + // + // + //
+ return (
diff --git a/src/client/views/index.js b/src/client/views/index.js index 285c85b..1362635 100644 --- a/src/client/views/index.js +++ b/src/client/views/index.js @@ -7,6 +7,7 @@ import { } from 'react-router-dom' import { FitnessContainer, FitnessRoute } from './Fitness' import WorkoutForm from './WorkoutForm' +import Nav from './Navigation' class App extends Component { render() { @@ -14,6 +15,7 @@ class App extends Component {
+