wip migration

This commit is contained in:
Kyle Gill
2019-05-15 17:40:27 -06:00
parent 24a3eb96f2
commit 83b1e6c900
23 changed files with 333 additions and 270 deletions

View File

@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><script src="/socket.io/socket.io.js"></script></head><body><noscript id="gatsby-noscript">This app works best with JavaScript enabled.</noscript><div id="___gatsby"></div><script src="/commons.js"></script></body></html> <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><link rel="preload" as="font" type="font/woff2" crossorigin="anonymous" href="/google-fonts/s/montserrat/v13/JTURjIg1_i6t8kCHKm45_dJE3gnD_g.woff2"/><link rel="preload" as="font" type="font/woff2" crossorigin="anonymous" href="/google-fonts/s/montserrat/v13/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2"/><style type="text/css">@font-face{font-family:Montserrat;font-style:normal;font-weight:400;src:local('Montserrat Regular'),local('Montserrat-Regular'),url(/google-fonts/s/montserrat/v13/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2) format('woff2'),url(/google-fonts/s/montserrat/v13/JTUSjIg1_i6t8kCHKm459WlhzQ.woff) format('woff');font-display: swap;}@font-face{font-family:Montserrat;font-style:normal;font-weight:700;src:local('Montserrat Bold'),local('Montserrat-Bold'),url(/google-fonts/s/montserrat/v13/JTURjIg1_i6t8kCHKm45_dJE3gnD_g.woff2) format('woff2'),url(/google-fonts/s/montserrat/v13/JTURjIg1_i6t8kCHKm45_dJE3gnD-A.woff) format('woff');font-display: swap;}</style><script src="/socket.io/socket.io.js"></script></head><body><noscript id="gatsby-noscript">This app works best with JavaScript enabled.</noscript><div id="___gatsby"></div><script src="/commons.js"></script></body></html>

View File

@@ -1,5 +1,5 @@
import React, { Component } from "react" import React, { Component } from "react"
import { BrowserRouter as Router, Route } from "react-router-dom" import { Router } from "@reach/router"
import { compose } from "recompose" import { compose } from "recompose"
import styled from "@emotion/styled" import styled from "@emotion/styled"
import { ThemeProvider } from "emotion-theming" import { ThemeProvider } from "emotion-theming"
@@ -15,9 +15,7 @@ import User from "./components/screens/User"
import Login from "./components/screens/Login" import Login from "./components/screens/Login"
import Search from "./components/screens/Search" import Search from "./components/screens/Search"
import Register from "./components/screens/Register" import Register from "./components/screens/Register"
import Start from "./components/screens/Start" import Welcome from "./components/screens/Welcome"
import Terms from "./components/screens/Terms"
import Privacy from "./components/screens/Privacy"
import PrivateRoute from "./components/PrivateRoute" import PrivateRoute from "./components/PrivateRoute"
import { OnlineContext } from "./components/context/online" import { OnlineContext } from "./components/context/online"
@@ -94,25 +92,25 @@ class App extends Component {
return ( return (
<ThemeProvider theme={currentTheme}> <ThemeProvider theme={currentTheme}>
<OnlineContext.Provider value={online}> <OnlineContext.Provider value={online}>
<Router>
<FullscreenLayout> <FullscreenLayout>
<Navbar toggleTheme={this.onChangeTheme} /> <Navbar toggleTheme={this.onChangeTheme} />
<RouteLayout> <RouteLayout>
<Router>
<PrivateRoute <PrivateRoute
authed={authed} authed={authed}
path="/app/:year(\d+)" path="/app/:year"
component={Year} component={Year}
exact exact
/> />
<PrivateRoute <PrivateRoute
authed={authed} authed={authed}
path="/app/:year(\d+)/:month(0[1-9]|1[0-2]+)" path="/app/:year/:month"
component={Month} component={Month}
exact exact
/> />
<PrivateRoute <PrivateRoute
authed={authed} authed={authed}
path="/app/:year(\d+)/:month(0[1-9]|1[0-2]+)/:day(\d+)" path="/app/:year/:month/:day"
component={Day} component={Day}
exact exact
/> />
@@ -128,14 +126,18 @@ class App extends Component {
component={User} component={User}
exact exact
/> />
<Route path="/app/login" component={Login} exact /> <PrivateRoute
<Route path="/app/register" component={Register} exact /> authed={authed}
<Route path="/app/terms" component={Terms} exact /> path="/app"
<Route path="/app/privacy" component={Privacy} exact /> component={Welcome}
<Route path="/app" component={Start} exact /> exact
/>
<Login path="/app/login" />
<Register path="/app/register" />
{/* <Start path="/app" /> */}
</Router>
</RouteLayout> </RouteLayout>
</FullscreenLayout> </FullscreenLayout>
</Router>
</OnlineContext.Provider> </OnlineContext.Provider>
</ThemeProvider> </ThemeProvider>
) )

View File

@@ -9,6 +9,11 @@ export default ({ children }) => (
* { * {
transition: 0.2s all ease-in-out; transition: 0.2s all ease-in-out;
} }
h1 {
font-family: "Montserrat", -apple-system, BlinkMacSystemFont,
"Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
"Droid Sans", "Helvetica Neue", sans-serif;
}
body { body {
margin: 0; margin: 0;
padding: 0; padding: 0;

View File

@@ -1,5 +1,5 @@
import React from "react" import React from "react"
import { withRouter } from "react-router-dom" import { navigate } from "gatsby"
import { StyledLink as Link } from "../elements" import { StyledLink as Link } from "../elements"
import styled from "@emotion/styled" import styled from "@emotion/styled"
/** @jsx jsx */ /** @jsx jsx */
@@ -62,10 +62,10 @@ const NavIcons = styled.div`
} }
` `
const Navbar = ({ authUser, theme, toggleTheme, history }) => ( const Navbar = ({ authUser, theme, toggleTheme }) => (
<Header> <Header>
<Nav> <Nav>
<LogoSection onClick={() => history.push("/")}> <LogoSection onClick={() => navigate("/app")}>
<Logo color={theme.colors.logo} /> <Logo color={theme.colors.logo} />
<LogoText color={theme.colors.primary}>SOL</LogoText>{" "} <LogoText color={theme.colors.primary}>SOL</LogoText>{" "}
<LogoText color={theme.colors.secondary}>JOURNAL</LogoText> <LogoText color={theme.colors.secondary}>JOURNAL</LogoText>
@@ -96,7 +96,7 @@ const Navbar = ({ authUser, theme, toggleTheme, history }) => (
<React.Fragment> <React.Fragment>
{/* <Link to={"/"}>Landing</Link> */} {/* <Link to={"/"}>Landing</Link> */}
<Link to={"/login"}> <Link to={"/login"}>
<Icon name="LogIn" label="Get Started" /> <Icon name="LogIn" label="Login" />
</Link> </Link>
{/* <Link to={"/register"}>Register</Link> */} {/* <Link to={"/register"}>Register</Link> */}
</React.Fragment> </React.Fragment>
@@ -108,6 +108,5 @@ const Navbar = ({ authUser, theme, toggleTheme, history }) => (
export default compose( export default compose(
withAuthentication, withAuthentication,
withTheme, withTheme
withRouter
)(Navbar) )(Navbar)

View File

@@ -1,20 +1,17 @@
import React from "react" import React from "react"
import { Route, Redirect } from "react-router-dom" import { Redirect, Location } from "@reach/router"
const PrivateRoute = ({ component: Component, authed, ...rest }) => { const PrivateRoute = ({ component: Component, authed, ...rest }) => {
return ( return (
<Route <Location>
{...rest} {({ location }) =>
render={props =>
authed === true ? ( authed === true ? (
<Component {...props} /> <Component {...rest} />
) : ( ) : (
<Redirect <Redirect to="/app/login" from={location.pathname} />
to={{ pathname: "/login", state: { from: props.location } }}
/>
) )
} }
/> </Location>
) )
} }

View File

@@ -0,0 +1,17 @@
import React from "react"
import styled from "@emotion/styled"
import { SIZES } from "../styles/constants"
const Container = styled.div`
display: flex;
flex-direction: column;
height: 100%;
margin: 0 auto;
padding: 0 10px;
max-width: ${SIZES.maxWidth};
min-height: calc(100vh - 60px);
background-color: ${props => props.theme.colors.bodyBackground};
`
export default Container

View File

@@ -1,6 +1,6 @@
import React from "react" import React from "react"
import { withTheme } from "emotion-theming" import { withTheme } from "emotion-theming"
import { Link } from "react-router-dom" import { Link } from "gatsby"
import styled from "@emotion/styled" import styled from "@emotion/styled"
import { SIZES } from "../../styles/constants" import { SIZES } from "../../styles/constants"

View File

@@ -43,7 +43,7 @@ class Firebase {
doSignOut = () => { doSignOut = () => {
this.auth.signOut() this.auth.signOut()
window.location.replace("/login") window.location.replace("/app/login")
} }
doPasswordReset = email => this.auth.sendPasswordResetEmail(email) doPasswordReset = email => this.auth.sendPasswordResetEmail(email)

View File

@@ -4,7 +4,7 @@ import styled from "@emotion/styled"
import { jsx, css, keyframes } from "@emotion/core" import { jsx, css, keyframes } from "@emotion/core"
import { compose } from "recompose" import { compose } from "recompose"
import { Prompt } from "react-router" import { Prompt } from "react-router"
import { withRouter } from "react-router-dom" import { createHistory } from "@reach/router"
import { withTheme } from "emotion-theming" import { withTheme } from "emotion-theming"
import { withFirebase } from "../../firebase" import { withFirebase } from "../../firebase"
import { withAuthentication } from "../../session" import { withAuthentication } from "../../session"
@@ -106,19 +106,15 @@ class Day extends React.Component {
lastEditedAt: new Date(), lastEditedAt: new Date(),
} }
timeout = 0 timeout = 0
retrievedFromServer = false
static contextType = OnlineContext static contextType = OnlineContext
componentDidMount() { componentDidMount() {
const { const { year, month, day } = this.props
history, const history = createHistory(window)
match: { history.listen(({ location }) => {
params: { year, month, day }, console.log(location)
}, const [, , year, month, day] = location.pathname.split("/")
} = this.props
history.listen((location, action) => {
const [, year, month, day] = location.pathname.split("/")
this.onRouteChanged(year, month, day) this.onRouteChanged(year, month, day)
}) })
this.getDocRef(year, month, day, false) this.getDocRef(year, month, day, false)
@@ -168,11 +164,7 @@ class Day extends React.Component {
onChangeText = e => { onChangeText = e => {
if (this.timeout) clearTimeout(this.timeout) if (this.timeout) clearTimeout(this.timeout)
const text = e.target.value const text = e.target.value
const { const { year, month, day } = this.props
match: {
params: { year, month, day },
},
} = this.props
this.setState({ text, lastEditedAt: new Date() }) this.setState({ text, lastEditedAt: new Date() })
this.timeout = setTimeout(() => { this.timeout = setTimeout(() => {
@@ -184,11 +176,7 @@ class Day extends React.Component {
const entryTextArea = document.getElementById("entry-text-area") const entryTextArea = document.getElementById("entry-text-area")
const cursorIndex = entryTextArea.selectionStart const cursorIndex = entryTextArea.selectionStart
const { text } = this.state const { text } = this.state
const { const { year, month, day } = this.props
match: {
params: { year, month, day },
},
} = this.props
const insertAt = (str, sub, pos) => const insertAt = (str, sub, pos) =>
`${str.slice(0, pos)}${sub}${str.slice(pos)}` `${str.slice(0, pos)}${sub}${str.slice(pos)}`
const newText = insertAt(text, format(new Date(), "h:mma "), cursorIndex) const newText = insertAt(text, format(new Date(), "h:mma "), cursorIndex)
@@ -227,12 +215,7 @@ class Day extends React.Component {
} }
render() { render() {
const { const { year, month, day, theme } = this.props
match: {
params: { year, month, day },
},
theme,
} = this.props
const online = this.context const online = this.context
const { text, loading, saving, lastSavedAt, lastEditedAt } = this.state const { text, loading, saving, lastSavedAt, lastEditedAt } = this.state
const currentDay = new Date(year, month - 1, day) const currentDay = new Date(year, month - 1, day)
@@ -241,10 +224,10 @@ class Day extends React.Component {
return ( return (
<> <>
<Prompt {/* <Prompt
when={!hasSavedChanges} when={!hasSavedChanges}
message="You have unsaved changes, are you sure you want to leave?" message="You have unsaved changes, are you sure you want to leave?"
/> /> */}
<Seek <Seek
title={format(currentDay, "YYYY MMM DD - dddd")} title={format(currentDay, "YYYY MMM DD - dddd")}
prev={format(subDays(currentDay, 1), "/YYYY/MM/DD")} prev={format(subDays(currentDay, 1), "/YYYY/MM/DD")}
@@ -318,6 +301,5 @@ class Day extends React.Component {
export default compose( export default compose(
withFirebase, withFirebase,
withTheme, withTheme,
withAuthentication, withAuthentication
withRouter
)(Day) )(Day)

View File

@@ -1,5 +1,5 @@
import React, { Component } from "react" import React, { Component } from "react"
import { withRouter } from "react-router-dom" import { navigate } from "gatsby"
import styled from "@emotion/styled" import styled from "@emotion/styled"
import { compose } from "recompose" import { compose } from "recompose"
import { format } from "date-fns" import { format } from "date-fns"
@@ -23,10 +23,10 @@ const LoginLayout = styled.div`
margin-top: 20px; margin-top: 20px;
` `
const LoginPage = ({ history, theme }) => ( const LoginPage = ({ theme }) => (
<LoginLayout> <LoginLayout>
<FirebaseContext.Consumer> <FirebaseContext.Consumer>
{firebase => <LoginForm history={history} firebase={firebase} />} {firebase => <LoginForm firebase={firebase} />}
</FirebaseContext.Consumer> </FirebaseContext.Consumer>
<P colors={theme.colors} style={{ fontStyle: "italic" }}> <P colors={theme.colors} style={{ fontStyle: "italic" }}>
Don't have an account? <Link to={"/register"}>Sign Up</Link> Don't have an account? <Link to={"/register"}>Sign Up</Link>
@@ -49,7 +49,7 @@ class LoginFormBase extends Component {
.doSignInWithEmailAndPassword(email, password) .doSignInWithEmailAndPassword(email, password)
.then(() => { .then(() => {
this.setState({ email: "", password: "", error: null }) this.setState({ email: "", password: "", error: null })
this.props.history.push(format(new Date(), "/")) navigate(`app/${format(new Date(), "/")}`)
}) })
.catch(error => { .catch(error => {
this.setState({ error }) this.setState({ error })
@@ -95,10 +95,7 @@ class LoginFormBase extends Component {
} }
} }
const LoginForm = compose( const LoginForm = compose(withTheme)(LoginFormBase)
withTheme,
withRouter
)(LoginFormBase)
export default withTheme(LoginPage) export default withTheme(LoginPage)

View File

@@ -38,11 +38,7 @@ const YearCard = styled.div`
class Month extends Component { class Month extends Component {
render() { render() {
const { const { year, month } = this.props
match: {
params: { year, month },
},
} = this.props
const currentDay = new Date(year, month - 1) const currentDay = new Date(year, month - 1)
// include all months unless it's this year // include all months unless it's this year

View File

@@ -1,93 +0,0 @@
import React, { Component } from "react"
import { withRouter } from "react-router-dom"
import styled from "@emotion/styled"
import { compose } from "recompose"
import { format } from "date-fns"
import { withTheme } from "emotion-theming"
import { Input, Button, P } from "../../elements"
import { SIZES } from "../../../styles/constants"
import { StyledLink as Link } from "../../elements"
const Terms = ({}) => (
<>
<h1>Privacy Policy</h1>
<em>Last update: April 30, 2019</em>
<P>
Sol Journal supports the following browsers: Chrome (latest), Safari
(latest), Firefox (50+)
</P>
<h2>Rights</h2>
<P>
You don't have to provide your real name when you register to an account,
but you need to use a valid/verifiable email address.
<br />
<br />
You have the right to export your data at any time, in JSON format.
<br />
<br />
Your data will not be intentionally shown to other users or shared with
third parties.
<br />
<br />
Your personal data will not be shared with anyone without your consent.
<br />
<br />
Data saved on the hosted version of Sol Journal is encrypted as it is
transmitted and stored. However, data is not salted or hashed when it is
stored on Google servers so database administrators (me) can view the data
as plaintext. I won't view or use the data of other users for any reason
but if you would like to have more ownership of your data you can setup
the code on your own.
<br />
<br />
If the site ceases operation, you will receive an opportunity to export
all your data before the site dies.
<br />
<br />
Any new features that affect privacy will be strictly opt-in.
</P>
<h2>Responsibilites</h2>
<P>
You will not use the site to store illegal information or data under
United States law (or any law).
<br />
<br />
You have to be at least 18+ to create an account and use the site.
<br />
<br />
You must not abuse the site by knowingly posting malicious code that could
harm you or the other users.
<br />
<br />
You may not make automated requests to the site.
<br />
<br />
You may not abuse the registration system.
<br />
<br />
You are responsible for keeping your account secure.
<br />
<br />I reserve the right to close accounts that abuse the system
(millions of entries or overloading services with requests) or use it in
an unreasonable manner.
</P>
<h2>Other</h2>
<P>
Other important legal stuff Though I want to provide a great service,
there are certain things about the service I cannot promise. For example,
the services and software are provided as-is, at your own risk, without
express or implied warranty or condition of any kind. I also disclaim any
warranties of merchantability, fitness for a particular purpose or
non-infringement. Sol Journal will have no responsibility for any harm to
your computer system, loss or corruption of data, or other harm that
results from your access to or use of the Services or Software.
<br />
<br />
These Terms can change at any time, but I'll try to be reasonable. This is
a service I've always and hope to be able to run it for a long time.
</P>
</>
)
export default withTheme(Terms)

View File

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

View File

@@ -1,5 +1,4 @@
import React, { Component } from "react" import React, { Component } from "react"
import { withRouter } from "react-router-dom"
import styled from "@emotion/styled" import styled from "@emotion/styled"
import { compose } from "recompose" import { compose } from "recompose"
import { withTheme } from "emotion-theming" import { withTheme } from "emotion-theming"
@@ -137,10 +136,7 @@ class RegisterFormBase extends Component {
} }
} }
const RegisterForm = compose( const RegisterForm = compose(withTheme)(RegisterFormBase)
withTheme,
withRouter
)(RegisterFormBase)
export default withTheme(RegisterPage) export default withTheme(RegisterPage)

View File

@@ -1,5 +1,5 @@
import React, { Component } from "react" import React, { Component } from "react"
import { AppLink as Link } from "../../elements" import { Link } from "gatsby"
import styled from "@emotion/styled" import styled from "@emotion/styled"
import { withTheme } from "emotion-theming" import { withTheme } from "emotion-theming"
@@ -11,12 +11,14 @@ import Logo from "../../Logo"
const StartGrid = styled.div` const StartGrid = styled.div`
margin-top: 30px; margin-top: 30px;
text-align: center;
line-height: 1.5; line-height: 1.5;
color: ${props => props.theme.colors.primary}; color: ${props => props.theme.colors.primary};
height: 100%; height: 100%;
` `
const FeatureGrid = styled.div` const FeatureGrid = styled.div`
display: grid; display: grid;
text-align: left;
grid-template-rows: 1fr; grid-template-rows: 1fr;
grid-gap: 30px; grid-gap: 30px;
` `
@@ -97,7 +99,7 @@ class Start extends Component {
to record thoughts and events from the day. to record thoughts and events from the day.
</P> </P>
<Link to={`/app${todayUrl()}`} style={{ textDecoration: "none" }}> <Link to={`/app${todayUrl()}`} style={{ textDecoration: "none" }}>
<Button colors={theme.colors}>Write about today</Button> <Button colors={theme.colors}>Start Writing</Button>
</Link> </Link>
<div <div
style={{ style={{

View File

@@ -1,80 +0,0 @@
import React from "react"
import { P } from "../../elements"
const Terms = () => (
<>
<h1>Terms of Service</h1>
<em>Last update: April 30, 2019</em>
<h2>Scope of Service</h2>
<P>
Sol Journal supports the following browsers: Chrome (latest), Safari
(latest), Firefox (50+)
</P>
<h2>Rights</h2>
<P>
You don't have to provide your real name when you register to an account,
but you need to use a valid/verifiable email address.
<br />
<br />
You have the right to export your data at any time, in JSON format.
<br />
<br />
Your data will not be intentionally shown to other users or shared with
third parties.
<br />
<br />
Your personal data will not be shared with anyone without your consent.
<br />
<br />
We reserve the right to discontinue any feature of the service at any
time. If the site ceases operation, you will receive an opportunity to
export all your data before the site dies.
<br />
<br />
Any new features that affect privacy will be strictly opt-in.
</P>
<h2>Responsibilites</h2>
<P>
You will not use the site to store illegal information or data under
United States law (or any law).
<br />
<br />
You have to be at least 18+ to create an account and use the site.
<br />
<br />
You must not abuse the site by knowingly posting malicious code that could
harm you or the other users.
<br />
<br />
You may not make automated requests to the site.
<br />
<br />
You may not abuse the registration system.
<br />
<br />
You are responsible for keeping your account secure.
<br />
<br />I reserve the right to close accounts that abuse the system
(millions of entries or overloading services with requests) or use it in
an unreasonable manner.
</P>
<h2>Other</h2>
<P>
Other important legal stuff Though I want to provide a great service,
there are certain things about the service I cannot promise. For example,
the services and software are provided “as-is”, at your own risk, without
express or implied warranty or condition of any kind. I also disclaim any
warranties of merchantability, fitness for a particular purpose or
non-infringement. Sol Journal will have no responsibility for any harm to
your computer system, loss or corruption of data, or other harm that
results from your access to or use of the Services or Software.
<br />
<br />
These Terms can change at any time, but I'll try to be reasonable. This is
a service I've always and hope to be able to run it for a long time.
</P>
</>
)
export default Terms

View File

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

View File

@@ -0,0 +1,63 @@
import React, { Component } from "react"
import { Link } from "gatsby"
import styled from "@emotion/styled"
import { withTheme } from "emotion-theming"
import { SIZES } from "../../../styles/constants"
import { Button, P } from "../../elements"
import { todayUrl } from "../../../utils/date"
import Logo from "../../Logo"
const WelcomeGrid = styled.div`
margin-top: 30px;
line-height: 1.5;
color: ${props => props.theme.colors.primary};
height: 100%;
`
const Footer = styled.footer`
margin-top: 120px;
padding: 30px 0px;
text-align: center;
color: ${props => props.theme.colors.secondary};
`
const FooterLink = styled(Link)`
cursor: pointer;
color: ${props => props.theme.colors.secondary};
text-decoration: none;
margin: 10px;
&:hover {
color: ${props => props.theme.colors.tertiary};
}
`
class Welcome extends Component {
render() {
const { theme } = this.props
return (
<WelcomeGrid>
<h1>Your Space for Wandering Thoughts and Ideas</h1>
<P style={{ letterSpacing: 1.1, marginBottom: 30 }}>
Journaling can improve your health and help you take inventory of your
day. Sol Journal works offline and from any device. Use it as a place
to record thoughts and events from the day.
</P>
<Link to={`/app${todayUrl()}`} style={{ textDecoration: "none" }}>
<Button colors={theme.colors}>Write about today</Button>
</Link>
<Footer>
<div>
<Logo color={theme.colors.logo} />
</div>
<div>
<FooterLink>View on GitHub</FooterLink>
<FooterLink to="terms">Terms of Service</FooterLink>
<FooterLink to="privacy">Privacy Policy</FooterLink>
</div>
<div>&copy; 2019</div>
</Footer>
</WelcomeGrid>
)
}
}
export default withTheme(Welcome)

View File

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

View File

@@ -31,11 +31,7 @@ const MonthCard = styled.div`
class Year extends Component { class Year extends Component {
render() { render() {
const { const { year } = this.props
match: {
params: { year },
},
} = this.props
const currentDate = new Date(year, 0, 1) const currentDate = new Date(year, 0, 1)
// include all months unless it's this year // include all months unless it's this year

View File

@@ -1,2 +1,12 @@
import React from "react"
import Index from "../components/screens/Start/index" import Index from "../components/screens/Start/index"
export default Index import Layout from "../components/Layout"
import Container from "../components/container"
export default () => (
<Layout>
<Container>
<Index />
</Container>
</Layout>
)

91
src/pages/privacy.js Normal file
View File

@@ -0,0 +1,91 @@
import React from "react"
import { P } from "../components/elements"
import Layout from "../components/Layout"
import Container from "../components/container"
const Terms = () => (
<Layout>
<Container>
<h1>Privacy Policy</h1>
<em>Last update: April 30, 2019</em>
<P>
Sol Journal supports the following browsers: Chrome (latest), Safari
(latest), Firefox (50+)
</P>
<h2>Rights</h2>
<P>
You don't have to provide your real name when you register to an
account, but you need to use a valid/verifiable email address.
<br />
<br />
You have the right to export your data at any time, in JSON format.
<br />
<br />
Your data will not be intentionally shown to other users or shared with
third parties.
<br />
<br />
Your personal data will not be shared with anyone without your consent.
<br />
<br />
Data saved on the hosted version of Sol Journal is encrypted as it is
transmitted and stored. However, data is not salted or hashed when it is
stored on Google servers so database administrators (me) can view the
data as plaintext. I won't view or use the data of other users for any
reason but if you would like to have more ownership of your data you can
setup the code on your own.
<br />
<br />
If the site ceases operation, you will receive an opportunity to export
all your data before the site dies.
<br />
<br />
Any new features that affect privacy will be strictly opt-in.
</P>
<h2>Responsibilites</h2>
<P>
You will not use the site to store illegal information or data under
United States law (or any law).
<br />
<br />
You have to be at least 18+ to create an account and use the site.
<br />
<br />
You must not abuse the site by knowingly posting malicious code that
could harm you or the other users.
<br />
<br />
You may not make automated requests to the site.
<br />
<br />
You may not abuse the registration system.
<br />
<br />
You are responsible for keeping your account secure.
<br />
<br />I reserve the right to close accounts that abuse the system
(millions of entries or overloading services with requests) or use it in
an unreasonable manner.
</P>
<h2>Other</h2>
<P>
Other important legal stuff Though I want to provide a great service,
there are certain things about the service I cannot promise. For
example, the services and software are provided as-is, at your own
risk, without express or implied warranty or condition of any kind. I
also disclaim any warranties of merchantability, fitness for a
particular purpose or non-infringement. Sol Journal will have no
responsibility for any harm to your computer system, loss or corruption
of data, or other harm that results from your access to or use of the
Services or Software.
<br />
<br />
These Terms can change at any time, but I'll try to be reasonable. This
is a service I've always and hope to be able to run it for a long time.
</P>
</Container>
</Layout>
)
export default Terms

85
src/pages/terms.js Normal file
View File

@@ -0,0 +1,85 @@
import React from "react"
import { P } from "../components/elements"
import Layout from "../components/Layout"
import Container from "../components/container"
const Terms = () => (
<Layout>
<Container>
<h1>Terms of Service</h1>
<em>Last update: April 30, 2019</em>
<h2>Scope of Service</h2>
<P>
Sol Journal supports the following browsers: Chrome (latest), Safari
(latest), Firefox (50+)
</P>
<h2>Rights</h2>
<P>
You don't have to provide your real name when you register to an
account, but you need to use a valid/verifiable email address.
<br />
<br />
You have the right to export your data at any time, in JSON format.
<br />
<br />
Your data will not be intentionally shown to other users or shared with
third parties.
<br />
<br />
Your personal data will not be shared with anyone without your consent.
<br />
<br />
We reserve the right to discontinue any feature of the service at any
time. If the site ceases operation, you will receive an opportunity to
export all your data before the site dies.
<br />
<br />
Any new features that affect privacy will be strictly opt-in.
</P>
<h2>Responsibilites</h2>
<P>
You will not use the site to store illegal information or data under
United States law (or any law).
<br />
<br />
You have to be at least 18+ to create an account and use the site.
<br />
<br />
You must not abuse the site by knowingly posting malicious code that
could harm you or the other users.
<br />
<br />
You may not make automated requests to the site.
<br />
<br />
You may not abuse the registration system.
<br />
<br />
You are responsible for keeping your account secure.
<br />
<br />I reserve the right to close accounts that abuse the system
(millions of entries or overloading services with requests) or use it in
an unreasonable manner.
</P>
<h2>Other</h2>
<P>
Other important legal stuff Though I want to provide a great service,
there are certain things about the service I cannot promise. For
example, the services and software are provided “as-is”, at your own
risk, without express or implied warranty or condition of any kind. I
also disclaim any warranties of merchantability, fitness for a
particular purpose or non-infringement. Sol Journal will have no
responsibility for any harm to your computer system, loss or corruption
of data, or other harm that results from your access to or use of the
Services or Software.
<br />
<br />
These Terms can change at any time, but I'll try to be reasonable. This
is a service I've always and hope to be able to run it for a long time.
</P>
</Container>
</Layout>
)
export default Terms