chore: home screen

This commit is contained in:
Kyle Gill
2019-04-08 09:08:00 -06:00
parent e8a8f41d81
commit 37b633ea82
11 changed files with 3676 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
asset-manifest.json,1553884046206,ab1a2f7317faa41861e422ef229575fe3ecbb17d1c2f975e88efb9d78e511376
manifest.json,1553879304430,52afe5ad7170b2b50e3ac04262420481b529c8c3009d93599bd41e3c44367f78
index.html,1553884046205,42891bf67643a2a8a638791bf6c4ee99e205be5c3b1c63c7ad1ba18706eb45c8
precache-manifest.d45de78050e7934587aed923200cf920.js,1553884046206,af20162c7c52cc330fba328fa78d181cd2e9295171b003d9360eb1c9970e9eb4
service-worker.js,1553884046205,fc351de1a559cf9b70e3022b895c738f94d83d8ccac4992c75e89ef7bb881248
static/css/main.1a707a0f.chunk.css,1553884046207,31f97c61456faf692f2920be106bc1ee08170c1e86a531eb225b32acfb8359ce
reactfavicon.ico,1553876850033,b72f7455f00e4e58792d2bca892abb068e2213838c0316d6b7a0d6d16acd1955
static/css/main.1a707a0f.chunk.css.map,1553884046251,28865d6e3616355a7fbb38dfc7ed97029ed4b5c5e5c61afbe5d433204e76f9ff
static/js/runtime~main.a8a9905a.js,1553884046254,e1af5f94fdd13901b2e433d0d7607e27c01458151c35b1fe4b7feda2a32b7aa9
favicon.ico,1553876855791,229055d54fe1f70f3d835e9d723ea2fef78f2af82ed7ce45efa2f4623c1c1131
static/js/runtime~main.a8a9905a.js.map,1553884046250,c337bf8b58896da637a6e50ab8cfc779eb1ec42c55f8ec429030a03454a549db
static/js/main.4752fead.chunk.js,1553884046253,31c047c091eb527f5bade96d426368d9e05689355d6d9ce29d5539621024cb58
static/js/main.4752fead.chunk.js.map,1553884046254,f9eb4c273c0fcfd32f6ff8113afb509584adaf92667564c6e4ecc30023740cb4
static/js/2.ad8c616b.chunk.js,1553884046253,e9ea391f6951d55e960b05d0353cf46c42a39af282058927141d20876cd5640e
static/js/2.ad8c616b.chunk.js.map,1553884046252,6896a6400a6836fc179167478961bf4c211614d2afcf220caf6c80afd11e8967

View File

@@ -16,5 +16,10 @@
"destination": "/index.html"
}
]
},
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint"
]
}
}

123
functions/.eslintrc.json Normal file
View File

@@ -0,0 +1,123 @@
{
"parserOptions": {
// Required for certain syntax usages
"ecmaVersion": 6
},
"plugins": [
"promise"
],
"extends": "eslint:recommended",
"rules": {
// Removed rule "disallow the use of console" from recommended eslint rules
"no-console": "off",
// Removed rule "disallow multiple spaces in regular expressions" from recommended eslint rules
"no-regex-spaces": "off",
// Removed rule "disallow the use of debugger" from recommended eslint rules
"no-debugger": "off",
// Removed rule "disallow unused variables" from recommended eslint rules
"no-unused-vars": "off",
// Removed rule "disallow mixed spaces and tabs for indentation" from recommended eslint rules
"no-mixed-spaces-and-tabs": "off",
// Removed rule "disallow the use of undeclared variables unless mentioned in /*global */ comments" from recommended eslint rules
"no-undef": "off",
// Warn against template literal placeholder syntax in regular strings
"no-template-curly-in-string": 1,
// Warn if return statements do not either always or never specify values
"consistent-return": 1,
// Warn if no return statements in callbacks of array methods
"array-callback-return": 1,
// Require the use of === and !==
"eqeqeq": 2,
// Disallow the use of alert, confirm, and prompt
"no-alert": 2,
// Disallow the use of arguments.caller or arguments.callee
"no-caller": 2,
// Disallow null comparisons without type-checking operators
"no-eq-null": 2,
// Disallow the use of eval()
"no-eval": 2,
// Warn against extending native types
"no-extend-native": 1,
// Warn against unnecessary calls to .bind()
"no-extra-bind": 1,
// Warn against unnecessary labels
"no-extra-label": 1,
// Disallow leading or trailing decimal points in numeric literals
"no-floating-decimal": 2,
// Warn against shorthand type conversions
"no-implicit-coercion": 1,
// Warn against function declarations and expressions inside loop statements
"no-loop-func": 1,
// Disallow new operators with the Function object
"no-new-func": 2,
// Warn against new operators with the String, Number, and Boolean objects
"no-new-wrappers": 1,
// Disallow throwing literals as exceptions
"no-throw-literal": 2,
// Require using Error objects as Promise rejection reasons
"prefer-promise-reject-errors": 2,
// Enforce “for” loop update clause moving the counter in the right direction
"for-direction": 2,
// Enforce return statements in getters
"getter-return": 2,
// Disallow await inside of loops
"no-await-in-loop": 2,
// Disallow comparing against -0
"no-compare-neg-zero": 2,
// Warn against catch clause parameters from shadowing variables in the outer scope
"no-catch-shadow": 1,
// Disallow identifiers from shadowing restricted names
"no-shadow-restricted-names": 2,
// Enforce return statements in callbacks of array methods
"callback-return": 2,
// Require error handling in callbacks
"handle-callback-err": 2,
// Warn against string concatenation with __dirname and __filename
"no-path-concat": 1,
// Prefer using arrow functions for callbacks
"prefer-arrow-callback": 1,
// Return inside each then() to create readable and reusable Promise chains.
// Forces developers to return console logs and http calls in promises.
"promise/always-return": 2,
//Enforces the use of catch() on un-returned promises
"promise/catch-or-return": 2,
// Warn against nested then() or catch() statements
"promise/no-nesting": 1
}
}

1
functions/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
node_modules/

8
functions/index.js Normal file
View File

@@ -0,0 +1,8 @@
const functions = require('firebase-functions');
// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
// response.send("Hello from Firebase!");
// });

3460
functions/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

21
functions/package.json Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"dependencies": {
"firebase-admin": "~7.0.0",
"firebase-functions": "^2.2.0"
},
"devDependencies": {
"eslint": "^5.12.0",
"eslint-plugin-promise": "^4.0.1"
},
"private": true
}

View File

@@ -14,6 +14,7 @@ import Year from "./components/screens/Year"
import User from "./components/screens/User"
import Login from "./components/screens/Login"
import Register from "./components/screens/Register"
import Start from "./components/screens/Start"
import PrivateRoute from "./components/PrivateRoute"
import { withAuthentication } from "./components/session"
@@ -95,6 +96,7 @@ class App extends Component {
<Route path="/user" component={User} exact />
<Route path="/login" component={Login} exact />
<Route path="/register" component={Register} exact />
<Route path="/" component={Start} exact />
</RouteLayout>
</Router>
</ThemeProvider>

View File

@@ -1,11 +1,11 @@
import React from "react"
import styled from "@emotion/styled"
import { withTheme } from "emotion-theming"
import { Link } from "react-router-dom"
import { SIZES } from "../../styles/constants"
import Icon from "../Icon"
import { H1 } from "../elements"
import { StyledLink as Link } from "../elements"
const SeekHeader = styled.header`
display: flex;

View File

@@ -0,0 +1,38 @@
import React, { Component } from "react"
import { Link } from "react-router-dom"
import styled from "@emotion/styled"
import { withTheme } from "emotion-theming"
import { Button } from "../../elements"
import { todayUrl } from "../../../utils/date"
const StartGrid = styled.div`
margin: 0 auto;
text-align: center;
margin-top: 30px;
max-width: 350px;
line-height: 1.5;
color: ${props => props.theme.colors.secondary};
height: 100%;
`
class Start extends Component {
render() {
const { theme } = this.props
return (
<StartGrid>
<div style={{ margin: 10 }}>
Use your journal as a place to record thoughts and events from the
day. Your journal works offline and from any device. You can add it to
your homescreen for faster access and write from a mobile device or
type up your entries from your computer.
</div>
<Link to={todayUrl()} style={{ textDecoration: "none" }}>
<Button colors={theme.colors}>Begin Writing</Button>
</Link>
</StartGrid>
)
}
}
export default withTheme(Start)

View File

@@ -0,0 +1,2 @@
import Start from "./Start"
export default Start