mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Merge pull request #31 from oceanprotocol/feature/principles
add principles document
This commit is contained in:
commit
35fd71f96a
@ -8,6 +8,8 @@
|
|||||||
link: /concepts/components/
|
link: /concepts/components/
|
||||||
- title: Tools & Examples
|
- title: Tools & Examples
|
||||||
link: /concepts/tools/
|
link: /concepts/tools/
|
||||||
|
- title: Engineering Principles
|
||||||
|
link: /concepts/principles/
|
||||||
|
|
||||||
- group: Architecture
|
- group: Architecture
|
||||||
items:
|
items:
|
||||||
|
2
external/dev-ocean
vendored
2
external/dev-ocean
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 6bbf269da9eaf75c0fd42bd2a71944af52db6f04
|
Subproject commit b082789e850b6cdf5af129352f58e029b4a8637b
|
@ -54,7 +54,7 @@ exports.createPages = ({ graphql, actions }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
architectureDocs: allMarkdownRemark(
|
devOceanDocs: allMarkdownRemark(
|
||||||
filter: {
|
filter: {
|
||||||
fileAbsolutePath: { regex: "/dev-ocean/doc/" }
|
fileAbsolutePath: { regex: "/dev-ocean/doc/" }
|
||||||
}
|
}
|
||||||
@ -98,13 +98,14 @@ exports.createPages = ({ graphql, actions }) => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// Create Architecture section from dev-ocean contents
|
// Create pages from dev-ocean contents
|
||||||
const postsArchitecture = result.data.architectureDocs.edges
|
const postsDevOcean = result.data.devOceanDocs.edges
|
||||||
|
|
||||||
postsArchitecture
|
postsDevOcean
|
||||||
// only grab files with required frontmatter defined
|
// only grab files with required frontmatter defined
|
||||||
.filter(
|
.filter(
|
||||||
post =>
|
post =>
|
||||||
|
post.node.frontmatter &&
|
||||||
post.node.frontmatter.slug &&
|
post.node.frontmatter.slug &&
|
||||||
post.node.frontmatter.title &&
|
post.node.frontmatter.title &&
|
||||||
post.node.frontmatter.description &&
|
post.node.frontmatter.description &&
|
||||||
|
@ -21,6 +21,12 @@
|
|||||||
padding-bottom: $spacer / $line-height;
|
padding-bottom: $spacer / $line-height;
|
||||||
border-bottom: 1px solid $brand-grey-lighter;
|
border-bottom: 1px solid $brand-grey-lighter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
overflow-wrap: normal;
|
||||||
|
word-wrap: normal;
|
||||||
|
word-break: normal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty {
|
.empty {
|
||||||
|
@ -1,13 +1,23 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
|
import remark from 'remark'
|
||||||
|
import remarkReact from 'remark-react'
|
||||||
import styles from './DocHeader.module.scss'
|
import styles from './DocHeader.module.scss'
|
||||||
|
|
||||||
const DocHeader = ({ title, description }) => (
|
const DocHeader = ({ title, description }) => {
|
||||||
|
const descriptionHtml =
|
||||||
|
description &&
|
||||||
|
remark()
|
||||||
|
.use(remarkReact)
|
||||||
|
.processSync(description).contents
|
||||||
|
|
||||||
|
return (
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<h1 className={styles.title}>{title}</h1>
|
<h1 className={styles.title}>{title}</h1>
|
||||||
{description && <p className={styles.lead}>{description}</p>}
|
{description && <p className={styles.lead}>{descriptionHtml}</p>}
|
||||||
</header>
|
</header>
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
DocHeader.propTypes = {
|
DocHeader.propTypes = {
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
|
@ -219,6 +219,11 @@ table {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: $spacer * $line-height;
|
margin-bottom: $spacer * $line-height;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
// make 'em scrollable
|
||||||
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
@ -227,6 +232,7 @@ table {
|
|||||||
padding: $spacer / 2;
|
padding: $spacer / 2;
|
||||||
border-bottom: 1px solid $brand-grey-lighter;
|
border-bottom: 1px solid $brand-grey-lighter;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
font-size: 90%;
|
||||||
|
|
||||||
&[align='center'] {
|
&[align='center'] {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
Loading…
Reference in New Issue
Block a user