Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LangingPage] Add paragraph with call-to-action, sign-up button #1616

Merged
merged 5 commits into from
Mar 18, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PC such as an Intel NUC. The instructions assume that:
has been cloned on the host machine. This directory is referred to as \<COMBINE\>.
- the target machine where _The Combine_ is being installed will be referred to as _\<target\>_
- the user on the target machine that will be used for installing docker, etc. will be referred to as _\<target_user\>_.
You must be able to login to _\<target\>_ as _\<target_user\>_ and _\<target_user\>_ must have `sudo` privileges.
You must be able to log in to _\<target\>_ as _\<target_user\>_ and _\<target_user\>_ must have `sudo` privileges.

## Contents

Expand Down
8 changes: 4 additions & 4 deletions docs/deploy/kubernetes_design/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ The following diagram shows the Kubernetes resources used to create the image pu

### Additional AWS Login Resources

| Resource | Kind | Description |
| ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| aws-ecr-config | ConfigMap | `aws-ecr-config` defines the runtime configuration for AWS ECR logins. |
| aws-ecr-credentials | Secret | `aws-ecr-credentials` defines the access accounts and credentials to login to the AWS ECR service. Note that these credentials may be different than the `aws-s3-credentials` |
| Resource | Kind | Description |
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| aws-ecr-config | ConfigMap | `aws-ecr-config` defines the runtime configuration for AWS ECR logins. |
| aws-ecr-credentials | Secret | `aws-ecr-credentials` defines the access accounts and credentials to log in to the AWS ECR service. Note that these credentials may be different than the `aws-s3-credentials` |

## SSL Termination

Expand Down
6 changes: 3 additions & 3 deletions docs/user_guide/docs/account.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Account

How to sign up, login, and edit your account.
How to sign up, log in, and edit your account.

![Login](images/login.png){ .center }

Expand All @@ -12,9 +12,9 @@ To create a new account, click the [SIGN UP](../sign-up) button on the Login pag

The email address is used to reset your password, so there is only one account allowed per email address.

## Login
## Log In

[Login](../login) to The Combine with the username and password given at registration.
[Log in](../login) to The Combine with the username and password given at registration.

If you want to change your password, click the "Forget password?" link. Follow the instructions and a password-reset
will be sent to the email address associated with your account.
Expand Down
3 changes: 2 additions & 1 deletion src/components/LandingPage/BottomBar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { AppBar, Button, Grid, Toolbar, Typography } from "@material-ui/core";
import { ReactElement } from "react";
import { Translate } from "react-localize-redux";

export const bottomBarHeight = 55;

/** A bar shown at the bottom of the landing page. */
export default function BottomBar() {
export default function BottomBar(): ReactElement {
const { REACT_APP_VERSION } = process.env;
return (
<div style={{ marginTop: bottomBarHeight }}>
Expand Down
37 changes: 23 additions & 14 deletions src/components/LandingPage/LandingButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Button, Card, Grid, Typography } from "@material-ui/core";
import { ReactElement } from "react";
import { Translate } from "react-localize-redux";

import history, { openUserGuide, Path } from "browserHistory";
Expand All @@ -19,7 +20,9 @@ interface LandingButtonsProps {
top?: boolean;
}

export default function LandingButtons(props: LandingButtonsProps) {
export default function LandingButtons(
props: LandingButtonsProps
): ReactElement {
return (
<Card
style={{
Expand All @@ -33,11 +36,7 @@ export default function LandingButtons(props: LandingButtonsProps) {
alignItems="center"
style={{ height: "100%" }}
>
<LandingButton
onClick={() => history.push(Path.SignUp)}
textId="login.signUp"
buttonId={`${idAffix}-signUp`}
/>
<SignUpButton />
<LandingButton
onClick={() => history.push(Path.Login)}
textId="login.login"
Expand All @@ -53,21 +52,31 @@ export default function LandingButtons(props: LandingButtonsProps) {
);
}

interface SignUpButtonProps {
buttonIdPrefix?: string;
}
export function SignUpButton(props: SignUpButtonProps): ReactElement {
return (
<LandingButton
onClick={() => history.push(Path.SignUp)}
textId="login.signUp"
buttonId={`${props.buttonIdPrefix ?? idAffix}-signUp`}
filled
/>
);
}

interface LandingButtonProps {
onClick: () => void;
textId: string;
buttonId: string;
filled?: boolean;
}
function LandingButton(props: LandingButtonProps) {
function LandingButton(props: LandingButtonProps): ReactElement {
return (
<Grid
item
style={{
textAlign: "center",
}}
>
<Grid item style={{ textAlign: "center" }}>
<Button
variant="contained"
variant={props.filled ? "contained" : "outlined"}
color="primary"
onClick={props.onClick}
style={{ height: buttonHeight, width: buttonWidth }}
Expand Down
3 changes: 2 additions & 1 deletion src/components/LandingPage/TopBar.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { AppBar, Grid, Hidden, Toolbar, Typography } from "@material-ui/core";
import { ReactElement } from "react";
import { Translate } from "react-localize-redux";

import logo from "resources/CombineLogoV1White.png";

export const topBarHeight = 70;

/** A bar shown at the top of the landing page. */
export default function TopBar() {
export default function TopBar(): ReactElement {
return (
<div className="NavigationBar" style={{ marginBottom: topBarHeight }}>
<AppBar position="fixed">
Expand Down
46 changes: 29 additions & 17 deletions src/components/LandingPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Box, Grid, Hidden, Typography } from "@material-ui/core";
import React from "react";
import { Box, Button, Grid, Hidden, Typography } from "@material-ui/core";
import React, { ReactElement } from "react";
import { Translate } from "react-localize-redux";

import history, { Path } from "browserHistory";
import BottomBar, { bottomBarHeight } from "components/LandingPage/BottomBar";
import LandingButtons, {
horizontalButtonsHeight,
SignUpButton,
} from "components/LandingPage/LandingButtons";
import TopBar, { topBarHeight } from "components/LandingPage/TopBar";
import tractor from "resources/tractor.png";
Expand All @@ -13,7 +15,7 @@ import theme from "types/theme";
const heightBetweenBars =
window.innerHeight - topBarHeight - bottomBarHeight - theme.spacing(1);

export default function LandingPage() {
export default function LandingPage(): ReactElement {
return (
<React.Fragment>
<TopBar />
Expand Down Expand Up @@ -49,22 +51,32 @@ export default function LandingPage() {
);
}

function body() {
function body(): ReactElement {
return (
<React.Fragment>
<Typography
variant="body2"
align="justify"
style={{ padding: theme.spacing(3) }}
>
<Translate id="landingPage.descriptionP1" />
{<br />}
{<br />}
<Translate id="landingPage.descriptionP2" />
{<br />}
{<br />}
<Translate id="landingPage.descriptionP3" />
</Typography>
<div style={{ padding: theme.spacing(3) }}>
<Typography variant="body2" align="justify">
<Translate id="landingPage.descriptionP1" />
{<br />}
{<br />}
<Translate id="landingPage.descriptionP2" />
{<br />}
{<br />}
<Translate id="landingPage.descriptionP3" />
{<br />}
</Typography>
<Typography
variant="h6"
align="justify"
style={{
paddingTop: theme.spacing(2),
paddingBottom: theme.spacing(1),
}}
>
<Translate id="landingPage.descriptionP4" />
</Typography>
<SignUpButton buttonIdPrefix="landing-body" />
</div>
<img
src={tractor}
alt="Tractor"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Login/LoginPage/LoginComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export default class Login extends React.Component<
</div>
)}

{/* User Guide, Sign Up, and Login buttons */}
{/* User Guide, Sign Up, and Log In buttons */}
<Grid container justifyContent="flex-end" spacing={2}>
<Grid item xs={4} sm={6}>
<Button id={`${idAffix}-guide`} onClick={openUserGuide}>
Expand Down
7 changes: 6 additions & 1 deletion src/resources/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
"People with little prior linguistic knowledge and limited computer experience can be quickly trained to use The Combine's main word-harvesting capabilities. Then the resulting words can be organized and edited within The Combine before exporting the data to use in other tools such as FLEx.",
"People with little prior linguistic knowledge and limited computer experience can be quickly trained to use The Combine's main word-harvesting capabilities. Then the resulting words can be organized and edited within The Combine before exporting the data to use in other tools such as FLEx.",
"People with little prior linguistic knowledge and limited computer experience can be quickly trained to use The Combine's main word-harvesting capabilities. Then the resulting words can be organized and edited within The Combine before exporting the data to use in other tools such as FLEx."
],
"descriptionP4": [
"Sign up to get started with your word collection!",
"Sign up to get started with your word collection!",
"Sign up to get started with your word collection!"
]
},
"treeView": {
Expand Down Expand Up @@ -119,7 +124,7 @@
"¿Se te olvidó tu contraseña?",
"Mot de passe oublié ?"
],
"login": ["Login", "Iniciar sesión", "Se connecter"],
"login": ["Log in", "Iniciar sesión", "Se connecter"],
"failed": [
"Failed to log in. Please check your username and password.",
"Error al iniciar sesión. Por favor verifique su nombre de usuario y contraseña.",
Expand Down