Skip to content

Commit

Permalink
Merge branch 'stage-v5.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Harvey committed Mar 20, 2017
2 parents 9697ca8 + 5bb3c4e commit d43d70e
Show file tree
Hide file tree
Showing 77 changed files with 617 additions and 292 deletions.
14 changes: 7 additions & 7 deletions docs/_docs.tpl.jade
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ html(lang="en")
ol(class=classes.listclasses)&attributes(inner ? {} : { role: 'directory' })
each item in pages
li(class=classes.itemclasses)
a(class=classes.linkclasses href=item.url())= item.name()
a(class=classes.linkclasses href=item.url())&attributes((page.url()===item.url()) ? {'aria-current':'page'} : {})= item.name()
if item.description()
= ': ' + item.description()
if item.findAll().length && depth > 0
Expand All @@ -21,22 +21,22 @@ html(lang="en")
block
block vars
head
title= page.title() || (page.name() + ' | ' + Xmeter.DOCS.name())
title= page.title() || (page.name() + ' | ' + Docs.DOCS.name())
meta(charset="utf-8")
meta(name="description" content=Xmeter.DOCS.description())
meta(name="description" content=Docs.DOCS.description())
meta(name="viewport" content="width=device-width, initial-scale=1")
block styles
link(rel="stylesheet" href="https://cdn.rawgit.com/chharvey/bangs/v0.9.0/bangs.min.css")
link(rel="stylesheet" href="../xmeter.css")
link(rel="stylesheet" href="/xmeter.css")
link(rel="stylesheet" href="styles/docs.css")
body.docs-body
a.h-Hidden(href="#main") skip to main content
header
h1= Xmeter.DOCS.name()
p= Xmeter.DOCS.description()
h1= Docs.DOCS.name()
p= Docs.DOCS.description()
nav#sitemap
h1.h-Hidden Sitemap
+doctoc({pages: Xmeter.DOCS.findAll()})
+doctoc({pages: Docs.DOCS.findAll()})
main.docs-main#main
block main
header
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/_base.jade
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ section#forms
option option 3
input(list="b" placeholder="select it or type it")
datalist#b
// optgroup not a valid child of datalist
option option 1
//- optgroup not a valid child of datalist
option option 2
option option 3
figure(class=classname.figure)
Expand Down
63 changes: 63 additions & 0 deletions docs/_models/Docs.class.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
var Page = require('sitepage').Page

module.exports = (function () {
// CONSTRUCTOR
/**
* A set of static members used for the site.
* Similar to a utility class.
* @constructor
*/
function Docs() {}

// METHODS

// STATIC MEMBERS
/**
* The style guide site for this project.
* @type {Page}
*/
Docs.DOCS = new Page({ name: 'Xmeter Style Guide', url: '/docs/' })
.title('Xmeter Style Guide')
.description('A demo of Xmeter styles.')
.add(new Page({ name: 'Home', url: '/docs/index.html' })
.description('Xmeter Homepage')
)
.add(new Page({ name: 'Base Typography', url: '/docs/base.html' })
.description('Bare, unstyled HTML elements. No classes.')
.add(new Page({ name: 'Grouping Elements', url: '/docs/base.html#grouping-elements' })
.add(new Page({ name: 'Headings & Paragraphs', url: '/docs/base.html#headings-paragraphs' }))
.add(new Page({ name: 'Lists' , url: '/docs/base.html#lists' }))
.add(new Page({ name: 'Tables' , url: '/docs/base.html#tables' }))
)
.add(new Page({ name: 'Text-Level Elements', url: '/docs/base.html#text-level-elements' })
.add(new Page({ name: 'Links' , url: '/docs/base.html#links' }))
.add(new Page({ name: 'Stress' , url: '/docs/base.html#stress' }))
.add(new Page({ name: 'Documentation', url: '/docs/base.html#documentation' }))
.add(new Page({ name: 'Data' , url: '/docs/base.html#data' }))
)
.add(new Page({ name: 'Forms' , url: '/docs/base.html#forms' }))
.add(new Page({ name: 'Embedded Elements' , url: '/docs/base.html#embedded-elements' }))
.add(new Page({ name: 'Interactive Elements', url: '/docs/base.html#interactive-elements' }))
)
.add(new Page({ name: 'Objects', url: '/docs/obj.html' })
.description('Patterns of structure that can be reused many times for many different purposes.')
.add(new Page({ name: 'The List Object' , url: '/docs/obj.html#list-object' }))
.add(new Page({ name: 'The Flex Object' , url: '/docs/obj.html#flex-object' }))
.add(new Page({ name: 'The Grid Object' , url: '/docs/obj.html#grid-object' }))
)
.add(new Page({ name: 'Helpers', url: '/docs/help.html' })
.description('Somewhat explicit classes used for enhancing default styles.')
.add(new Page({ name: 'Block' , url: '/docs/help.html#block' }))
.add(new Page({ name: 'Inline' , url: '/docs/help.html#inline' }))
.add(new Page({ name: 'Clearfix' , url: '/docs/help.html#clearfix' }))
.add(new Page({ name: 'Hidden' , url: '/docs/help.html#hidden' }))
)
.add(new Page({ name: 'Atoms', url: '/docs/atom.html' })
.description('Very specific classes used for creating anomalies or fixing broken styles.')
.add(new Page({ name: 'margin-bottom' , url: '/docs/atom.html#margin-bottom' }))
.add(new Page({ name: 'padding-top' , url: '/docs/atom.html#padding-top' }))
.add(new Page({ name: 'font-size' , url: '/docs/atom.html#font-size' }))
)

return Docs
})()
63 changes: 0 additions & 63 deletions docs/_models/Xmeter.class.js

This file was deleted.

2 changes: 1 addition & 1 deletion docs/_models/options.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Options and locals for compiling Pug pages.
module.exports = {
Xmeter: require('./Xmeter.class.js')
Docs: require('./Docs.class.js')
}
2 changes: 1 addition & 1 deletion docs/atom.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><title>Atoms | Xmeter Style Guide</title><meta charset="utf-8"><meta name="description" content="A demo of Xmeter styles."><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="https://cdn.rawgit.com/chharvey/bangs/v0.9.0/bangs.min.css"><link rel="stylesheet" href="../xmeter.css"><link rel="stylesheet" href="styles/docs.css"></head><body class="docs-body"><a class="h-Hidden" href="#main">skip to main content</a><header><h1>Xmeter Style Guide</h1><p>A demo of Xmeter styles.</p><nav id="sitemap"><h1 class="h-Hidden">Sitemap</h1><ol role="directory"><li><a href="index.html">Home</a>: Xmeter Homepage</li><li><a href="base.html">Base Typography</a>: Bare, unstyled HTML elements. No classes.</li><li><a href="obj.html">Objects</a>: Patterns of structure that can be reused many times for many different purposes.</li><li><a href="help.html">Helpers</a>: Somewhat explicit classes used for enhancing default styles.</li><li><a href="atom.html">Atoms</a>: Very specific classes used for creating anomalies or fixing broken styles.</li></ol></nav></header><main class="docs-main" id="main"><header><h1>Atoms</h1><p>Very specific classes used for creating anomalies or fixing broken styles.</p><nav id="table-contents"><h2>Table of Contents</h2><ol role="directory"><li><a href="atom.html#margin-bottom">margin-bottom</a></li><li><a href="atom.html#padding-top">padding-top</a></li><li><a href="atom.html#font-size">font-size</a></li></ol></nav></header><section id="margin-bottom"><h2>margin-bottom <a class="docs-_fragid" href="#margin-bottom" aria-label="permalink"></a></h2><p>This atom sets the bottom margin to one <dfn>vertical rhythm unit</dfn> (1vru),
<!DOCTYPE html><html lang="en"><head><title>Atoms | Xmeter Style Guide</title><meta charset="utf-8"><meta name="description" content="A demo of Xmeter styles."><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="https://cdn.rawgit.com/chharvey/bangs/v0.9.0/bangs.min.css"><link rel="stylesheet" href="/xmeter.css"><link rel="stylesheet" href="styles/docs.css"></head><body class="docs-body"><a class="h-Hidden" href="#main">skip to main content</a><header><h1>Xmeter Style Guide</h1><p>A demo of Xmeter styles.</p><nav id="sitemap"><h1 class="h-Hidden">Sitemap</h1><ol role="directory"><li><a href="/docs/index.html">Home</a>: Xmeter Homepage</li><li><a href="/docs/base.html">Base Typography</a>: Bare, unstyled HTML elements. No classes.</li><li><a href="/docs/obj.html">Objects</a>: Patterns of structure that can be reused many times for many different purposes.</li><li><a href="/docs/help.html">Helpers</a>: Somewhat explicit classes used for enhancing default styles.</li><li><a href="/docs/atom.html" aria-current="page">Atoms</a>: Very specific classes used for creating anomalies or fixing broken styles.</li></ol></nav></header><main class="docs-main" id="main"><header><h1>Atoms</h1><p>Very specific classes used for creating anomalies or fixing broken styles.</p><nav id="table-contents"><h2>Table of Contents</h2><ol role="directory"><li><a href="/docs/atom.html#margin-bottom">margin-bottom</a></li><li><a href="/docs/atom.html#padding-top">padding-top</a></li><li><a href="/docs/atom.html#font-size">font-size</a></li></ol></nav></header><section id="margin-bottom"><h2>margin-bottom <a class="docs-_fragid" href="#margin-bottom" aria-label="permalink"></a></h2><p>This atom sets the bottom margin to one <dfn>vertical rhythm unit</dfn> (1vru),
which is equal to the <code class="docs-code">html</code> element&rsquo;s
<code class="docs-code">line-height</code> multiplied by
<code class="docs-code">1rem</code>.</p><pre class="docs-pre">.-mb-1vru { margin-bottom: var(--vru); }</pre><figure class="docs-figure"><div class="-mb-1vru">Most typographical block elements like paragraphs and lists are automatically given this style.</div><pre class="docs-pre">&lt;div class="<u>-mb-1vru</u>"&gt;Most ...&lt;/div&gt;</pre></figure></section><section id="padding-top"><h2>padding-top <a class="docs-_fragid" href="#padding-top" aria-label="permalink"></a></h2><p>This atom sets the top padding to 1<b><abbr title="vertical rhythm unit">vru</abbr></b>.</p><pre class="docs-pre">.-pt-1vru { padding-top: var(--vru); }</pre><figure class="docs-figure"><div class="-pt-1vru">Usually only Heading 1 is given this style, but it is also useful for moving an element down the page.</div><pre class="docs-pre">&lt;div class="<u>-pt-1vru</u>"&gt;Usually only ...&lt;/div&gt;</pre></figure></section><section id="font-size"><h2>font-size <a class="docs-_fragid" href="#font-size" aria-label="permalink"></a></h2><p>These are two groups of atoms. The first group simply sets the font size of an element.
Expand Down
8 changes: 4 additions & 4 deletions docs/atom.jade
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
extends _docs.tpl.jade

block append vars
- var page = Xmeter.DOCS.find('atom.html')
- var page = Docs.DOCS.find('/docs/atom.html')

block append main
+newSection(2, Xmeter.DOCS.find('atom.html#margin-bottom'))
+newSection(2, Docs.DOCS.find('/docs/atom.html#margin-bottom'))
include _includes/_atom.margin-bottom.jade
+newSection(2, Xmeter.DOCS.find('atom.html#padding-top'))
+newSection(2, Docs.DOCS.find('/docs/atom.html#padding-top'))
include _includes/_atom.padding-top.jade
+newSection(2, Xmeter.DOCS.find('atom.html#font-size'))
+newSection(2, Docs.DOCS.find('/docs/atom.html#font-size'))
include _includes/_atom.font-size.jade
Loading

1 comment on commit d43d70e

@chharvey
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.