diff --git a/src/js/Signup.jsx b/src/js/Signup.jsx
new file mode 100644
index 0000000..7ab68f4
--- /dev/null
+++ b/src/js/Signup.jsx
@@ -0,0 +1,276 @@
+import React from "react";
+import styled from "styled-components";
+import { Link } from "react-router-dom";
+
+
+const LandingNavbar = styled.div`
+ a {
+ float: right;
+ margin: 5px;
+ font-weight: bolder;
+ text-decoration: none;
+ color: #fff;
+ }
+ font-family: Roboto;
+`;
+
+const SignupDiv = styled.div`
+ /* Demo 3 */
+
+ .form-3 {
+ font-family: "Ubuntu", "Lato", sans-serif;
+ font-weight: 400;
+ /* Size and position */
+ width: 300px;
+ position: relative;
+ margin: 60px auto 30px;
+ padding: 10px;
+ overflow: hidden;
+
+ /* Styles */
+ background: #111;
+ border-radius: 0.4em;
+ border: 1px solid #191919;
+ box-shadow: inset 0 0 2px 1px rgba(255, 255, 255, 0.08),
+ 0 16px 10px -8px rgba(0, 0, 0, 0.6);
+ }
+
+ .form-3 label {
+ /* Size and position */
+ width: 50%;
+ float: left;
+ padding-top: 9px;
+
+ /* Styles */
+ color: #ddd;
+ font-size: 12px;
+ text-transform: uppercase;
+ letter-spacing: 1px;
+ text-shadow: 0 1px 0 #000;
+ text-indent: 10px;
+ font-weight: 700;
+ cursor: pointer;
+ }
+
+ .form-3 input[type="text"],
+ .form-3 input[type="password"],
+ .form-3 input[type="country"],
+ .form-3 input[type="city"],
+ .form-3 input[type="email"] {
+ /* Size and position */
+ width: 50%;
+ float: left;
+ padding: 8px 5px;
+ margin-bottom: 10px;
+ font-size: 12px;
+
+ /* Styles */
+ background: #1f2124; /* Fallback */
+ background: -moz-linear-gradient(#1f2124, #27292c);
+ background: -ms-linear-gradient(#1f2124, #27292c);
+ background: -o-linear-gradient(#1f2124, #27292c);
+ background: -webkit-gradient(
+ linear,
+ 0 0,
+ 0 100%,
+ from(#1f2124),
+ to(#27292c)
+ );
+ background: -webkit-linear-gradient(#1f2124, #27292c);
+ background: linear-gradient(#1f2124, #27292c);
+ border: 1px solid #000;
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
+ border-radius: 3px;
+
+ /* Font styles */
+ font-family: "Ubuntu", "Lato", sans-serif;
+ color: #fff;
+ }
+
+ .form-3 input[type="text"]:hover,
+ .form-3 input[type="password"]:hover,
+ .form-3 input[type="email"]:hover,
+ .form-3 input[type="country"]:hover,
+ .form-3 input[type="city"]:hover,
+ .form-3 label:hover ~ input[type="text"],
+ .form-3 label:hover ~ input[type="password"], .form-3 label:hover ~ input[type="email"] {
+ background: #27292c;
+ }
+
+ .form-3 input[type="text"]:focus,
+ .form-3 input[type="password"]:focus,
+ .form-3 input[type="country"]:focus,
+ .form-3 input[type="city"]:focus,
+ .form-3 input[type="email"]:focus {
+ box-shadow: inset 0 0 2px #000;
+ background: #494d54;
+ border-color: #51cbee;
+ outline: none; /* Remove Chrome outline */
+ }
+
+
+ .form-3 p:nth-child(3),
+ .form-3 p:nth-child(4) {
+ float: left;
+ width: 50%;
+ }
+
+ .form-3 input[type="checkbox"] {
+ margin-left: 10px;
+ vertical-align: middle;
+ }
+
+ .form-3 input[type="submit"] {
+ /* Width and position */
+ width: 100%;
+ padding: 8px 5px;
+
+ /* Styles */
+ border: 1px solid #0273dd; /* Fallback */
+ border: 1px solid rgba(0, 0, 0, 0.4);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3),
+ inset 0 10px 10px rgba(255, 255, 255, 0.1);
+ border-radius: 3px;
+ background: #38a6f0;
+ cursor: pointer;
+
+ /* Font styles */
+ font-family: "Ubuntu", "Lato", sans-serif;
+ color: white;
+ font-weight: 700;
+ font-size: 15px;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.8);
+ }
+
+ .form-3 input[type="submit"]:hover {
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
+ }
+
+ .form-3 input[type="submit"]:active {
+ background: #287db5;
+ box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.6);
+ border-color: #000; /* Fallback */
+ border-color: rgba(0, 0, 0, 0.9);
+ }
+
+ .no-boxshadow .form-3 input[type="submit"]:hover {
+ background: #2a92d8;
+ }
+
+ .form-3:after {
+ /* Size and position */
+ content: "";
+ height: 1px;
+ width: 33%;
+ position: absolute;
+ left: 20%;
+ top: 0;
+
+ background: -webkit-gradient(
+ linear,
+ 0 0,
+ 100% 0,
+ from(transparent),
+ color-stop(0.25, #444),
+ color-stop(0.5, #b6b6b8),
+ color-stop(0.75, #444),
+ to(transparent)
+ );
+ background: -webkit-linear-gradient(
+ left,
+ transparent,
+ #444,
+ #b6b6b8,
+ #444,
+ transparent
+ );
+ background: linear-gradient(
+ left,
+ transparent,
+ #444,
+ #b6b6b8,
+ #444,
+ transparent
+ );
+ }
+
+ .form-3:before {
+ /* Size and position */
+ content: "";
+ width: 8px;
+ height: 5px;
+ position: absolute;
+ left: 34%;
+ top: -7px;
+
+ /* Styles */
+ border-radius: 50%;
+ box-shadow: 0 0 6px 4px #fff;
+ }
+
+ .form-3 p:nth-child(1):before {
+ /* Size and position */
+ content: "";
+ width: 250px;
+ height: 100px;
+ position: absolute;
+ top: 0;
+ left: 45px;
+
+ /* Styles */
+ -webkit-transform: rotate(75deg);
+ transform: rotate(75deg);
+
+ background: -webkit-linear-gradient(
+ 50deg,
+ rgba(255, 255, 255, 0.15),
+ rgba(0, 0, 0, 0)
+ );
+ background: linear-gradient(
+ 50deg,
+ rgba(255, 255, 255, 0.15),
+ rgba(0, 0, 0, 0)
+ );
+ pointer-events: none;
+ }
+
+ .no-pointerevents .form-3 p:nth-child(1):before {
+ display: none;
+ }
+`;
+
+const SignupPage = () => (
+
+
+ Sign In
+ Sign Up
+
+
+
+
+
+
+);
+
+export default SignupPage;
diff --git a/src/js/UserPage.js b/src/js/UserPage.js
new file mode 100644
index 0000000..76982f6
--- /dev/null
+++ b/src/js/UserPage.js
@@ -0,0 +1,41 @@
+import React from 'react';
+import styled from "styled-components";
+import {Link, Redirect} from "react-router-dom";
+import Navbar from './Navbar';
+import axios from 'axios';
+import PostTemplate from './PostTemplate';
+
+class UserPage extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ username: null,
+ img: null,
+ posts: null
+ }
+ }
+ componentDidMount() {
+ axios.get('/api/userPosts').then(response => {
+ this.setState({posts: response})
+ })
+ }
+ render() {
+ return (
+
+
+
+

+
{this.state.username}
+
+
{
+ this.state.posts
+ ? (this.state.posts.map(post => {
+ return
;
+ })):""
+ }
+
+
)
+ }
+}
+
+export default UserPage;
diff --git a/src/js/actionCreators.js b/src/js/actionCreators.js
index b46703f..5d85f2a 100644
--- a/src/js/actionCreators.js
+++ b/src/js/actionCreators.js
@@ -13,3 +13,11 @@ export function setActivePoint(activePoint) {
export function setHoverLoc(hoverLoc) {
return { type: 'SET_HOVER_LOC', payload: hoverLoc };
}
+
+export function setAuthenticated(authenticated) {
+ return { type: 'SET_AUTHENTICATED', payload: authenticated };
+}
+
+export function setLandingRedirect(redirect) {
+ return { type: 'SET_LANDING_REDIRECT', payload: redirect };
+}
diff --git a/src/js/reducers/index.js b/src/js/reducers/index.js
index 3f75b85..a0a09a0 100644
--- a/src/js/reducers/index.js
+++ b/src/js/reducers/index.js
@@ -1,12 +1,22 @@
import { combineReducers } from 'redux';
-import { data, coin, duration, hoverLoc, activePoint } from './reducers';
+import {
+ data,
+ coin,
+ duration,
+ hoverLoc,
+ activePoint,
+ authenticated,
+ landingRedirect
+} from './reducers';
const rootReducer = combineReducers({
coin,
duration,
hoverLoc,
activePoint,
- data
+ data,
+ authenticated,
+ landingRedirect
});
export default rootReducer;
diff --git a/src/js/reducers/reducers.js b/src/js/reducers/reducers.js
index 2008dec..a64e242 100644
--- a/src/js/reducers/reducers.js
+++ b/src/js/reducers/reducers.js
@@ -54,7 +54,6 @@ const defaultState = {
};
export function data(state = defaultState, action) {
- let apiData;
let sortedData;
switch (action.type) {
case 'ADD_API_DATA_PENDING':
@@ -83,3 +82,17 @@ export function data(state = defaultState, action) {
return state;
}
}
+
+export function authenticated(state = false, action) {
+ if (action.type === 'SET_AUTHENTICATED') {
+ return action.payload;
+ }
+ return state;
+}
+
+// export function landingRedirect(state = '/login', action) {
+// if (action.type === 'SET_LANDING_REDIRECT') {
+// return action.payload;
+// }
+// return state;
+// }
diff --git a/webpack.config.js b/webpack.config.js
index 3e70c15..b439fb9 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -4,9 +4,9 @@ const webpack = require('webpack');
module.exports = {
context: __dirname,
entry: [
- 'react-hot-loader/patch',
- 'webpack-dev-server/client?http://localhost:8080',
- 'webpack/hot/only-dev-server',
+ // 'react-hot-loader/patch',
+ // 'webpack-dev-server/client?http://localhost:8080',
+ // 'webpack/hot/only-dev-server',
'./src/js/ClientApp.jsx'
],
devtool: 'inline-source-map',
@@ -16,7 +16,7 @@ module.exports = {
publicPath: '/public/'
},
devServer: {
- hot: true,
+ // hot: true,
publicPath: '/public/',
historyApiFallback: true
},
@@ -29,9 +29,9 @@ module.exports = {
chunks: false
},
plugins: [
- new webpack.optimize.UglifyJsPlugin(),
- new webpack.HotModuleReplacementPlugin(),
- new webpack.NamedModulesPlugin()
+ // new webpack.optimize.UglifyJsPlugin()
+ // new webpack.HotModuleReplacementPlugin(),
+ // new webpack.NamedModulesPlugin()
],
module: {
rules: [