Skip to content

Commit

Permalink
Auto-Generated HTML - Formatting Updates (#10)
Browse files Browse the repository at this point in the history
* updated formatting for auto-generated HTML documentation

* minor updates per Wendell
  • Loading branch information
howieavp76 authored and anweiss committed Mar 5, 2019
1 parent 4f301ad commit 8c1bd33
Show file tree
Hide file tree
Showing 102 changed files with 650 additions and 530 deletions.
8 changes: 4 additions & 4 deletions build/metaschema/lib/metaschema-docs-jekyll-uswds.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<xsl:variable name="imported" select="/*/import[@name=current()/@acquire-from]/document(@href,$home)"/>
<xsl:variable name="definition" select="if (exists($imported)) then key('definitions',@name,$imported) else ."/>
<div class="definition define-flag" id="{@name}">
<h4 id="{$metaschema-code}_{@name}">
<h4 id="{$metaschema-code}_{@name}" class="usa-color-text usa-color-primary usa-color-text-white">
<xsl:apply-templates select="$definition/formal-name" mode="inline"/>: <xsl:apply-templates
select="@name"/> flag</h4>
<xsl:apply-templates/>
Expand All @@ -103,7 +103,7 @@
<xsl:variable name="imported" select="/*/import[@name=current()/@acquire-from]/document(@href,$home)"/>
<xsl:variable name="definition" select="if (exists($imported)) then key('definitions',@name,$imported) else ."/>
<div class="definition define-field" id="{@name}">
<h4 id="{$metaschema-code}_{@name}">
<h4 id="{$metaschema-code}_{@name}" class="usa-color-text usa-color-primary usa-color-text-white">
<xsl:apply-templates select="$definition/formal-name" mode="inline"/>: <xsl:apply-templates
select="@name"/> field</h4>
<xsl:for-each select="$definition">
Expand Down Expand Up @@ -138,7 +138,7 @@
<xsl:variable name="definition" select="if (exists($imported)) then key('definitions',@name,$imported) else ."/>

<div class="definition define-assembly" id="{@name}">
<h4 id="{$metaschema-code}_{@name}">
<h4 id="{$metaschema-code}_{@name}" class="usa-color-text usa-color-primary usa-color-text-white">
<xsl:apply-templates select="$definition/formal-name" mode="inline"/>: <xsl:apply-templates
select="@name"/> assembly</h4>
<!-- No mention of @group-as on XML side -->
Expand Down Expand Up @@ -387,7 +387,7 @@
<!--{% for prop in schema_element.properties %}-->
<tr>
<th scope="row">
<span class="usa-label">
<span>
<xsl:for-each select="(@name | @named)">
<a class="name" href="#{.}">
<xsl:value-of select="."/>
Expand Down
1 change: 1 addition & 0 deletions build/metaschema/xml/produce-and-run-documentor.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
xmlns:html="http://www.w3.org/1999/xhtml"
version="3.0">

<!-- Controls indenting -->
<xsl:output method="xhtml" omit-xml-declaration="true" indent="no"/>

<xsl:variable name="source" select="/"/>
Expand Down
4 changes: 2 additions & 2 deletions docs_jekyll_uswds/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
title: OSCAL
email: oscal@nist.gov
description: >- # this means to ignore newlines until "baseurl:"
OSCAL - a standard of standards for automating security compliance
OSCAL - more information less paper
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: howieavp76
github_username: howieavp76

collections_dir: schemas
collections_dir: content/documentation/schemas/

collections:
oscal-catalog:
Expand Down
2 changes: 1 addition & 1 deletion docs_jekyll_uswds/_includes/components/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<div class="usa-logo" id="{% if header.type == 'extended' or header.type == 'extended-mega' %}extended-mega-{% endif %}logo">
<em class="usa-logo-text">
<a href="{% if header.href %}{{ header.href }}{% else %}{{ site.baseurl }}/{% endif %}" title="Home">
{{ header.title | default: "Open Security Controls Assessment Language" }}
{{ header.title | default: "Open Security Controls Assessment Language" }} <span class="usa-label ">PREVIEW</span>
</a>
</em>
</div>
Expand Down
1 change: 1 addition & 0 deletions docs_jekyll_uswds/_sass/components/_side-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@
}
}
}

236 changes: 236 additions & 0 deletions docs_jekyll_uswds/_sass/uswds/elements/_labels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,239 @@
padding-left: 0.9rem;
padding-right: 0.9rem;
}

.usa-color-short {
height: 7rem;
margin-bottom: 1rem; }

.usa-color-name {
font-size: 1.2rem;
margin-top: 0;
margin-bottom: 1em; }
@media screen and (min-width: 600px) {
.usa-color-name {
margin: 0; } }

.usa-color-row {
margin-bottom: 3rem; }
@media screen and (min-width: 600px) {
.usa-color-row .color-big {
float: left;
padding-right: 4%;
width: 32%; } }
.usa-color-row .color-small {
float: left;
margin-right: 0;
width: 50%; }
@media screen and (min-width: 600px) {
.usa-color-row .color-small {
width: 17%; } }
.usa-color-row p {
font-family: Consolas, Monaco, "Andale Mono", monospace;
font-size: 1.5rem; }
.usa-color-row p:last-of-type {
font-size: 11px; }

.usa-primary-color-section {
margin-bottom: 0; }
@media screen and (min-width: 600px) {
.usa-primary-color-section {
margin-bottom: 8rem; } }
.usa-primary-color-section .usa-color-square {
float: left;
display: block;
margin-right: 2.35765%;
width: 48.82117%;
margin-bottom: 7rem;
padding-bottom: 50%;
position: relative; }
.usa-primary-color-section .usa-color-square:last-child {
margin-right: 0; }
@media screen and (min-width: 600px) {
.usa-primary-color-section .usa-color-square {
float: left;
display: block;
margin-right: 2.35765%;
width: 23.23176%;
margin-bottom: 0;
padding-bottom: 19%; }
.usa-primary-color-section .usa-color-square:last-child {
margin-right: 0; } }
.usa-primary-color-section .usa-mobile-end-row {
margin-right: 0; }
@media screen and (min-width: 600px) {
.usa-primary-color-section .usa-mobile-end-row {
margin-right: 2.35765%; } }
.usa-primary-color-section .usa-color-name {
margin: 0; }

.usa-color-inner-content {
position: absolute;
top: 100%; }

.usa-color-hex {
margin-top: 1rem;
margin-bottom: 0;
font-weight: 700; }

.usa-color-text {
padding: 1rem 2rem;
font-weight: 700;
margin-bottom: .4rem; }

.usa-color-outline .usa-color-text {
box-shadow: inset 0 0 0 1px #5b616b; }

.usa-color-primary {
background-color: #0071bc; }

.usa-color-primary-darker {
background-color: #205493; }

.usa-color-primary-darkest {
background-color: #112e51; }

.usa-color-base {
background-color: #212121; }

.usa-color-gray-dark {
background-color: #323a45; }

.usa-color-gray-light {
background-color: #aeb0b5; }

.usa-color-white {
background-color: #ffffff;
box-shadow: inset 0 0 0 1px #5b616b; }

.usa-color-primary-alt {
background-color: #02bfe7; }

.usa-color-primary-alt-dark {
background-color: #00a6d2; }

.usa-color-primary-alt-darkest {
background-color: #046b99; }

.usa-color-primary-alt-light {
background-color: #9bdaf1; }

.usa-color-primary-alt-lightest {
background-color: #e1f3f8; }

.usa-color-secondary {
background-color: #e31c3d; }

.usa-color-secondary-dark {
background-color: #cd2026; }

.usa-color-secondary-darkest {
background-color: #981b1e; }

.usa-color-secondary-light {
background-color: #e59393; }

.usa-color-secondary-lightest {
background-color: #f9dede; }

.usa-color-gray {
background-color: #5b616b; }

.usa-color-gray-lighter {
background-color: #d6d7d9; }

.usa-color-gray-lightest {
background-color: #f1f1f1; }

.usa-color-gray-warm-dark {
background-color: #494440; }

.usa-color-gray-warm-light {
background-color: #e4e2e0; }

.usa-color-gray-cool-light {
background-color: #dce4ef; }

.usa-color-gold {
background-color: #fdb81e; }

.usa-color-gold-light {
background-color: #f9c642; }

.usa-color-gold-lighter {
background-color: #fad980; }

.usa-color-gold-lightest {
background-color: #fff1d2; }

.usa-color-green {
background-color: #2e8540; }

.usa-color-green-light {
background-color: #4aa564; }

.usa-color-green-lighter {
background-color: #94bfa2; }

.usa-color-green-lightest {
background-color: #e7f4e4; }

.usa-color-cool-blue {
background-color: #205493; }

.usa-color-cool-blue-light {
background-color: #4773aa; }

.usa-color-cool-blue-lighter {
background-color: #8ba6ca; }

.usa-color-cool-blue-lightest {
background-color: #dce4ef; }

.usa-color-focus {
background-color: #aeb0b5; }

.usa-color-visited {
background-color: #4c2c92; }

.usa-color-text-primary-darkest {
color: #112e51; }

.usa-color-text-primary-darker {
color: #205493; }

.usa-color-text-primary {
color: #0071bc; }

.usa-color-text-cool-blue-light {
color: #4773aa; }

.usa-color-text-primary-alt-darkest {
color: #046b99; }

.usa-color-text-green {
color: #2e8540; }

.usa-color-text-visited {
color: #4c2c92; }

.usa-color-text-gray-dark {
color: #323a45; }

.usa-color-text-gray {
color: #5b616b; }

.usa-color-text-gray-warm-dark {
color: #494440; }

.usa-color-text-secondary-darkest {
color: #981b1e; }

.usa-color-text-secondary-dark {
color: #cd2026; }

.usa-color-text-secondary {
color: #e31c3d; }

.usa-color-text-white {
color: #ffffff; }
1 change: 1 addition & 0 deletions docs_jekyll_uswds/_sass/uswds/elements/_table.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
table {
border-spacing: 0;
margin: 2em 0;
width: 100%;
}

thead {
Expand Down
5 changes: 1 addition & 4 deletions docs_jekyll_uswds/_sass/uswds/uswds.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,4 @@
@import 'components/search';
@import 'components/section';
@import 'components/sidenav';
@import 'components/skipnav';
//Bootstrap ----------------//
//$font-size-base: 17px;
//@import 'bootstrap';
@import 'components/skipnav';
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: oscal-catalog schema documentation
description: oscal-catalog schema documentation
permalink: /docs/schemas/_oscal-catalog/
layout: post
schema: oscal-catalog
---
<h2 xmlns="http://www.w3.org/1999/xhtml" class="title">OSCAL Control Catalog Format: Schema Reference</h2><p xmlns="http://www.w3.org/1999/xhtml">The short name (file identifier) for this schema shall be <i>oscal-catalog</i>. It is used internally when an
identifier is called for, and may appear in file names of schema artifacts.</p><p xmlns="http://www.w3.org/1999/xhtml">The XML namespace for elements conformant to this schema:
<code>http://csrc.nist.gov/ns/oscal/1.0</code></p><div xmlns="http://www.w3.org/1999/xhtml" class="remarks">
<p class="p">The OSCAL Control Catalog format can be used to describe a collection of security controls and related sub-controls, along with a variety of control metadata. The root of the Control Catalog format is <a href="#catalog" class="name">catalog</a>.</p>
<p class="p">An XML Schema is provided for the OSCAL Catalog XML model.</p>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
layout: post
schema: oscal-catalog
---
<div xmlns="http://www.w3.org/1999/xhtml" class="definition define-field" id="addr-line"><h4 id="oscal-catalog_addr-line"><b class="formal-name">Address line</b>: <code class="name">addr-line</code> field</h4><p class="description">A single line of an address</p></div>
<div xmlns="http://www.w3.org/1999/xhtml" class="definition define-field" id="addr-line"><h4 id="oscal-catalog_addr-line" class="usa-color-text usa-color-primary usa-color-text-white"><b class="formal-name">Address line</b>: <code class="name">addr-line</code> field</h4><p class="description">A single line of an address</p></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: oscal-catalog address documentation
tagname: address
description: address element/object description | oscal-catalog schema
permalink: /docs/schemas/_oscal-catalog/oscal-catalog_address/
layout: post
schema: oscal-catalog
---
<div xmlns="http://www.w3.org/1999/xhtml" class="definition define-assembly" id="address"><h4 id="oscal-catalog_address" class="usa-color-text usa-color-primary usa-color-text-white"><b class="formal-name">Address</b>: <code class="name">address</code> assembly</h4><p class="description">A postal address</p><div class="model"><p>The <code class="name">address</code> assembly has the following contents (in order):</p><ul>
<li><a class="name" href="#addr-line"><code class="name">addr-line</code></a> fields (<i>zero or more</i>)</li>
<li><a class="name" href="#city"><code class="name">city</code></a> field (<i>zero or one</i>)</li>
<li><a class="name" href="#state"><code class="name">state</code></a> field (<i>zero or one</i>)</li>
<li><a class="name" href="#postal-code"><code class="name">postal-code</code></a> field (<i>zero or one</i>)</li>
<li><a class="name" href="#country"><code class="name">country</code></a> field (<i>zero or one</i>)</li>

</ul></div><table class="usa-table-borderless"><caption>Properties</caption><thead><tr><th scope="col">Name</th><th scope="col">Metaschema type</th><th scope="col">Cardinality</th><th scope="col">Description / Remarks</th></tr></thead><tbody><tr><th scope="row"><span><a class="name" href="#addr-line">addr-line</a></span></th><td>field</td><td> (<i>zero or more</i>)</td><td></td></tr><tr><th scope="row"><span><a class="name" href="#city">city</a></span></th><td>field</td><td> (<i>zero or one</i>)</td><td></td></tr><tr><th scope="row"><span><a class="name" href="#state">state</a></span></th><td>field</td><td> (<i>zero or one</i>)</td><td></td></tr><tr><th scope="row"><span><a class="name" href="#postal-code">postal-code</a></span></th><td>field</td><td> (<i>zero or one</i>)</td><td></td></tr><tr><th scope="row"><span><a class="name" href="#country">country</a></span></th><td>field</td><td> (<i>zero or one</i>)</td><td></td></tr></tbody></table></div>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
layout: post
schema: oscal-catalog
---
<div xmlns="http://www.w3.org/1999/xhtml" class="definition define-flag" id="algorithm"><h4 id="oscal-catalog_algorithm"><b class="formal-name">Hash algorithm</b>: <code class="name">algorithm</code> flag</h4>
<div xmlns="http://www.w3.org/1999/xhtml" class="definition define-flag" id="algorithm"><h4 id="oscal-catalog_algorithm" class="usa-color-text usa-color-primary usa-color-text-white"><b class="formal-name">Hash algorithm</b>: <code class="name">algorithm</code> flag</h4>

<p class="description">Method by which a hash is derived</p>
<div class="remarks"><p class="p">One of the following is recognized: MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, RIPEMD-160. See XML Security Algorithm Cross-Reference (W3C, April 2013) for more information.</p></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
layout: post
schema: oscal-catalog
---
<div xmlns="http://www.w3.org/1999/xhtml" class="definition define-field" id="author"><h4 id="oscal-catalog_author"><b class="formal-name">Author</b>: <code class="name">author</code> field</h4><p class="description">A named author</p><div class="remarks"><p class="p">Note this information may be duplicative of information given in a <code>party</code>
<div xmlns="http://www.w3.org/1999/xhtml" class="definition define-field" id="author"><h4 id="oscal-catalog_author" class="usa-color-text usa-color-primary usa-color-text-white"><b class="formal-name">Author</b>: <code class="name">author</code> field</h4><p class="description">A named author</p><div class="remarks"><p class="p">Note this information may be duplicative of information given in a <code>party</code>
element with appropriate <code>role-id</code> flags, along with more a more complete structured
listing. This element provides a value for display as well as an additional point of comparison.</p></div></div>
Loading

0 comments on commit 8c1bd33

Please sign in to comment.