mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
frontpage sections sourced from data
This commit is contained in:
parent
e39fa48d86
commit
499b98f1b0
@ -3,4 +3,4 @@ title: Architecture
|
|||||||
description: The architecture of Ocean Protocol with all its components and how they work together.
|
description: The architecture of Ocean Protocol with all its components and how they work together.
|
||||||
---
|
---
|
||||||
|
|
||||||
![Ocean Protocol Components](../images/components.png 'Ocean Protocol Components')
|
![Ocean Protocol Components](images/components.png 'Ocean Protocol Components')
|
||||||
|
Before Width: | Height: | Size: 406 KiB After Width: | Height: | Size: 406 KiB |
@ -19,6 +19,13 @@ module.exports = {
|
|||||||
path: `${__dirname}/content`
|
path: `${__dirname}/content`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
resolve: 'gatsby-source-filesystem',
|
||||||
|
options: {
|
||||||
|
name: 'data',
|
||||||
|
path: `${__dirname}/src/data`
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
resolve: 'gatsby-transformer-remark',
|
resolve: 'gatsby-transformer-remark',
|
||||||
options: {
|
options: {
|
||||||
|
11
src/data/sections.yml
Normal file
11
src/data/sections.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
- title: Core Concepts
|
||||||
|
description: Understand the fundamentals of Ocean Protocol.
|
||||||
|
link: /concepts/introduction/
|
||||||
|
|
||||||
|
- title: Setup Guides
|
||||||
|
description: Setting up the Ocean Protocol components.
|
||||||
|
link: /setup/keeper/
|
||||||
|
|
||||||
|
- title: Tutorials
|
||||||
|
description: Browse tutorials for most common setup and development use-cases.
|
||||||
|
link: /tutorials/jupyter/
|
@ -1,14 +1,14 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Link } from 'gatsby'
|
import { Link, graphql } from 'gatsby'
|
||||||
import Layout from '../components/Layout'
|
import Layout from '../components/Layout'
|
||||||
import Content from '../components/Content'
|
import Content from '../components/Content'
|
||||||
// import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
|
||||||
const SectionLink = ({ to, title, children }) => (
|
const SectionLink = ({ to, title, children }) => (
|
||||||
<Link to={to}>
|
<Link to={to}>
|
||||||
<h3>{title}</h3>
|
<h3 className={styles.sectionTitle}>{title}</h3>
|
||||||
<p>{children}</p>
|
<p className={styles.sectionText}>{children}</p>
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -18,27 +18,39 @@ SectionLink.propTypes = {
|
|||||||
children: PropTypes.any
|
children: PropTypes.any
|
||||||
}
|
}
|
||||||
|
|
||||||
const IndexPage = ({ location }) => (
|
const IndexPage = ({ data, location }) => (
|
||||||
<Layout location={location}>
|
<Layout location={location}>
|
||||||
<Content>
|
<Content>
|
||||||
<SectionLink to="/concepts/introduction/" title="Core Concepts">
|
<ul className={styles.sections}>
|
||||||
Understand the fundamentals of Ocean Protocol.
|
{data.allSectionsYaml.edges.map(({ node }) => (
|
||||||
</SectionLink>
|
<li key={node.title} className={styles.section}>
|
||||||
|
<SectionLink to={node.link} title={node.title}>
|
||||||
<SectionLink to="/setup/keeper/" title="Setup Guides">
|
{node.description}
|
||||||
Setting up the Ocean Protocol components.
|
</SectionLink>
|
||||||
</SectionLink>
|
</li>
|
||||||
|
))}
|
||||||
<SectionLink to="/tutorials/jupyter/" title="Tutorials">
|
</ul>
|
||||||
Browse tutorials for most common setup and development
|
|
||||||
use-cases.
|
|
||||||
</SectionLink>
|
|
||||||
</Content>
|
</Content>
|
||||||
</Layout>
|
</Layout>
|
||||||
)
|
)
|
||||||
|
|
||||||
IndexPage.propTypes = {
|
IndexPage.propTypes = {
|
||||||
|
data: PropTypes.object.isRequired,
|
||||||
location: PropTypes.object.isRequired
|
location: PropTypes.object.isRequired
|
||||||
}
|
}
|
||||||
|
|
||||||
export default IndexPage
|
export default IndexPage
|
||||||
|
|
||||||
|
export const IndexQuery = graphql`
|
||||||
|
query {
|
||||||
|
allSectionsYaml {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
title
|
||||||
|
description
|
||||||
|
link
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
@ -1,2 +1,39 @@
|
|||||||
@import 'variables';
|
@import 'variables';
|
||||||
|
|
||||||
|
.sections {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
margin-top: $spacer * 2;
|
||||||
|
|
||||||
|
@media (min-width: $break-point--medium) {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.section {
|
||||||
|
margin-bottom: $spacer;
|
||||||
|
|
||||||
|
@media (min-width: $break-point--medium) {
|
||||||
|
flex: 0 0 30%;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: block;
|
||||||
|
padding: $spacer * $line-height;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
box-shadow: rgba($brand-black, .1) 0px 9px 18px;
|
||||||
|
color: $brand-grey;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sectionTitle {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sectionText {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user