Skip to content

Commit 671c052

Browse files
authored
Merge pull request #119 from rackerlabs/SURF-812-refactor-toc-frontmatter-metadata
SURF-812: Refactor/Reorganize Docs
2 parents be08da6 + 5d0cc58 commit 671c052

File tree

46 files changed

+913
-364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+913
-364
lines changed

docs/_data/nav.json5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@
5959
path: 'elements',
6060
children: [
6161
{ label: '<hx-checkbox>', path: 'hx-checkbox' },
62+
{ label: '<hx-dd>', path: 'hx-dd' },
63+
{ label: '<hx-def>', path: 'hx-def' },
6264
{ label: '<hx-disclosure>', path: 'hx-disclosure' },
65+
{ label: '<hx-dl>', path: 'hx-dl' },
66+
{ label: '<hx-dt>', path: 'hx-dt' },
6367
{ label: '<hx-icon>', path: 'hx-icon' },
6468
{ label: '<hx-menu>', path: 'hx-menu ' },
6569
{ label: '<hx-menuitem>', path: 'hx-menuitem' },

docs/_templates/component.njk

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,22 @@
55
<h1 class="hxPageTitle">{{ page.title }}</h1>
66

77
{% block content %}
8-
{# page content goes here #}
8+
{# freeform page content goes here #}
99
{% endblock %}
10+
11+
{% if page.also %}
12+
{% include 'partials/see-also.njk' %}
13+
{% endif %}
1014
</main>
1115
<aside class="hxSiderail hxBox-md">
12-
{% include 'partials/sidebar.njk' %}
16+
<h1 class="hxContainerTitle">On this page:</h1>
17+
<nav class="article-toc">
18+
{{ page.raw | toc | safe }}
19+
{% if page.also %}
20+
<a href="#see-also">See Also</a>
21+
{% endif %}
22+
<hr />
23+
<a class="top-link" href="#top">Back to Top</a>
24+
</nav>
1325
</aside>
1426
{% endblock %}

docs/_templates/element.njk

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,58 @@
55
<h1 class="hxPageTitle">{{ page.title }}</h1>
66

77
{% block content %}
8-
{# page content goes here #}
8+
{# freeform page content goes here #}
99
{% endblock %}
10+
11+
{# ATTRIBUTES #}
12+
<section>
13+
<h2 class="hxSectionTitle" id="attributes">Attributes</h2>
14+
<p>
15+
Attributes allow you to configure an element in a
16+
declarative manner via markup.
17+
</p>
18+
{% block attributes %}
19+
<p class="hxSubdued">
20+
<small>
21+
<hx-icon type="info-circle"></hx-icon>
22+
This element does not have any configurable attributes.
23+
</small>
24+
</p>
25+
{% endblock %}
26+
</section>
27+
28+
{# PROPERTIES #}
29+
<section>
30+
<h2 class="hxSectionTitle" id="properties">Properties</h2>
31+
<p>
32+
Properties allow you to configure an element in an
33+
imperative manner via JavaScript.
34+
</p>
35+
{% block properties %}
36+
<p class="hxSubdued">
37+
<small>
38+
<hx-icon type="info-circle"></hx-icon>
39+
This element does not have any configurable properties.
40+
</small>
41+
</p>
42+
{% endblock %}
43+
</section>
44+
45+
{% if page.also %}
46+
{% include 'partials/see-also.njk' %}
47+
{% endif %}
1048
</main>
1149
<aside class="hxSiderail hxBox-md">
12-
{% include 'partials/sidebar.njk' %}
50+
<h1 class="hxContainerTitle">On this page:</h1>
51+
<nav class="article-toc">
52+
{{ page.raw | toc | safe }}
53+
<a href="#attributes">Attributes</a>
54+
<a href="#properties">Properties</a>
55+
{% if page.also %}
56+
<a href="#see-also">See Also</a>
57+
{% endif %}
58+
<hr />
59+
<a class="top-link" href="#top">Back to Top</a>
60+
</nav>
1361
</aside>
1462
{% endblock %}

docs/_templates/guide.njk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
{% block content %}
88
{# page content goes here #}
99
{% endblock %}
10+
11+
{% if page.also %}
12+
{% include 'partials/see-also.njk' %}
13+
{% endif %}
1014
</main>
1115
<aside class="hxSiderail hxBox-md">
1216
{% include 'partials/sidebar.njk' %}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<section>
2+
<h2 class="hxSectionTitle" id="see-also">See Also</h2>
3+
<ul>
4+
{% for href,label in page.also %}
5+
<li><a href="{{href}}">{{label}}</a></li>
6+
{% endfor %}
7+
</ul>
8+
</section>
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
<aside class="article-toc" role="navigation">
2-
<header class="article-toc-title">On this page:</header>
1+
<h1 class="hxContainerTitle">On this page:</h1>
2+
<nav class="article-toc">
33
{{ page.raw | toc | safe }}
4-
</aside>
4+
{% if page.also %}
5+
<a href="#see-also">See Also</a>
6+
{% endif %}
7+
<hr />
8+
<a class="top-link" href="#top">Back to Top</a>
9+
</nav>

docs/_templates/styleguide.njk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
{% block content %}
88
{# page content goes here #}
99
{% endblock %}
10+
11+
{% if page.also %}
12+
{% include 'partials/see-also.njk' %}
13+
{% endif %}
1014
</main>
1115
<aside class="hxSiderail hxBox-md">
1216
{% include 'partials/sidebar.njk' %}

docs/components/alerts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Alert
2+
title: Alerts
33
---
44
{% extends 'component.njk' %}
55
{% block content %}
Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,50 @@
11
---
2-
title: Breadcrumb
2+
title: Breadcrumbs
33
---
44
{% extends 'component.njk' %}
55
{% block content %}
66
<!-- explanation goes here -->
77

8-
<div class="demo">
9-
<nav class="hxBreadcrumb">
10-
<a href="#">Home</a>
11-
</nav>
8+
<section>
9+
<h2 class="hxSectionTitle" id="basic-breadcrumbs">Basic Breadcrumbs</h2>
10+
<div class="demo">
11+
<nav class="hxBreadcrumb">
12+
<a href="#">Home</a>
13+
</nav>
1214

13-
<nav class="hxBreadcrumb">
14-
<a href="#">Home</a>
15-
<hx-icon class="delimiter" type="angle-right"></hx-icon>
16-
<a href="#">Library</a>
17-
</nav>
15+
<nav class="hxBreadcrumb">
16+
<a href="#">Home</a>
17+
<hx-icon class="delimiter" type="angle-right"></hx-icon>
18+
<a href="#">Library</a>
19+
</nav>
1820

19-
<nav class="hxBreadcrumb">
20-
<a href="#">Home</a>
21-
<hx-icon class="delimiter" type="angle-right"></hx-icon>
22-
<a href="#">Library</a>
23-
<hx-icon class="delimiter" type="angle-right"></hx-icon>
24-
<a href="#">Current</a>
25-
</nav>
26-
</div>
21+
<nav class="hxBreadcrumb">
22+
<a href="#">Home</a>
23+
<hx-icon class="delimiter" type="angle-right"></hx-icon>
24+
<a href="#">Library</a>
25+
<hx-icon class="delimiter" type="angle-right"></hx-icon>
26+
<a href="#">Current</a>
27+
</nav>
28+
</div>
29+
{% code 'html' %}
30+
<nav class="hxBreadcrumb">
31+
<a href="#">Home</a>
32+
</nav>
2733

28-
{% code 'html' %}
29-
<nav class="hxBreadcrumb">
30-
<a href="#">Home</a>
31-
</nav>
34+
<nav class="hxBreadcrumb">
35+
<a href="#">Home</a>
36+
<hx-icon class="delimiter" type="angle-right"></hx-icon>
37+
<a href="#">Library</a>
38+
</nav>
3239

33-
<nav class="hxBreadcrumb">
34-
<a href="#">Home</a>
35-
<hx-icon class="delimiter" type="angle-right"></hx-icon>
36-
<a href="#">Library</a>
37-
</nav>
40+
<nav class="hxBreadcrumb">
41+
<a href="#">Home</a>
42+
<hx-icon class="delimiter" type="angle-right"></hx-icon>
43+
<a href="#">Library</a>
44+
<hx-icon class="delimiter" type="angle-right"></hx-icon>
45+
<a href="#">Current</a>
46+
</nav>
47+
{% endcode %}
48+
</section>
3849

39-
<nav class="hxBreadcrumb">
40-
<a href="#">Home</a>
41-
<hx-icon class="delimiter" type="angle-right"></hx-icon>
42-
<a href="#">Library</a>
43-
<hx-icon class="delimiter" type="angle-right"></hx-icon>
44-
<a href="#">Current</a>
45-
</nav>
46-
{% endcode %}
4750
{% endblock %}

docs/components/buttons/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Button
2+
title: Buttons
33
---
44
{% extends 'component.njk' %}
55
{% block content %}

0 commit comments

Comments
 (0)