-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c315a0f
commit 3125435
Showing
25 changed files
with
1,582 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,17 @@ | ||
This project was bootstrapped with [Create React App](/~https://github.com/facebook/create-react-app). | ||
# Linguist Aid | ||
|
||
## Available Scripts | ||
We're helping to connect multi-lingual volunteers to mutual aid groups around the UK to provide free help with: | ||
|
||
In the project directory, you can run: | ||
- translating leaflets, flyers and posters, | ||
- interpreting for vulnerable people, | ||
- chatting to people on the phone who feel alone and speak little or no English. | ||
|
||
### `yarn start` | ||
## Developing | ||
|
||
Runs the app in the development mode.<br /> | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
This site is build using create-react-app and [Ant Design](https://ant.design/docs/react/introduce). To run the development server, run: | ||
|
||
The page will reload if you make edits.<br /> | ||
You will also see any lint errors in the console. | ||
``` | ||
$ yarn start | ||
``` | ||
|
||
### `yarn test` | ||
|
||
Launches the test runner in the interactive watch mode.<br /> | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
|
||
### `yarn build` | ||
|
||
Builds the app for production to the `build` folder.<br /> | ||
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.<br /> | ||
Your app is ready to be deployed! | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
|
||
### `yarn 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/). | ||
Linting is done using Prettier. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
@import "~antd/dist/antd.css"; | ||
|
||
#header { | ||
position: fixed; | ||
z-index: 1; | ||
width: 100%; | ||
} | ||
|
||
#content-container { | ||
margin: 96px auto 32px; | ||
min-height: calc(100vh - 64px); | ||
width: 100%; | ||
|
||
@media (min-width: 576px) { | ||
width: 95%; | ||
} | ||
@media (min-width: 768px) { | ||
width: 90%; | ||
} | ||
@media (min-width: 992px) { | ||
width: 85%; | ||
} | ||
@media (min-width: 1200px) { | ||
width: 80%; | ||
} | ||
} | ||
|
||
#footer { | ||
background: #bbb; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { Layout } from "antd"; | ||
import React, { FunctionComponent } from "react"; | ||
import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom"; | ||
|
||
import Logo from "./components/Logo"; | ||
import ScrollToTop from "./components/ScrollToTop"; | ||
import Home from "./pages/Home"; | ||
import RequestHelp from "./pages/RequestHelp"; | ||
import SignUp from "./pages/SignUp"; | ||
|
||
import "./LinguistAid.scss"; | ||
import NavBarMenu from "./components/NavBarMenu"; | ||
import About from "./pages/About"; | ||
|
||
const { Header, Footer, Content } = Layout; | ||
|
||
const LinguistAid: FunctionComponent<{}> = () => ( | ||
<Router> | ||
<div> | ||
<ScrollToTop /> | ||
<Layout> | ||
<Header id="header"> | ||
<Link to="/"> | ||
<Logo /> | ||
</Link> | ||
<NavBarMenu /> | ||
</Header> | ||
<Content id="content-container"> | ||
<Switch> | ||
<Route path="/" exact> | ||
<Home /> | ||
</Route> | ||
<Route path="/sign-up" exact> | ||
<SignUp /> | ||
</Route> | ||
<Route path="/request-help" exact> | ||
<RequestHelp /> | ||
</Route> | ||
<Route path="/about" exact> | ||
<About /> | ||
</Route> | ||
</Switch> | ||
</Content> | ||
<Footer id="footer"> | ||
Made and run with{" "} | ||
<span role="img" aria-label="love"> | ||
❤️ | ||
</span>{" "} | ||
by volunteers. <Link to="/about">Get in touch with us here.</Link>{" "} | ||
Also, a massive thank you to{" "} | ||
<a href="https://www.netlify.com">Netlify</a> for generously hosting | ||
and powering this site for free! | ||
</Footer> | ||
</Layout> | ||
</div> | ||
</Router> | ||
); | ||
|
||
export default LinguistAid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React, { FunctionComponent } from "react"; | ||
|
||
import "./logo.css"; | ||
|
||
const Logo: FunctionComponent<{}> = () => ( | ||
<div className="logo">Linguist Aid</div> | ||
); | ||
|
||
export default Logo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Menu } from "antd"; | ||
import React, { FunctionComponent } from "react"; | ||
import { Link, RouteComponentProps, withRouter } from "react-router-dom"; | ||
|
||
interface IMenuItem { | ||
route: string; | ||
displayText: string; | ||
} | ||
const menuItems: IMenuItem[] = [ | ||
{ | ||
route: "/sign-up", | ||
displayText: "I want to volunteer!" | ||
}, | ||
{ | ||
route: "/request-help", | ||
displayText: "We need help!" | ||
} | ||
]; | ||
|
||
interface INavBarMenuProps extends RouteComponentProps {} | ||
|
||
const NavBarMenu: FunctionComponent<INavBarMenuProps> = ({ | ||
location: { pathname } | ||
}) => ( | ||
<Menu mode="horizontal" theme="dark" selectedKeys={[pathname]}> | ||
{menuItems.map(({ route, displayText }) => ( | ||
<Menu.Item key={route}> | ||
<Link to={route}>{displayText}</Link> | ||
</Menu.Item> | ||
))} | ||
</Menu> | ||
); | ||
|
||
export default withRouter(NavBarMenu); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { FunctionComponent, useEffect } from "react"; | ||
import { RouteComponentProps, withRouter } from "react-router-dom"; | ||
|
||
interface IScrollToTopProps extends RouteComponentProps {} | ||
|
||
const ScrollToTop: FunctionComponent<IScrollToTopProps> = ({ history }) => { | ||
useEffect(() => { | ||
const unlisten = history.listen(() => { | ||
window.scrollTo(0, 0); | ||
}); | ||
return () => { | ||
unlisten(); | ||
}; | ||
}); | ||
|
||
return null; | ||
}; | ||
|
||
export default withRouter(ScrollToTop); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.logo { | ||
color: white; | ||
float: left; | ||
font-weight: 700; | ||
font-size: 28px; | ||
padding: 0 50px 0 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import './index.css'; | ||
import App from './App'; | ||
import * as serviceWorker from './serviceWorker'; | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import "./index.css"; | ||
import LinguistAid from "./LinguistAid"; | ||
import * as serviceWorker from "./serviceWorker"; | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
<App /> | ||
<LinguistAid /> | ||
</React.StrictMode>, | ||
document.getElementById('root') | ||
document.getElementById("root") | ||
); | ||
|
||
// If you want your app to work offline and load faster, you can change | ||
// unregister() to register() below. Note this comes with some pitfalls. | ||
// Learn more about service workers: https://bit.ly/CRA-PWA | ||
serviceWorker.unregister(); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.