Skip to content

Commit

Permalink
feat: Code sample before toggle button
Browse files Browse the repository at this point in the history
  • Loading branch information
sneas committed Apr 17, 2017
1 parent 2da9a89 commit 80b51d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/cl.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@
*/
(function($) {
$('.cl-js-template-code-toggle').click(function() {
$(this).next('.cl-js-template-code-content').toggle();
$(this).parent().find('.cl-js-template-code-content').slideToggle('fast');
});
})(jQuery);
2 changes: 1 addition & 1 deletion src/assemblers/views/macro/element-tree.njk
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
<div class="cl cl-bs-html-html">
<div class="cl-bs-html-body">
<div class="cl-node-temaplate-code cl-js-template-code">
<pre class="cl-bs-html-pre cl-node-template-code-content cl-js-template-code-content"><code class="html">{{ element.path | template | highlight | safe }}</code></pre>
<button class="cl-bs-html-button cl-bs-btn cl-bs-btn-default cl-bs-btn-xs cl-js-template-code-toggle">
<i class="cl-fa cl-fa-code"></i>
</button>
<pre class="cl-bs-html-pre cl-node-template-code-content cl-js-template-code-content"><code class="html">{{ element.path | template | highlight | safe }}</code></pre>
</div>
</div>
</div>
Expand Down

0 comments on commit 80b51d8

Please sign in to comment.