1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-25 18:56:50 +02:00

Context warnings, more terms links (#199)

* move general banner to publish screen

* modify main banner

* move banner contents into content files

* simple footer links

* consistent links

* specificity
This commit is contained in:
Matthias Kretschmann 2020-11-03 14:17:21 +01:00 committed by GitHub
parent 8f1cde9c90
commit 3974e4a9a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 45 additions and 17 deletions

View File

@ -1,6 +1,7 @@
{ {
"title": "Publish", "title": "Publish",
"description": "Highlight the important features of your data set to make it more discoverable and catch the interest of data consumers.", "description": "Highlight the important features of your data set to make it more discoverable and catch the interest of data consumers.",
"warning": "Given the beta status, publishing on Rinkeby first is strongly recommended. Please familiarize yourself with [the market](https://oceanprotocol.com/technology/marketplaces), [the risks](https://blog.oceanprotocol.com/on-staking-on-data-in-ocean-market-3d8e09eb0a13), and the [Terms of Use](/terms).",
"form": { "form": {
"title": "Publish", "title": "Publish",
"data": [ "data": [

View File

@ -15,6 +15,7 @@
"name": "History", "name": "History",
"link": "/history" "link": "/history"
} }
] ],
"warning": "We are in beta. Please familiarize yourself with [the market](https://oceanprotocol.com/technology/marketplaces), [the risks](https://blog.oceanprotocol.com/on-staking-on-data-in-ocean-market-3d8e09eb0a13), and the [Terms of Use](/terms)."
} }
} }

View File

@ -14,8 +14,12 @@
} }
.main { .main {
padding: var(--spacer) 0 calc(var(--spacer) * 2) 0; padding: calc(var(--spacer) * 2) 0;
/* sticky footer technique */ /* sticky footer technique */
flex: 1; flex: 1;
} }
.banner {
margin-bottom: -2rem !important;
}

View File

@ -6,6 +6,7 @@ import styles from './Layout.module.css'
import Seo from './atoms/Seo' import Seo from './atoms/Seo'
import Container from './atoms/Container' import Container from './atoms/Container'
import Alert from './atoms/Alert' import Alert from './atoms/Alert'
import { useSiteMetadata } from '../hooks/useSiteMetadata'
export interface LayoutProps { export interface LayoutProps {
children: ReactNode children: ReactNode
@ -24,16 +25,17 @@ export default function Layout({
noPageHeader, noPageHeader,
headerCenter headerCenter
}: LayoutProps): ReactElement { }: LayoutProps): ReactElement {
const { warning } = useSiteMetadata()
return ( return (
<div className={styles.app}> <div className={styles.app}>
<Seo title={title} description={description} uri={uri} /> <Seo title={title} description={description} uri={uri} />
<Header /> <Header />
<Alert {uri === '/' && (
text="Given the beta status, publishing on Rinkeby first is strongly recommended. [Learn about the market](https://oceanprotocol.com/technology/marketplaces)." <Alert text={warning} state="info" className={styles.banner} />
state="info" )}
/>
<main className={styles.main}> <main className={styles.main}>
<Container> <Container>

View File

@ -2,6 +2,7 @@ import React, { ReactElement } from 'react'
import styles from './Footer.module.css' import styles from './Footer.module.css'
import Markdown from '../atoms/Markdown' import Markdown from '../atoms/Markdown'
import { useSiteMetadata } from '../../hooks/useSiteMetadata' import { useSiteMetadata } from '../../hooks/useSiteMetadata'
import { Link } from 'gatsby'
export default function Footer(): ReactElement { export default function Footer(): ReactElement {
const { copyright } = useSiteMetadata() const { copyright } = useSiteMetadata()
@ -10,7 +11,9 @@ export default function Footer(): ReactElement {
return ( return (
<footer className={styles.footer}> <footer className={styles.footer}>
<div className={styles.content}> <div className={styles.content}>
© {year} <Markdown text={copyright} /> © {year} <Markdown text={copyright} /> <Link to="/terms">Terms</Link>
{' — '}
<a href="https://oceanprotocol.com/privacy">Privacy</a>
</div> </div>
</footer> </footer>
) )

View File

@ -4,6 +4,12 @@
position: relative; position: relative;
} }
.alert,
div.alert {
margin-bottom: var(--spacer);
margin-left: 0;
}
@media (min-width: 55rem) { @media (min-width: 55rem) {
.grid { .grid {
/* lazy golden ratio */ /* lazy golden ratio */

View File

@ -14,13 +14,14 @@ import { DDO, Logger, Metadata } from '@oceanprotocol/lib'
import { Persist } from '../../atoms/FormikPersist' import { Persist } from '../../atoms/FormikPersist'
import Debug from './Debug' import Debug from './Debug'
import Feedback from './Feedback' import Feedback from './Feedback'
import Alert from '../../atoms/Alert'
const formName = 'ocean-publish-form' const formName = 'ocean-publish-form'
export default function PublishPage({ export default function PublishPage({
content content
}: { }: {
content: { form: FormContent } content: { warning: string; form: FormContent }
}): ReactElement { }): ReactElement {
const { debug } = useUserPreferences() const { debug } = useUserPreferences()
const { publish, publishError, isLoading, publishStepText } = usePublish() const { publish, publishError, isLoading, publishStepText } = usePublish()
@ -97,15 +98,23 @@ export default function PublishPage({
setError={setError} setError={setError}
/> />
) : ( ) : (
<article className={styles.grid}> <>
<FormPublish content={content.form} /> <Alert
<aside> text={content.warning}
<div className={styles.sticky}> state="info"
<Preview values={values} /> className={styles.alert}
<Web3Feedback /> />
</div> <article className={styles.grid}>
</aside> <FormPublish content={content.form} />
</article>
<aside>
<div className={styles.sticky}>
<Preview values={values} />
<Web3Feedback />
</div>
</aside>
</article>
</>
)} )}
{debug === true && <Debug values={values} />} {debug === true && <Debug values={values} />}

View File

@ -13,6 +13,7 @@ const query = graphql`
name name
link link
} }
warning
appConfig { appConfig {
infuraProjectId infuraProjectId
network network

View File

@ -22,6 +22,7 @@ export const contentQuery = graphql`
childPagesJson { childPagesJson {
title title
description description
warning
form { form {
title title
data { data {