1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

more content styling

This commit is contained in:
Matthias Kretschmann 2018-11-08 22:52:42 +01:00
parent 064ff60b4f
commit c90f07e483
Signed by: m
GPG Key ID: 606EEEF3C479A91F
12 changed files with 237 additions and 64 deletions

View File

@ -3,8 +3,6 @@ title: Ecosystem
description: The Ocean Protocol network consists of various components. description: The Ocean Protocol network consists of various components.
--- ---
[Architecture](./architecture/)
Learn about all of them here. Learn about all of them here.
- 💧 keeper. See also [Set Up a Keeper](/setup/keeper/) - 💧 keeper. See also [Set Up a Keeper](/setup/keeper/)

View File

@ -1,5 +1,6 @@
--- ---
title: Set Up a Marketplace title: Set Up a Marketplace
description: Fill me
--- ---
If you want to set up a marketplace for the Ocean network, then you could start by running the following tech stack: If you want to set up a marketplace for the Ocean network, then you could start by running the following tech stack:
@ -36,8 +37,8 @@ TODO: Link to instructions.
At the time of writing, Aquarius worked with three databases: At the time of writing, Aquarius worked with three databases:
* MongoDB - MongoDB
* Elasticsearch - Elasticsearch
* BigchainDB - BigchainDB
TODO: Outline the pros and cons of each database. TODO: Outline the pros and cons of each database.

View File

@ -1,23 +1,24 @@
--- ---
title: Content test title: Content test
description: This is intended as a quick reference and showcase.
--- ---
This is intended as a quick reference and showcase. For more complete info, see [John Gruber's original spec](http://daringfireball.net/projects/markdown/) and the [Github-flavored Markdown info page](http://github.github.com/github-flavored-markdown/). For more complete info, see [John Gruber's original spec](http://daringfireball.net/projects/markdown/) and the [Github-flavored Markdown info page](http://github.github.com/github-flavored-markdown/).
##### Table of Contents ## Table of Contents
* [Headers](#headers) * [Headers](#headers)
* [Emphasis](#emphasis) * [Emphasis](#emphasis)
* [Lists](#lists) * [Lists](#lists)
* [Links](#links) * [Links](#links)
* [Images](#images) * [Images](#images)
* [Code and Syntax Highlighting](#code) * [Code and Syntax Highlighting](#code-and-syntax-highlighting)
* [Tables](#tables) * [Tables](#tables)
* [Blockquotes](#blockquotes) * [Blockquotes](#blockquotes)
* [Inline HTML](#html) * [Inline HTML](#inline-html)
* [Horizontal Rule](#hr) * [Horizontal Rule](#horizontal-rule)
* [Line Breaks](#lines) * [Line Breaks](#line-breaks)
* [YouTube Videos](#videos) * [YouTube Videos](#youtube-videos)
## Headers ## Headers
@ -82,9 +83,7 @@ Strikethrough uses two tildes. ~~Scratch this.~~
1. Actual numbers don't matter, just that it's a number 1. Actual numbers don't matter, just that it's a number
1. Ordered sub-list 1. Ordered sub-list
4. And another item. 4. And another item.
Some text that should be aligned with the above item. Some text that should be aligned with the above item.
* Unordered list can use asterisks * Unordered list can use asterisks
- Or minuses - Or minuses
+ Or pluses + Or pluses
@ -92,17 +91,11 @@ Strikethrough uses two tildes. ~~Scratch this.~~
1. First ordered list item 1. First ordered list item
2. Another item 2. Another item
* Unordered sub-list. * Unordered sub-list.
1. Actual numbers don't matter, just that it's a number 1. Actual numbers don't matter, just that it's a number
1. Ordered sub-list 1. Ordered sub-list
4. And another item. 4. And another item.
Some text that should be aligned with the above item. Some text that should be aligned with the above item.
* Unordered list can use asterisks * Unordered list can use asterisks
- Or minuses - Or minuses
+ Or pluses + Or pluses
@ -152,30 +145,30 @@ Some text to show that the reference links can follow later.
## Images ## Images
``` ```
Here's our logo (hover to see the title text): Here's our jellyfish (hover to see the title text):
Inline-style: Inline-style:
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1") ![alt text](https://github.com/oceanprotocol/art/raw/master/jellyfish/jellyfish-grid%402x.png "Ocean Protocol Jellyfish")
Reference-style: Reference-style:
![alt text][logo] ![alt text][jellyfish]
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2" [jellyfish]: https://github.com/oceanprotocol/art/raw/master/jellyfish/jellyfish-grid%402x.png "Ocean Protocol Jellyfish"
``` ```
Here's our logo (hover to see the title text): Here's our jellyfish (hover to see the title text):
Inline-style: Inline-style:
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1") ![alt text](https://github.com/oceanprotocol/art/raw/master/jellyfish/jellyfish-grid%402x.png "Ocean Protocol Jellyfish")
Reference-style: Reference-style:
![alt text][logo] ![alt text][jellyfish]
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2" [jellyfish]: https://github.com/oceanprotocol/art/raw/master/jellyfish/jellyfish-grid%402x.png "Ocean Protocol Jellyfish"
## Code and Syntax Highlighting ## Code and Syntax Highlighting
Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers -- like Github's and *Markdown Here* -- support syntax highlighting. *Markdown Here* supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write the language names, see the [highlight.js demo page](http://softwaremaniacs.org/media/soft/highlight/test.html). Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers -- like Github's and *Markdown Here* -- support syntax highlighting.
``` ```
Inline `code` has `back-ticks around` it. Inline `code` has `back-ticks around` it.
@ -183,9 +176,9 @@ Inline `code` has `back-ticks around` it.
Inline `code` has `back-ticks around` it. Inline `code` has `back-ticks around` it.
Blocks of code are either fenced by lines with three back-ticks <code>```</code>, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting. Blocks of code are either fenced by lines with three back-ticks, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.
<pre lang="no-highlight"><code>```javascript <pre><code>```js
var s = "JavaScript syntax highlighting"; var s = "JavaScript syntax highlighting";
alert(s); alert(s);
``` ```
@ -223,7 +216,7 @@ Again, to see what languages are available for highlighting, and how to write th
Tables aren't part of the core Markdown spec, but they are part of GFM and *Markdown Here* supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application. Tables aren't part of the core Markdown spec, but they are part of GFM and *Markdown Here* supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application.
```no-highlight ```markdown
Colons can be used to align columns. Colons can be used to align columns.
| Tables | Are | Cool | | Tables | Are | Cool |
@ -258,7 +251,7 @@ The outer pipes (|) are optional, and you don't need to make the raw Markdown li
## Blockquotes ## Blockquotes
``` ```markdown
> Blockquotes are very handy in email to emulate reply text. > Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote. > This line is part of the same quote.
@ -356,14 +349,16 @@ This line is only separated by a single newline, so it's a separate line in the
They can't be added directly but you can add an image with a link to the video like this: They can't be added directly but you can add an image with a link to the video like this:
```html
<a href="http://www.youtube.com/watch?feature=player_embedded&v=8AkLfYOgIrE" target="_blank">
<img src="http://img.youtube.com/vi/8AkLfYOgIrE/0.jpg" alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" />
</a>
``` ```
<a href="http://www.youtube.com/watch?feature=player_embedded&v=8AkLfYOgIrE
" target="_blank"><img src="http://img.youtube.com/vi/8AkLfYOgIrE/0.jpg" <a href="http://www.youtube.com/watch?feature=player_embedded&v=8AkLfYOgIrE" target="_blank"><img src="http://img.youtube.com/vi/8AkLfYOgIrE/0.jpg" alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /></a>
alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /></a>
```
Or, in pure Markdown, but losing the image sizing and border: Or, in pure Markdown, but losing the image sizing and border:
``` ```md
[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE) [![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)
``` ```

View File

@ -4,7 +4,7 @@
- title: Setup Guides - title: Setup Guides
description: Setting up the Ocean Protocol components. description: Setting up the Ocean Protocol components.
link: /setup/keeper/ link: /setup/marketplace/
- title: Tutorials - title: Tutorials
description: Browse tutorials for most common setup and development use-cases. description: Browse tutorials for most common setup and development use-cases.

View File

@ -1,8 +1,8 @@
- group: Setup Guides - group: Setup Guides
items: items:
- title: Set Up a Keeper
link: /setup/keeper/
- title: Set Up a Marketplace - title: Set Up a Marketplace
link: /setup/marketplace/ link: /setup/marketplace/
- title: Set Up a Keeper
link: /setup/keeper/
- title: Publish Data or Services - title: Publish Data or Services
link: /setup/publisher/ link: /setup/publisher/

View File

@ -33,7 +33,7 @@ module.exports = {
{ {
resolve: 'gatsby-remark-images', resolve: 'gatsby-remark-images',
options: { options: {
maxWidth: 756, maxWidth: 640,
quality: 80, quality: 80,
withWebp: true, withWebp: true,
linkImagesToOriginal: false, linkImagesToOriginal: false,

View File

@ -8,13 +8,10 @@
} }
.headerContent { .headerContent {
max-width: $break-point--large; composes: content from './Content.module.scss';
margin-left: auto;
margin-right: auto;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0 $spacer;
} }
.headerLogo { .headerLogo {
@ -34,6 +31,7 @@
width: 60px; width: 60px;
height: 60px; height: 60px;
fill: #fff; fill: #fff;
margin: 0;
} }
.headerTitle { .headerTitle {

View File

@ -31,6 +31,8 @@
li { li {
display: block; display: block;
&:before { display: none; }
} }
} }

View File

@ -15,6 +15,8 @@
.section { .section {
margin-bottom: $spacer; margin-bottom: $spacer;
&:before { display: none; }
@media (min-width: $break-point--medium) { @media (min-width: $break-point--medium) {
flex: 0 0 30%; flex: 0 0 30%;
margin-bottom: 0; margin-bottom: 0;

View File

@ -24,11 +24,6 @@ body {
position: relative; position: relative;
margin: 0; margin: 0;
// handling long text, like URLs
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
@media screen and (min-width: $break-point--small) { @media screen and (min-width: $break-point--small) {
padding: $page-frame; padding: $page-frame;
} }
@ -56,15 +51,82 @@ a {
p { p {
margin: 0; margin: 0;
margin-bottom: $spacer / 2; margin-bottom: $spacer / $line-height;
} }
// Lists
/////////////////////////////////////
ul {
li {
&::before {
content: ' \25AA'; // Black Small Square: &#9642;
}
}
}
ol {
counter-reset: ol-counter;
li {
&::before {
content: counter(ol-counter) '.';
counter-increment: ol-counter;
font-family: $font-family-button;
}
}
ul li::before {
content: ' \25AA';
}
}
ul,
ol {
margin-top: 0;
margin-bottom: $spacer;
padding-left: $spacer / $line-height;
list-style: none;
li {
position: relative;
display: block;
&::before {
position: absolute;
left: -($spacer / $line-height);
top: -1px;
color: $brand-grey-light;
user-select: none;
}
}
}
// Inline typography
/////////////////////////////////////
b,
strong, strong,
.strong { .bold {
font-family: $font-family-button; font-family: $font-family-button;
font-weight: 600; font-weight: 600;
} }
em,
.italic {
font-style: italic;
}
abbr[title],
dfn {
text-transform: none;
font-style: normal;
font-size: inherit;
border-bottom: 1px dashed $brand-grey-light;
cursor: help;
font-feature-settings: inherit;
}
h1, h1,
h2, h2,
h3, h3,
@ -113,26 +175,94 @@ picture {
display: block; display: block;
} }
hr {
margin: $spacer * $line-height 0;
border: 0;
border-bottom: .1rem solid $brand-grey-lighter;
}
// Quotes
/////////////////////////////////////
q {
font-style: italic;
}
cite {
font-style: normal;
text-transform: uppercase;
}
blockquote,
blockquote > p {
font-style: italic;
}
blockquote {
margin: 0 0 $spacer;
padding-left: $spacer;
}
// Tables
/////////////////////////////////////
table {
width: 100%;
margin-bottom: $spacer * $line-height;
border-collapse: collapse;
th,
td {
border: 0;
margin: 0;
padding: $spacer / 2;
border-bottom: 1px solid $brand-grey-lighter;
}
th {
font-family: $font-family-button;
font-weight: 600;
text-align: left;
&[align="center"] {
text-align: center;
}
&[align="right"] {
text-align: right;
}
}
td {
}
}
// Code
/////////////////////////////////////
code, code,
kbd, kbd,
pre, pre,
samp { samp {
font-family: $font-family-monospace; font-family: $font-family-monospace;
font-size: $font-size-small; font-size: $font-size-small;
background: $brand-black !important;
color: $brand-grey-lighter !important;
border-radius: $border-radius !important;
} }
pre { pre {
display: block; display: block;
margin-bottom: $spacer !important; margin-bottom: $spacer !important;
padding: 0 !important;
// make 'em scrollable // make 'em scrollable
overflow: auto; overflow: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
max-height: 500px;
max-width: 100%;
code { code {
padding: 0; padding: $spacer;
white-space: pre; white-space: pre;
display: block; display: block;
color: inherit; color: inherit;
@ -143,3 +273,15 @@ pre {
} }
} }
// Selection
/////////////////////////////////////
::-moz-selection {
background: $brand-black;
color: #fff;
}
::selection {
background: $brand-black;
color: #fff;
}

View File

@ -23,17 +23,34 @@ export default class DocTemplate extends Component {
<Layout location={location}> <Layout location={location}>
<HeaderSection title={section} /> <HeaderSection title={section} />
<Content> <Content>
<main className={styles.wrapper}> {section ? (
{section && ( <main className={styles.wrapper}>
<aside className={styles.sidebar}> <aside className={styles.sidebar}>
<Sidebar <Sidebar
location={location} location={location}
sidebar={section} sidebar={section}
/> />
</aside> </aside>
)} <article className={styles.main}>
<header className={styles.header}>
<h1 className={styles.title}>{title}</h1>
{description && (
<p className={styles.lead}>
{description}
</p>
)}
</header>
<article className={styles.main}> <div
className={styles.docContent}
dangerouslySetInnerHTML={{
__html: post.html
}}
/>
</article>
</main>
) : (
<article className={styles.mainSingle}>
<header className={styles.header}> <header className={styles.header}>
<h1 className={styles.title}>{title}</h1> <h1 className={styles.title}>{title}</h1>
{description && ( {description && (
@ -43,10 +60,12 @@ export default class DocTemplate extends Component {
<div <div
className={styles.docContent} className={styles.docContent}
dangerouslySetInnerHTML={{ __html: post.html }} dangerouslySetInnerHTML={{
__html: post.html
}}
/> />
</article> </article>
</main> )}
</Content> </Content>
</Layout> </Layout>
) )

View File

@ -3,18 +3,24 @@
.wrapper { .wrapper {
@media (min-width: $break-point--medium) { @media (min-width: $break-point--medium) {
display: flex; display: flex;
justify-content: space-between;
} }
} }
.sidebar { .sidebar {
flex: 0 0 25%; flex: 0 0 30%;
padding-right: $spacer * 2;
+ .main { + .main {
flex: 0 0 70%; flex: 0 0 70%;
max-width: $break-point--small;
} }
} }
.mainSingle {
max-width: $break-point--small;
margin: auto;
}
.header { .header {
margin-top: $spacer; margin-top: $spacer;
margin-bottom: $spacer * $line-height; margin-bottom: $spacer * $line-height;
@ -31,10 +37,20 @@
} }
.docContent { .docContent {
// handling long text, like URLs
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
figcaption { figcaption {
font-size: $font-size-small; font-size: $font-size-small;
text-align: center; text-align: center;
color: $brand-grey-light; color: $brand-grey-light;
margin-top: $spacer / 2; margin-top: $spacer / 2;
} }
h1, h2 {
margin-top: $spacer;
margin-bottom: $spacer;
}
} }