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

Layout/datasets page #2768

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4626e66
added demo route
NanaKay007 May 18, 2020
06c628f
demo_layout component for rendering demo routes
NanaKay007 May 18, 2020
7bcc679
uses location to detect the 'demo' token in path
NanaKay007 May 18, 2020
1d8d6a0
basic demo layout
NanaKay007 May 18, 2020
96746b4
added keys for the intro page
NanaKay007 May 21, 2020
c0f7590
assets for intro page
NanaKay007 May 21, 2020
9cddc69
intro page
NanaKay007 May 21, 2020
fbcd5e4
intro page styles
NanaKay007 May 21, 2020
e080b47
render intro page component
NanaKay007 May 21, 2020
5c41953
set waves.svg as the background img of root elmnt
NanaKay007 May 22, 2020
bea727f
shared styles for child elements
NanaKay007 May 22, 2020
93bc7c9
styles for text elmnts
NanaKay007 May 22, 2020
db7b620
static and hover states for svg el. in button
NanaKay007 May 22, 2020
08e72b9
other styles
NanaKay007 May 22, 2020
3f6b3e9
not needed
NanaKay007 May 22, 2020
d2da59d
used existing ui components and reduced nesting
NanaKay007 May 22, 2020
8cf48cd
got rid of element selectors
NanaKay007 May 22, 2020
2f86b33
updated semantic names
NanaKay007 May 22, 2020
fd3c267
renamed demo_pages folder to demo-pages
NanaKay007 May 25, 2020
ec64994
routes render kiosk container with dynamic content
NanaKay007 Jun 1, 2020
02afde0
assets for dataset page
NanaKay007 Jun 4, 2020
0c595ed
styles for kiosk pages
NanaKay007 Jun 4, 2020
2176424
text for datasets page
NanaKay007 Jun 4, 2020
77d593e
page content for datasets route
NanaKay007 Jun 4, 2020
ecbbd65
kiosk card wrapper
NanaKay007 Jun 4, 2020
c109612
type definitions
NanaKay007 Jun 4, 2020
9a3b76a
dashboard route definition
NanaKay007 Jun 4, 2020
f10d69b
starter code for demo-dashboard page
NanaKay007 Jun 4, 2020
623d7df
removed unnecessary imports
NanaKay007 Jun 4, 2020
88e7b83
layout definition for some kiosk pages
NanaKay007 Jun 4, 2020
8ef81fd
re-used splits in demo-pages/kiosk/datasets file
NanaKay007 Jun 4, 2020
d94dbb2
moved code into an exported function, renderStats
NanaKay007 Jun 4, 2020
37a5d15
moved code into getStats function
NanaKay007 Jun 4, 2020
77a6fd2
exported for use in kiosk/datasets file
NanaKay007 Jun 4, 2020
e6dc79b
used in kiosk/dataset.tsx file
NanaKay007 Jun 4, 2020
e8aad17
used in kiosk/datasets.tsx file
NanaKay007 Jun 4, 2020
7172466
moved some type definitions into ./types.tsx
NanaKay007 Jun 5, 2020
2e7cce6
shared type definitions for subscribe components in datasets-info.tsx…
NanaKay007 Jun 5, 2020
8f4a7b3
removed unused key
NanaKay007 Jun 5, 2020
73298cd
refactored code to utilize shared interface definitions
NanaKay007 Jun 5, 2020
a2ca150
corrected import
NanaKay007 Jun 5, 2020
c44cf59
removes 'version' from the DOM
NanaKay007 Jun 5, 2020
0624e84
fixed import and types
NanaKay007 Jun 5, 2020
88d2f63
fixed import and corrected <Localized/> usage
NanaKay007 Jun 5, 2020
f4352c6
corrected type usage and localized privacy link
NanaKay007 Jun 5, 2020
2858c9e
fixed localization bug
NanaKay007 Jun 8, 2020
7d3f7ab
fixed rebase issues
NanaKay007 Jun 9, 2020
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
16 changes: 15 additions & 1 deletion web/locales/en/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -815,4 +815,18 @@ read-more-about = Read more on our About page
## DemoLayout
demo-get-started = Let's Get Started
demo-welcome = Welcome to Common Voice
demo-welcome-subheader = Interested in learning more and contributing to the project?
demo-welcome-subheader = Interested in learning more and contributing to the project?

## Demo Datasets
demo-language-select-card-header = Common Voice is the world’s largest publicly available, multi-language voice dataset.
demo-language-select-card-body = Thanks to contributions from over 259k people in over 50 languages, this data is being used to train speech-enabled applications to better respond to the human voice.
demo-language-select-card-button = Next
demo-language-select-label = Browse Languages
demo-download-dataset = Common Voice Dataset
demo-datasets-building = We're building
demo-datasets-body = an open-source, multi-language dataset of voices that anyone can use to train speech-enabled applications.
demo-datasets-box-link = Read more
demo-dataset-download-lang-select = Language
demo-eofy-header = 2019 End-of-Year Release
demo-eofy-sub_header = Voice Dataset, Ready for Download
demo-subscribe = Want updates when we release a new version of the Common Voice dataset?
4 changes: 2 additions & 2 deletions web/src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ let LocalizedPage: any = class extends React.Component<

render() {
const { locale, notifications, toLocaleRoute, location } = this.props;
const { bundleGenerator, l10n, uploadPercentage } = this.state;
const { l10n, uploadPercentage } = this.state;

if (!l10n) return null;

Expand Down Expand Up @@ -278,7 +278,7 @@ let LocalizedPage: any = class extends React.Component<
}
/>
))}
{location.pathname.includes(URLS.DEMO) ? (
{location.pathname.includes('/demo') ? (
<DemoLayout />
) : (
<Layout />
Expand Down
9 changes: 9 additions & 0 deletions web/src/components/demo-pages/Intro/assets/Red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions web/src/components/demo-pages/Intro/intro.css
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
@import url('../../vars.css');

#intro-container {
.container {
display: flex;
flex-direction: column;
min-height: 100vh;
height: 100vh;
width: 100vw;
padding-top: 2.5vh;
background: var(--white) url('./assets/waves.svg') no-repeat center;
background-size: contain;
}

#intro-container--text-box {
.text {
text-align: center;
font-weight: normal;
}

#intro-container--text-box__text-header {
.text-header {
font-size: var(--font-size-xxl);
}

#intro-container--text-box__text-body {
.text-body {
font-weight: 300;
font-size: var(--font-size-lg);
letter-spacing: 0.0625rem;
margin-top: 0.625rem;
letter-spacing: 1px;
margin-top: 10px;
}

#intro-container--btn-get-started {
.btn-get-started {
background: var(--blue);
border-color: var(--blue);
margin: 1.875rem auto;
margin: 30px auto;
width: auto;
padding: 1rem 2.3125rem;
padding: 18px 37px;

path {
& path {
fill: var(--white);
}

&:hover {
background-color: var(--white);
path {
& path {
fill: var(--black);
}
}
}

#robot {
margin: 1.875rem auto;
margin: 30px auto;
/* fixed height enables the full page layout to render first before the image loads into view */
height: 32.8rem;
height: 525px;
}

#intro-container--gradient-layer {
min-height: 100vh;
.layer {
height: 100vh;
position: absolute;
width: 100%;
background: linear-gradient(
Expand Down
19 changes: 8 additions & 11 deletions web/src/components/demo-pages/Intro/intro.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
import * as React from 'react';
import robot from './assets/red-robot.svg';
import robot from './assets/Red.svg';
import './intro.css';
import { Localized, withLocalization } from 'fluent-react/compat';
import { Localized, withLocalization } from '@fluent/react';
import { LinkButton } from '../../ui/ui';
import { ArrowRight } from '../../ui/icons';
import URLS from '../../../urls';

export default withLocalization(function Intro() {
return (
<div id="intro-container">
<div id="intro-container--gradient-layer"></div>
<div className="container">
<div className="layer"></div>
<img src={robot} id="robot" alt="red robot" />
<div id="intro-container--text-box">
<div className="text">
<Localized id="demo-welcome">
<h1 id="intro-container--text-box__text-header" />
<h1 className="text-header" />
</Localized>
<Localized id="demo-welcome-subheader">
<p id="intro-container--text-box__text-body" />
<p className="text-body" />
</Localized>
</div>
<LinkButton
rounded
to={URLS.DEMO_DATASETS}
id="intro-container--btn-get-started">
<LinkButton rounded to={URLS.DEMO_DATASETS} className="btn-get-started">
<Localized id="demo-get-started">
<span />
</Localized>
Expand Down
21 changes: 21 additions & 0 deletions web/src/components/demo-pages/kiosk/assets/dark-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions web/src/components/demo-pages/kiosk/assets/grid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions web/src/components/demo-pages/kiosk/assets/mesh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions web/src/components/demo-pages/kiosk/assets/wave-grey.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions web/src/components/demo-pages/kiosk/assets/wave.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions web/src/components/demo-pages/kiosk/dashboard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';
import { PageContentType } from './types';
import { withLocalization } from '@fluent/react';

const dashboard = (): PageContentType => {
const ContentComponent = () => {
return <h1>Hi</h1>;
};

const CardComponent = () => <h1>Bye</h1>;

return {
Content: withLocalization(ContentComponent),
Card: withLocalization(CardComponent),
};
};

export default dashboard;
Loading