1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-30 05:41:41 +02:00

add global banner

This commit is contained in:
Matthias Kretschmann 2020-10-26 17:24:45 +01:00
parent c2a247b605
commit 1a621becd5
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 14 additions and 3 deletions

View File

@ -14,7 +14,7 @@
} }
.main { .main {
padding: calc(var(--spacer) * 2) 0; padding: var(--spacer) 0 calc(var(--spacer) * 2) 0;
/* sticky footer technique */ /* sticky footer technique */
flex: 1; flex: 1;

View File

@ -5,6 +5,7 @@ import PageHeader from './molecules/PageHeader'
import styles from './Layout.module.css' 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'
export interface LayoutProps { export interface LayoutProps {
children: ReactNode children: ReactNode
@ -28,6 +29,12 @@ export default function Layout({
<Seo title={title} description={description} uri={uri} /> <Seo title={title} description={description} uri={uri} />
<Header /> <Header />
<Alert
text="Given the beta status, publishing on Rinkeby first is strongly recommended. [Learn about the market](https://blog.oceanprotocol.com)."
state="info"
/>
<main className={styles.main}> <main className={styles.main}>
<Container> <Container>
{title && !noPageHeader && ( {title && !noPageHeader && (

View File

@ -26,10 +26,13 @@
} }
.text { .text {
margin-bottom: 0;
font-size: var(--font-size-small); font-size: var(--font-size-small);
} }
.text p:last-child {
margin-bottom: 0;
}
.action { .action {
margin-top: calc(var(--spacer) / 2); margin-top: calc(var(--spacer) / 2);
} }

View File

@ -1,6 +1,7 @@
import React, { ReactElement, FormEvent } from 'react' import React, { ReactElement, FormEvent } from 'react'
import styles from './Alert.module.css' import styles from './Alert.module.css'
import Button from './Button' import Button from './Button'
import Markdown from './Markdown'
export default function Alert({ export default function Alert({
title, title,
@ -19,7 +20,7 @@ export default function Alert({
return ( return (
<div className={`${styles.alert} ${styles[state]}`}> <div className={`${styles.alert} ${styles[state]}`}>
{title && <h3 className={styles.title}>{title}</h3>} {title && <h3 className={styles.title}>{title}</h3>}
<p className={styles.text}>{text}</p> <Markdown className={styles.text} text={text} />
{action && ( {action && (
<Button <Button
className={styles.action} className={styles.action}