Skip to content

Commit 9c0adba

Browse files
targosarv
authored andcommitted
Show GitHub link for nested elements in default theme (#562)
1 parent 7ccf89d commit 9c0adba

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

default_theme/section._

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<section class='p2 mb2 clearfix bg-white minishadow'>
22

3-
<% if (typeof nested === 'undefined') { %>
3+
<% if (typeof nested === 'undefined' || (section.context && section.context.github)) { %>
44
<div class='clearfix'>
5+
<% if (typeof nested === 'undefined') { %>
56
<h3 class='fl m0' id='<%- slug(section.namespace) %>'>
67
<%- section.name %>
78
</h3>
9+
<% } %>
810
<% if (section.context && section.context.github) { %>
911
<a class='fr fill-darken0 round round pad1x quiet h5' href='<%= section.context.github %>'>
1012
<span><%= section.context.path %></span>

test/fixture/html/nested.output.files

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,12 @@
195195

196196

197197
<div class='clearfix'>
198+
198199
<h3 class='fl m0' id='klass'>
199200
Klass
200201
</h3>
201202

203+
202204
</div>
203205

204206

@@ -800,10 +802,12 @@ k.isArrayOfBuffers();</pre>
800802

801803

802804
<div class='clearfix'>
805+
803806
<h3 class='fl m0' id='bar'>
804807
bar
805808
</h3>
806809

810+
807811
</div>
808812

809813

@@ -854,10 +858,12 @@ like a <a href="#klass">klass</a></p>
854858

855859

856860
<div class='clearfix'>
861+
857862
<h3 class='fl m0' id='bar'>
858863
bar
859864
</h3>
860865

866+
861867
</div>
862868

863869

@@ -918,10 +924,12 @@ like a <a href="#klass">klass</a></p>
918924

919925

920926
<div class='clearfix'>
927+
921928
<h3 class='fl m0' id='bar'>
922929
bar
923930
</h3>
924931

932+
925933
</div>
926934

927935

@@ -972,10 +980,12 @@ like a <a href="#klass">klass</a>. This needs a <a href="https://developer.mozil
972980

973981

974982
<div class='clearfix'>
983+
975984
<h3 class='fl m0' id='foo'>
976985
Foo
977986
</h3>
978987

988+
979989
</div>
980990

981991

@@ -1067,10 +1077,12 @@ like a <a href="#klass">klass</a>. This needs a <a href="https://developer.mozil
10671077

10681078

10691079
<div class='clearfix'>
1080+
10701081
<h3 class='fl m0' id='customstreams'>
10711082
customStreams
10721083
</h3>
10731084

1085+
10741086
</div>
10751087

10761088

0 commit comments

Comments
 (0)