Skip to content

Commit 9ea4e55

Browse files
authored
Merge pull request #263 from buildit/feature/next/article
Feature/next/article
2 parents 9915127 + b35257b commit 9ea4e55

File tree

17 files changed

+220
-10
lines changed

17 files changed

+220
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"copy": "<p>This is intended as a quick reference and showcase. For more complete info, see <a href=\"http://daringfireball.net/projects/markdown/\">John Gruber's\n original spec</a> and the <a href=\"http://github.github.com/github-flavored-markdown/\">Github-flavored Markdown info page</a>.</p>\n<h5>Table of Contents</h5>\n<p><a href=\"#headers\">Headers</a><br>\n <a href=\"#emphasis\">Emphasis</a><br>\n <a href=\"#lists\">Lists</a><br>\n <a href=\"#links\">Links</a><br>\n <a href=\"#images\">Images</a><br>\n <a href=\"#code\">Code and Syntax Highlighting</a><br>\n <a href=\"#tables\">Tables</a><br>\n <a href=\"#blockquotes\">Blockquotes</a><br>\n <a href=\"#html\">Inline HTML</a><br>\n <a href=\"#hr\">Horizontal Rule</a><br>\n <a href=\"#lines\">Line Breaks</a><br>\n <a href=\"#videos\">Youtube videos</a></p>\n<a name=\"headers\"> ## Headers\n <pre><code class=\"language-no-highlight\"># H1\n## H2\n### H3\n#### H4\n##### H5\n###### H6\n\nAlternatively, for H1 and H2, an underline-ish style:\n\nAlt-H1\n======\n\nAlt-H2\n------\n</code></pre>\n <h1>H1</h1>\n <h2>H2</h2>\n <h3>H3</h3>\n <h4>H4</h4>\n <h5>H5</h5>\n <h6>H6</h6>\n <p>Alternatively, for H1 and H2, an underline-ish style:</p>\n <h1>Alt-H1</h1>\n <h2>Alt-H2</h2>\n</a><a name=\"emphasis\"> ## Emphasis\n <pre><code class=\"language-no-highlight\">Emphasis, aka italics, with *asterisks* or _underscores_.\n\nStrong emphasis, aka bold, with **asterisks** or __underscores__.\n\nCombined emphasis with **asterisks and _underscores_**.\n\nStrikethrough uses two tildes. ~~Scratch this.~~\n</code></pre>\n <p>Emphasis, aka italics, with <em>asterisks</em> or <em>underscores</em>.</p>\n <p>Strong emphasis, aka bold, with <strong>asterisks</strong> or <strong>underscores</strong>.</p>\n <p>Combined emphasis with <strong>asterisks and <em>underscores</em></strong>.</p>\n <p>Strikethrough uses two tildes. <s>Scratch this.</s></p>\n</a><a name=\"lists\"> ## Lists\n <pre><code class=\"language-no-highlight\">1. First ordered list item\n2. Another item\n * Unordered sub-list.\n1. Actual numbers don't matter, just that it's a number\n 1. Ordered sub-list\n4. And another item.\n\n Some text that should be aligned with the above item.\n\n* Unordered list can use asterisks\n- Or minuses\n+ Or pluses\n</code></pre>\n <ol>\n <li>First ordered list item</li>\n <li>Another item</li>\n </ol>\n <ul>\n <li>Unordered sub-list.</li>\n </ul>\n <ol>\n <li>\n <p>Actual numbers don't matter, just that it's a number</p>\n </li>\n <li>\n <p>Ordered sub-list</p>\n </li>\n <li>\n <p>And another item.</p>\n <p>Some text that should be aligned with the above item.</p>\n </li>\n </ol>\n <ul>\n <li>Unordered list can use asterisks</li>\n </ul>\n <ul>\n <li>Or minuses</li>\n </ul>\n <ul>\n <li>Or pluses</li>\n </ul>\n</a><a name=\"links\"> ## Links <p>There are two ways to create links.</p>\n <pre><code class=\"language-no-highlight\">[I'm an inline-style link](https://www.google.com)\n\n[I'm a reference-style link][Arbitrary case-insensitive reference text]\n\n[You can use numbers for reference-style link definitions][1]\n\nOr leave it empty and use the [link text itself][]\n\nSome text to show that the reference links can follow later.\n\n[arbitrary case-insensitive reference text]: https://www.mozilla.org\n[1]: http://slashdot.org\n[link text itself]: http://www.reddit.com\n</code></pre>\n</a><p><a name=\"links\"></a><a href=\"https://www.google.com\">I'm an inline-style link</a></p>\n<p><a href=\"https://www.mozilla.org\">I'm a reference-style link</a></p>\n<p><a href=\"http://slashdot.org\">You can use numbers for reference-style link definitions</a></p>\n<p>Or leave it empty and use the <a href=\"http://www.reddit.com\">link text itself</a></p>\n<p>Some text to show that the reference links can follow later.</p>\n<a name=\"images\"> ## Images\n <pre><code class=\"language-no-highlight\">Here's an image (hover to see the title text):\n\nInline-style:\n![alt text](https://placeimg.com/48/48/any \"Image Title Text 1\")\n\nReference-style:\n![alt text][logo]\n\n[logo]: https://placeimg.com/48/48/any \"Image Title Text 2\"\n</code></pre>\n <p>Here's our logo (hover to see the title text):</p>\n <p>Inline-style: <img src=\"https://placeimg.com/320/180/any\" alt=\"alt text\" title=\"Image Title Text 1\"></p>\n <p>Reference-style: <img src=\"https://placeimg.com/320/180/any\" alt=\"alt text\" title=\"Image Title Text 2\"></p>\n</a><a name=\"code\"> ## Code and Syntax Highlighting </a><p><a name=\"code\">Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers --\n like Github's and <em>Markdown Here</em> -- support syntax highlighting. <em>Markdown Here</em> supports highlighting for dozens of languages (and\n not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write the language names, see the </a><a href=\"http://softwaremaniacs.org/media/soft/highlight/test.html\">highlight.js\n demo page</a>.</p>\n<pre><code class=\"language-no-highlight\">Inline `code` has `back-ticks around` it.\n</code></pre>\n<p>Inline <code>code</code> has <code>back-ticks around</code> it.</p>\n<p>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\n code blocks -- they're easier and only they support syntax highlighting.</p>\n<pre><code class=\"language-no-highlight\"> ```javascript\n var s = \"JavaScript syntax highlighting\";\n alert(s);\n</code></pre>\n<pre><code class=\"language-python\">s = \"Python syntax highlighting\"\nprint s\n</code></pre>\n<pre><code>No language indicated, so no syntax highlighting.\nBut let's throw in a &lt;b&gt;tag&lt;/b&gt;.\n</code></pre>\n<pre><code>\n```javascript\nvar s = \"JavaScript syntax highlighting\";\nalert(s);\n</code></pre>\n<pre><code class=\"language-python\">s = \"Python syntax highlighting\"\nprint s\n</code></pre>\n<pre><code>No language indicated, so no syntax highlighting in Markdown Here (varies on Github).\nBut let's throw in a &lt;b&gt;tag&lt;/b&gt;.\n</code></pre>\n<p>Again, to see what languages are available for highlighting, and how to write those language names, see the <a href=\"http://softwaremaniacs.org/media/soft/highlight/test.html\">highlight.js\n demo page</a>.</p>\n<a name=\"tables\"> ## Tables <p>Tables aren't part of the core Markdown spec, but they are part of GFM and <em>Markdown Here</em> supports them. They are\n an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application.</p>\n <pre><code class=\"language-no-highlight\">Colons can be used to align columns.\n\n| Tables | Are | Cool |\n| ------------- |:-------------:| -----:|\n| col 3 is | right-aligned | $1600 |\n| col 2 is | centered | $12 |\n| zebra stripes | are neat | $1 |\n\nThe outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.\n\nMarkdown | Less | Pretty\n--- | --- | ---\n*Still* | `renders` | **nicely**\n1 | 2 | 3\n</code></pre>\n <p>Colons can be used to align columns.</p>\n <table>\n <thead>\n <tr>\n <th>Tables</th>\n <th style=\"text-align:center\">Are</th>\n <th style=\"text-align:right\">Cool</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>col 3 is</td>\n <td style=\"text-align:center\">right-aligned</td>\n <td style=\"text-align:right\">$1600</td>\n </tr>\n <tr>\n <td>col 2 is</td>\n <td style=\"text-align:center\">centered</td>\n <td style=\"text-align:right\">$12</td>\n </tr>\n <tr>\n <td>zebra stripes</td>\n <td style=\"text-align:center\">are neat</td>\n <td style=\"text-align:right\">$1</td>\n </tr>\n </tbody>\n </table>\n <p>The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.</p>\n <table>\n <thead>\n <tr>\n <th>Markdown</th>\n <th>Less</th>\n <th>Pretty</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><em>Still</em></td>\n <td><code>renders</code></td>\n <td><strong>nicely</strong></td>\n </tr>\n <tr>\n <td>1</td>\n <td>2</td>\n <td>3</td>\n </tr>\n </tbody>\n </table>\n</a><a name=\"blockquotes\"> ## Blockquotes\n <pre><code class=\"language-no-highlight\">&gt; Blockquotes are very handy in email to emulate reply text.\n&gt; This line is part of the same quote.\n\nQuote break.\n\n&gt; This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.\n</code></pre>\n <blockquote>\n <p>Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.</p>\n </blockquote>\n <p>Quote break.</p>\n <blockquote>\n <p>This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap\n for everyone. Oh, you can <em>put</em> <strong>Markdown</strong> into a blockquote.</p>\n </blockquote>\n</a><a name=\"html\"> ## Inline HTML <p>You can also use raw HTML in your Markdown, and it'll mostly work pretty well.</p>\n <pre><code class=\"language-no-highlight\">&lt;dl&gt;\n &lt;dt&gt;Definition list&lt;/dt&gt;\n &lt;dd&gt;Is something people use sometimes.&lt;/dd&gt;\n\n &lt;dt&gt;Markdown in HTML&lt;/dt&gt;\n &lt;dd&gt;Does *not* work **very** well. Use HTML &lt;em&gt;tags&lt;/em&gt;.&lt;/dd&gt;\n&lt;/dl&gt;\n</code></pre>\n <dl>\n <dt>Definition list</dt>\n <dd>Is something people use sometimes.</dd>\n <dt>Markdown in HTML</dt>\n <dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>\n </dl>\n</a><a name=\"hr\"> ## Horizontal Rule\n <pre><code>Three or more...\n\n---\n\nHyphens\n\n***\n\nAsterisks\n\n___\n\nUnderscores\n</code></pre>\n <p>Three or more...</p>\n <hr>\n <p>Hyphens</p>\n <hr>\n <p>Asterisks</p>\n <hr>\n <p>Underscores</p>\n</a><a name=\"lines\"> ## Line Breaks <p>My basic recommendation for learning how line breaks work is to experiment and discover -- hit &lt;Enter&gt; once\n (i.e., insert one newline), then hit it twice (i.e., insert two newlines), see what happens. You'll soon learn to get what you want. \"Markdown\n Toggle\" is your friend.</p>\n <p>Here are some things to try out:</p>\n <pre><code>Here's a line for us to start with.\n\nThis line is separated from the one above by two newlines, so it will be a *separate paragraph*.\n\nThis line is also a separate paragraph, but...\nThis line is only separated by a single newline, so it's a separate line in the *same paragraph*.\n</code></pre>\n <p>Here's a line for us to start with.</p>\n <p>This line is separated from the one above by two newlines, so it will be a <em>separate paragraph</em>.</p>\n <p>This line is also begins a separate paragraph, but...<br> This line is only separated by a single newline, so it's a separate line in the <em>same\n paragraph</em>.</p>\n <p>(Technical note: <em>Markdown Here</em> uses GFM line breaks, so there's no need to use MD's two-space line breaks.)</p>\n</a><a name=\"videos\"> ## Youtube videos <p>They can't be added directly but you can add an image with a link to the video like this:</p>\n <pre><code class=\"language-no-highlight\">&lt;a href=\"http://www.youtube.com/watch?feature=player_embedded&amp;v=YOUTUBE_VIDEO_ID_HERE\n\" target=\"_blank\"&gt;&lt;img src=\"http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg\"\nalt=\"IMAGE ALT TEXT HERE\" width=\"240\" height=\"180\" border=\"10\" /&gt;&lt;/a&gt;\n</code></pre>\n <p>Or, in pure Markdown, but losing the image sizing and border:</p>\n <pre><code class=\"language-no-highlight\">[![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)\n</code></pre>\n</a>"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Purpose
2+
3+
Provides some extra padding to make copy more showy.
4+
5+
Adds even more padding on the left except on smaller screen sizes, but always pads both sides at least a little bit.
6+
7+
This component should contain other molecules but may not work well containing other components.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="grav-c-ostentatious-copy">
2+
{{ copy | safe }}
3+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"title": "This is a super crypto-article",
3+
"img": {
4+
"src": "../../images/img-random-1.png",
5+
"alt": "Brief description of this fascinating image"
6+
},
7+
"dateTime": {
8+
"human": "1st January, 2019",
9+
"machine": "Tue Jan 01 2019 12:00:00 GMT+0000 (Greenwich Mean Time)"
10+
},
11+
"description": "It was few anti-money laundering behind many zero knowledge proof, for Ethereum thought few flippening in many node! Although SHA 256 cost lots of amazing soft fork behind few double spend, Satoshi Nakamoto specialises in some!"
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Purpose
2+
3+
This is the component for use as the page heading.
4+
5+
It consists of a `<h1>` as the page title, a `<p>` for a short description of the page, an optional `<time>` to display a date related to this content (usually publication date), and an optional `<img>` which will automatically gain a downward pointing notch.
6+
7+
The class should be added to a `<div>` or a `<header>` element as appropriate. The `<header>` element should be used when semantically correct to do so; such as within another sectioning element like `<article>`.
8+
For reference, the sectioning elements are `<body>`, `<section>`, `<article>`, `<aside>`, and `<nav>`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{%- from 'atoms-image' import image -%}
2+
3+
{%- macro pageIntro(title, description, dateTime, img) -%}
4+
<div class="grav-c-page-intro">
5+
{{ pageIntroContents(title, description, dateTime, img) | safe }}
6+
</div>
7+
{%- endmacro -%}
8+
9+
{%- macro pageIntroContents(title, description, dateTime, img) -%}
10+
<h1>{{ title }}</h1>
11+
<p>{{ description }}</p>
12+
{% if dateTime %}
13+
<time datetime="{{dateTime.machine}}">{{dateTime.human}}</time>
14+
{% endif %}
15+
{% if img %}
16+
{{ image(img.src, img.alt, img.class) | safe }}
17+
{% endif %}
18+
{%- endmacro -%}
19+
20+
{{ pageIntro(title, description, dateTime, img) | safe }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"article": {
3+
"copy": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p><ul><li>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. \u2028</li><li>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \u2028</li><li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \u2028</li><li>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. uptate velit esse cillum dolore eu fugiat nulla pariatur. </li></ul><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia.</p><blockquote><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p></blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><blockquote><p>The quick brown fox jumps over the lazy dog.</p><cite>- Joe Bloggs</cite></blockquote><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>",
4+
"title": "Better Together",
5+
"img": {
6+
"src": "../../images/buildit-roundtable-purple.jpg",
7+
"alt": "Brief description of this fascinating image"
8+
},
9+
"dateTime": {
10+
"human": "1st January, 2019",
11+
"machine": "Tue Jan 01 2019 12:00:00 GMT+0000 (Greenwich Mean Time)"
12+
},
13+
"description": "It was few anti-money laundering behind many zero knowledge proof, for Ethereum thought few flippening in many node! Although SHA 256 cost lots of amazing soft fork behind few double spend, Satoshi Nakamoto specialises in some!"
14+
},
15+
"footer": {
16+
"class": "grav-u-color-scheme-contrast"
17+
},
18+
"relatedItems": [
19+
{
20+
"title": "Next Story",
21+
"text": "Everything We Do is Driven By You",
22+
"link": "#"
23+
}
24+
]
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{%- from 'organisms-page-intro' import pageIntroContents -%}
2+
3+
{%- extends 'templates-basic-page' -%}
4+
5+
{%- block pageContent %}
6+
<main>
7+
<article class="grav-o-container grav-c-article">
8+
<header class="grav-c-page-intro">
9+
{{ pageIntroContents(article.title, article.description, article.dateTime, article.img) | safe }}
10+
</header>
11+
<div class="grav-c-ostentatious-copy">
12+
{{ article.copy | safe }}
13+
</div>
14+
</article>
15+
<hr />
16+
<aside class="grav-o-container">
17+
{% include 'organisms-related-items' %}
18+
</aside>
19+
</main>
20+
{%- endblock -%}
Loading

packages/gravity-ui-web/src/sass/00-settings/_spacing.scss

+8-2
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,17 @@ $grav-sp-inset-squished-s: $grav-sp-s $grav-sp-m;
4545
$grav-sp-inset-squished-m: $grav-sp-m $grav-sp-l;
4646
$grav-sp-inset-squished-l: $grav-sp-l $grav-sp-xl;
4747

48-
4948
// Outer margin between page content and viewport edge on narrow viewports
5049
$grav-sp-page-content-inset: $grav-sp-m;
5150

51+
// Multiplier for ostentatious copy on medium and above viewports
52+
$grav-sp-ostentatious-padding-left-multiplier: 8;
53+
5254
// Standard vertical gap between successive block elements
5355
// Note that is expressed as an `em` value, so it will scale according to the
5456
// `font-size` of the block elements it affects.
55-
$grav-sp-vertical-gap: 1em;
57+
$grav-sp-vertical-gap: 1.5em;
58+
// Larger vertical gap for use on specific block elements
59+
// Note that is expressed as an `em` value, so it will scale according to the
60+
// `font-size` of the block elements it affects.
61+
$grav-sp-vertical-gap-l: 2.5em;
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
@mixin grav-decoration-notch-in() {
2-
clip-path: polygon(0% 0%, 0% 100%, 2rem 100%, 3rem calc(100% - 1rem), 4rem 100%, 100% 100%, 100% 0%);
1+
@mixin grav-decoration-notch-in($size: 1rem, $inset: 2rem) {
2+
clip-path: polygon(0% 0%, 0% 100%, $inset 100%, calc(#{$inset} + #{$size}) calc(100% - #{$size}), calc(#{$inset} + #{$size} * 2) 100%, 100% 100%, 100% 0%);
33
}
44

5-
@mixin grav-decoration-notch-out() {
6-
clip-path: polygon(0% 0%, 0% calc(100% - 1rem), 2rem calc(100% - 1rem), 3rem 100%, 4rem calc(100% - 1rem), 100% calc(100% - 1rem), 100% 0%);
5+
@mixin grav-decoration-notch-out($size: 1rem, $inset: 2rem) {
6+
clip-path: polygon(0% 0%, 0% calc(100% - #{$size}), $inset calc(100% - #{$size}), calc(#{$inset} + #{$size}) 100%, calc(#{$inset} + #{$size} * 2) calc(100% - #{$size}), 100% calc(100% - #{$size}), 100% 0%);
77
}

0 commit comments

Comments
 (0)