diff --git a/README.md b/README.md index 58beeac..530420a 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,15 @@ -# Getting Started with Create React App +# Speed Reader by a110 -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). +This app is intended to help the user improve their reading speed by displaying the words +of a text passage one by one at a given speed. That prevents the reader from effectively +subvocalization or regression. For more background on the contextual meaning of these terms, +visit the [Wikipedia page on Speed Reading](https://en.wikipedia.org/wiki/Speed_reading) - +the content of which is used as the default text passage within the app. -## Available Scripts +The text used in the app can be easily replaced by any other text that might be more +applicable to the specific use case. -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. - -The page will reload when you make changes.\ -You may also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can't go back!** - -If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. - -You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) - -### Analyzing the Bundle Size - -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) - -### Making a Progressive Web App - -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) - -### Advanced Configuration - -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `npm run build` fails to minify - -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) +The styling could use refinement and in particular there is no support as yet for a dark +mode view. Also the deployment originally intended with GitHub Pages was not possible due +to the behavior of the main app at [a110.dev](https://a110.dev). Thus for the time being +this app can be viewed via Netlify at [https://main--velvety-gumdrop-c43a77.netlify.app/](https://main--velvety-gumdrop-c43a77.netlify.app/) diff --git a/jsconfig.json b/jsconfig.json index ffcd441..0967ef4 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -1 +1 @@ -{ } +{} diff --git a/src/App.js b/src/App.js index 8949300..4c2da8f 100644 --- a/src/App.js +++ b/src/App.js @@ -2,7 +2,7 @@ import React from "react"; import { useRecoilValue } from "recoil"; import Frame from "./components/Frame"; import Header from "./components/Header"; -import { VIEW_NAME_PASSAGE } from './constants' +import { VIEW_NAME_PASSAGE } from "./constants"; import state from "./state"; import Passage from "./views/Passage"; import WordsRunner from "./views/WordsRunner"; diff --git a/src/GlobalStyles.js b/src/GlobalStyles.js index 9b1997d..6fcef8b 100644 --- a/src/GlobalStyles.js +++ b/src/GlobalStyles.js @@ -1,37 +1,37 @@ -import React from 'react' -import { createGlobalStyle } from 'styled-components' -import tw, { GlobalStyles as BaseStyles } from 'twin.macro' - -const CustomStyles = createGlobalStyle` - body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", - "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; - ${tw`antialiased`} - margin: 0; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - } - - code { - font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", - monospace; - } - - #root { - background-color: cyan; - height: 100%; - } -` - -const GlobalStyles = () => ( - <> - - - -) - -export default GlobalStyles +import React from "react"; +import { createGlobalStyle } from "styled-components"; +import tw, { GlobalStyles as BaseStyles } from "twin.macro"; + +const CustomStyles = createGlobalStyle` + body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", + "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", + sans-serif; + ${tw`antialiased`} + margin: 0; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + } + + code { + font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", + monospace; + } + + #root { + background-color: cyan; + height: 100%; + } +`; + +const GlobalStyles = () => ( + <> + + + +); + +export default GlobalStyles; diff --git a/src/components/Button.js b/src/components/Button.js index cd67c6a..3aae44e 100644 --- a/src/components/Button.js +++ b/src/components/Button.js @@ -1,6 +1,6 @@ -import React from 'react' -import tw, { styled } from 'twin.macro'; -import 'styled-components/macro'; +import React from "react"; +import tw, { styled } from "twin.macro"; +import "styled-components/macro"; const StyledAnchor = styled.a(() => [ ` @@ -26,13 +26,11 @@ const StyledAnchor = styled.a(() => [ active:top-0.5 hover:from-sky-400 hover:to-sky-500 - ` -]) + `, +]); -const Button = ({value, onClick}) => { - return ( - {value} - ) -} +const Button = ({ value, onClick }) => { + return {value}; +}; -export default Button +export default Button; diff --git a/src/components/Controls/PlayPauseButton.js b/src/components/Controls/PlayPauseButton.js index 64a5944..3c913d7 100644 --- a/src/components/Controls/PlayPauseButton.js +++ b/src/components/Controls/PlayPauseButton.js @@ -1,7 +1,7 @@ import React, { useCallback } from "react"; import { useRecoilState } from "recoil"; import state from "../../state"; -import Button from '../Button' +import Button from "../Button"; const PlayPauseButton = () => { const [isPlaying, setIsPlaying] = useRecoilState(state.isPlaying); @@ -10,12 +10,7 @@ const PlayPauseButton = () => { setIsPlaying((isPlaying) => !isPlaying); }, [setIsPlaying]); - return ( -