From f79d8c2c91de7e4af158eba19ac3bb2cb407d72d Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 22 Feb 2021 16:37:50 +0100 Subject: [PATCH] content updates --- content/pages/{ => publish}/form-algorithm.json | 0 content/pages/{ => publish}/form-dataset.json | 0 content/pages/{ => publish}/index.json | 2 +- src/components/atoms/Tabs.module.css | 3 ++- src/components/pages/Publish/FormAlgoPublish.tsx | 6 +++--- src/components/pages/Publish/FormPublish.tsx | 6 +++--- src/components/pages/Publish/index.tsx | 4 +++- src/pages/publish.tsx | 8 +++++--- 8 files changed, 17 insertions(+), 12 deletions(-) rename content/pages/{ => publish}/form-algorithm.json (100%) rename content/pages/{ => publish}/form-dataset.json (100%) rename content/pages/{ => publish}/index.json (82%) diff --git a/content/pages/form-algorithm.json b/content/pages/publish/form-algorithm.json similarity index 100% rename from content/pages/form-algorithm.json rename to content/pages/publish/form-algorithm.json diff --git a/content/pages/form-dataset.json b/content/pages/publish/form-dataset.json similarity index 100% rename from content/pages/form-dataset.json rename to content/pages/publish/form-dataset.json diff --git a/content/pages/index.json b/content/pages/publish/index.json similarity index 82% rename from content/pages/index.json rename to content/pages/publish/index.json index 36b3947f0..00d2d5d91 100644 --- a/content/pages/index.json +++ b/content/pages/publish/index.json @@ -1,5 +1,5 @@ { "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 or algorithm to make it more discoverable and catch the interest of data consumers.", "warning": "Given the beta status, publishing on Ropsten or 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)." } diff --git a/src/components/atoms/Tabs.module.css b/src/components/atoms/Tabs.module.css index 1495753a1..3d76fc0d6 100644 --- a/src/components/atoms/Tabs.module.css +++ b/src/components/atoms/Tabs.module.css @@ -13,6 +13,7 @@ text-transform: uppercase; cursor: pointer; color: var(--color-secondary); + background-color: var(--background-body); border: 1px solid var(--border-color); margin-right: -1px; min-width: 100px; @@ -29,7 +30,7 @@ } .tab[aria-selected='true'] { - background: var(--font-color-heading); + background-color: var(--font-color-heading); color: var(--background-body); border-color: var(--font-color-heading); } diff --git a/src/components/pages/Publish/FormAlgoPublish.tsx b/src/components/pages/Publish/FormAlgoPublish.tsx index 045af21f4..5b148e9a8 100644 --- a/src/components/pages/Publish/FormAlgoPublish.tsx +++ b/src/components/pages/Publish/FormAlgoPublish.tsx @@ -12,11 +12,11 @@ import stylesIndex from './index.module.css' const query = graphql` query { content: allFile( - filter: { relativePath: { eq: "pages/form-algorithm.json" } } + filter: { relativePath: { eq: "pages/publish/form-algorithm.json" } } ) { edges { node { - childPagesJson { + childPublishJson { title data { name @@ -39,7 +39,7 @@ const query = graphql` export default function FormPublish(): ReactElement { const data = useStaticQuery(query) - const content: FormContent = data.content.edges[0].node.childPagesJson + const content: FormContent = data.content.edges[0].node.childPublishJson const { ocean, account } = useOcean() const { status, diff --git a/src/components/pages/Publish/FormPublish.tsx b/src/components/pages/Publish/FormPublish.tsx index 96e67e66e..7433e573a 100644 --- a/src/components/pages/Publish/FormPublish.tsx +++ b/src/components/pages/Publish/FormPublish.tsx @@ -12,11 +12,11 @@ import stylesIndex from './index.module.css' const query = graphql` query { content: allFile( - filter: { relativePath: { eq: "pages/form-dataset.json" } } + filter: { relativePath: { eq: "pages/publish/form-dataset.json" } } ) { edges { node { - childPagesJson { + childPublishJson { title data { name @@ -39,7 +39,7 @@ const query = graphql` export default function FormPublish(): ReactElement { const data = useStaticQuery(query) - const content: FormContent = data.content.edges[0].node.childPagesJson + const content: FormContent = data.content.edges[0].node.childPublishJson const { ocean, account } = useOcean() const { status, diff --git a/src/components/pages/Publish/index.tsx b/src/components/pages/Publish/index.tsx index 1c85bf02b..86dd6ddcc 100644 --- a/src/components/pages/Publish/index.tsx +++ b/src/components/pages/Publish/index.tsx @@ -72,7 +72,9 @@ export default function PublishPage({ const [error, setError] = useState() const [title, setTitle] = useState() const [did, setDid] = useState() - const [publishType, setPublishType] = useState() + const [publishType, setPublishType] = useState( + 'dataset' + ) const hasFeedback = isLoading || error || success diff --git a/src/pages/publish.tsx b/src/pages/publish.tsx index 8292951ba..02f7d47da 100644 --- a/src/pages/publish.tsx +++ b/src/pages/publish.tsx @@ -4,7 +4,7 @@ import Page from '../components/templates/Page' import { graphql, PageProps } from 'gatsby' export default function PageGatsbyPublish(props: PageProps): ReactElement { - const content = (props.data as any).content.edges[0].node.childPagesJson + const content = (props.data as any).content.edges[0].node.childPublishJson const { title, description } = content return ( @@ -16,10 +16,12 @@ export default function PageGatsbyPublish(props: PageProps): ReactElement { export const contentQuery = graphql` query PublishPageQuery { - content: allFile(filter: { relativePath: { eq: "pages/index.json" } }) { + content: allFile( + filter: { relativePath: { eq: "pages/publish/index.json" } } + ) { edges { node { - childPagesJson { + childPublishJson { title description warning