Skip to content

Commit f6616f2

Browse files
nharris-star2startmcw
authored andcommitted
Tweaks to default theme to correct grouping for html output from .yml config file.
1 parent 068005e commit f6616f2

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

src/default_theme/index._

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,15 @@
9393
</div>
9494
<div id='split-right' class='relative overflow-auto height-viewport-100'>
9595
<% docs.forEach(function(s) { %>
96-
<% if (s.kind !== 'note') { %>
97-
<%= renderSection({
98-
section: s,
99-
renderSection: renderSection,
100-
renderSectionList: renderSectionList,
101-
renderParamProperty: renderParamProperty
102-
}) %>
103-
<% } else { %>
96+
<% if (s.kind === 'note') { %>
10497
<div class='keyline-top-not py2'><%=renderNote({ note: s })%></div>
10598
<% } %>
99+
<%= renderSection({
100+
section: s,
101+
renderSection: renderSection,
102+
renderSectionList: renderSectionList,
103+
renderParamProperty: renderParamProperty
104+
}) %>
106105
<% }) %>
107106
</div>
108107
</div>

src/default_theme/note._

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
<section class='py2 clearfix'>
1+
<% if (!note.children) { %>
2+
<section class='py2 clearfix'>
23

3-
<h2 id='<%- slug(note.namespace) %>' class='mt0'>
4-
<%- note.name %>
5-
</h2>
4+
<h2 id='<%- slug(note.namespace) %>' class='mt0'>
5+
<%- note.name %>
6+
</h2>
67

7-
<% if (note.description) { %>
8-
<%= md(note.description) %>
9-
<% } %>
10-
</section>
8+
<% if (note.description) { %>
9+
<%= md(note.description) %>
10+
<% } %>
11+
</section>
12+
<% } %>

src/default_theme/section._

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@
1616
<% } %>
1717

1818
<%= md(section.description) %>
19-
20-
<div class='pre p1 fill-light mt0'><%= signature(section) %></div>
19+
2120
<% if (section.type) { %>
2221
<p>
2322
Type:
2423
<%= formatType(section.type) %>
2524
</p>
2625
<% } %>
27-
<% if (section.augments.length) { %>
26+
<% if (section.arguments && section.augments.length) { %>
2827
<p>
2928
Extends
3029
<% if (section.augments) { %>
@@ -42,7 +41,7 @@
4241
<% if (section.copyright) { %><div>Copyright: <%= md(section.copyright, true) %></div><% }%>
4342
<% if (section.since) { %><div>Since: <%- section.since %></div><% }%>
4443

45-
<% if (section.params.length) { %>
44+
<% if (section.params && section.params.length) { %>
4645
<div class='py1 quiet mt1 prose-big'>Parameters</div>
4746
<div class='prose'>
4847
<% section.params.forEach(function(param) { %>
@@ -79,7 +78,7 @@
7978
</div>
8079
<% } %>
8180

82-
<% if (section.properties.length) { %>
81+
<% if (section.properties && section.properties.length) { %>
8382
<div class='py1 quiet mt1 prose-big'>Properties</div>
8483
<div>
8584
<% section.properties.forEach(function(property) { %>
@@ -106,7 +105,7 @@
106105
</div>
107106
<% } %>
108107

109-
<% if (section.returns.length) { %>
108+
<% if (section.returns && section.returns.length) { %>
110109
<% section.returns.forEach(function(ret) { %>
111110
<div class='py1 quiet mt1 prose-big'>Returns</div>
112111
<code><%= formatType(ret.type) %></code><% if (ret.description) { %>:
@@ -115,7 +114,7 @@
115114
<% }) %>
116115
<% } %>
117116

118-
<% if (section.throws.length) { %>
117+
<% if (section.throws && section.throws.length) { %>
119118
<div class='py1 quiet mt1 prose-big'>Throws</div>
120119
<ul>
121120
<% section.throws.forEach(function(throws) { %>
@@ -124,7 +123,7 @@
124123
</ul>
125124
<% } %>
126125

127-
<% if (section.examples.length) { %>
126+
<% if (section.examples && section.examples.length) { %>
128127
<div class='py1 quiet mt1 prose-big'>Example</div>
129128
<% section.examples.forEach(function(example) { %>
130129
<% if (example.caption) { %><p><%= md(example.caption) %></p><% } %>

0 commit comments

Comments
 (0)