Skip to content

Commit df96771

Browse files
committed
use hide/show labels for pod toggle
1 parent 5ae95f7 commit df96771

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

root/source.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</div>
4646
</li>
4747
<% IF module.sloc > 0 %>
48-
<li><div><button class="btn-link" onclick="togglePod()"><i class="fa fa-exchange fa-fw black"></i>Toggle pod</button></div></li>
48+
<li><div><button class="btn-link pod-toggle" onclick="togglePod()"><i class="fa fa-exchange fa-fw black"></i><span class="hide-pod">Hide</span><span class="show-pod">Show</span> Pod</button></div></li>
4949
<% END %>
5050
<li class="nav-header">Info</li>
5151
<li><% module.sloc %> lines of code</li>

root/static/js/syntaxhighlighter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,5 @@ $(function () {
159159

160160
function togglePod() {
161161
$('.syntaxhighlighter').toggleClass('pod-hidden');
162+
$('.pod-toggle').toggleClass('pod-hidden');
162163
}

root/static/less/syntaxhighlighter.less

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ pre code {
2525
content: none !important;
2626
}
2727

28-
.pod-hidden .pod-line {
28+
.pod-hidden {
29+
.pod-line {
30+
display: none;
31+
}
32+
.hide-pod {
33+
display: none;
34+
}
35+
.show-pod {
36+
display: inline;
37+
}
38+
}
39+
40+
.show-pod {
2941
display: none;
3042
}

0 commit comments

Comments
 (0)