Skip to content

Commit 905de39

Browse files
committed
Include events in html output (fixes #88)
1 parent 6d29b8f commit 905de39

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

share/html/index.hbs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<html>
22
<head>
3+
<meta charset="utf-8" />
34
<title>{{options.name}} {{options.version}}</title>
45
<link href='assets/bass.css' type='text/css' rel='stylesheet' />
56
<link href='assets/style.css' type='text/css' rel='stylesheet' />
@@ -33,6 +34,13 @@
3334
<code>#{{name}}</code>
3435
</a>
3536
{{/each}}
37+
{{#each events}}
38+
<a
39+
href='#{{permalink}}'
40+
class='px1 regular block'>
41+
<code>ⓔ {{name}}</code>
42+
</a>
43+
{{/each}}
3644
{{/each}}
3745
</div>
3846
</div>

share/html/section.hbs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,12 @@
119119
{{/each}}
120120
{{/if}}
121121

122+
{{#if events}}
123+
{{#each events}}
124+
<div class='section-indent'>
125+
{{> section}}
126+
</div>
127+
{{/each}}
128+
{{/if}}
129+
122130
</section>

test/fixture/html/nested.input.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,10 @@ function bar() {
5454
return new Klass(1);
5555
}
5656

57+
/**
58+
* Klass event
59+
* @event event
60+
* @memberof Klass
61+
*/
62+
5763
bar();

test/fixture/html/nested.output.files

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,6 +1449,7 @@ section:target {
14491449

14501450
<html>
14511451
<head>
1452+
<meta charset="utf-8" />
14521453
<title> </title>
14531454
<link href='assets/bass.css' type='text/css' rel='stylesheet' />
14541455
<link href='assets/style.css' type='text/css' rel='stylesheet' />
@@ -1486,6 +1487,11 @@ section:target {
14861487
class='px1 regular block'>
14871488
<code>#getFoo</code>
14881489
</a>
1490+
<a
1491+
href='#klass/event'
1492+
class='px1 regular block'>
1493+
<code>ⓔ event</code>
1494+
</a>
14891495
<a
14901496
href='#bar'
14911497
class='regular block'>
@@ -1532,6 +1538,7 @@ section:target {
15321538

15331539

15341540

1541+
15351542
</section>
15361543
</div>
15371544
<div class='section-indent'>
@@ -1576,6 +1583,7 @@ section:target {
15761583

15771584

15781585

1586+
15791587
</section>
15801588
</div>
15811589
<div class='section-indent'>
@@ -1622,6 +1630,7 @@ This is a <a href="doesnot"><code>link to something that does not exist</code></
16221630

16231631

16241632

1633+
16251634
</section>
16261635
</div>
16271636

@@ -1653,6 +1662,30 @@ This is a <a href="doesnot"><code>link to something that does not exist</code></
16531662

16541663

16551664

1665+
1666+
</section>
1667+
</div>
1668+
1669+
<div class='section-indent'>
1670+
<section id='klass/event'class='mt2 mb2 py1 px2 keyline-top'>
1671+
<h3 class='regular'>
1672+
<a class='black' href='#klass/event'>
1673+
<code>
1674+
event<span class='gray'></span>
1675+
</code>
1676+
</a>
1677+
</h3>
1678+
<p>Klass event</p>
1679+
1680+
1681+
1682+
1683+
1684+
1685+
1686+
1687+
1688+
16561689
</section>
16571690
</div>
16581691

@@ -1684,6 +1717,7 @@ like a <a href="klass"><code>klass</code></a></p>
16841717

16851718

16861719

1720+
16871721
</section>
16881722

16891723
</div>

0 commit comments

Comments
 (0)