Skip to content

Commit

Permalink
merge(#437): merge Halyul/feat/auto-tag-category into canary
Browse files Browse the repository at this point in the history
feat: auto detect tags categories toc, fix: burger error
  • Loading branch information
neoFelhz authored Jul 24, 2017
2 parents 9ab4ea2 + c59b852 commit d62d09a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion layout/_partial/Paradox-post-info.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<% } %>

<!-- Tags (bookmark) -->
<% if(page.notag !== true) { %>
<% if (page.tags && page.tags.length) { %>
<button id="article-functions-viewtags-button" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon">
<i class="material-icons" role="presentation">bookmark</i>
<span class="visuallyhidden">bookmark</span>
Expand Down
18 changes: 10 additions & 8 deletions layout/_partial/Paradox-post_entry.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@
</div>
</div>
<div id="post_entry-right-info">
<!-- Category -->
<span class="post_entry-category">
<%- list_categories(post.categories, {
show_count: false,
class: 'post_category',
style: 'none'
}) %>
</span>
<% if (post.categories && post.categories.length) { %>
<!-- Category -->
<span class="post_entry-category">
<%- list_categories(post.categories, {
show_count: false,
class: 'post_category',
style: 'none'
}) %>
</span>
<% } %>

<% if(theme.comment.use === 'duoshuo') { %>
<!-- Comment Number -->
Expand Down
4 changes: 4 additions & 0 deletions layout/_partial/toc_button.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,9 @@
}) %>
</ul>
<% } %>
<!-- post toc -->
<script type="text/ls-javascript" id="post-toc-script">
(function(){if(document.querySelector('ol.post-toc')===null){document.querySelector('button#post-toc-trigger-btn').style.display='none'}})();
</script>
<% } %>
5 changes: 4 additions & 1 deletion source/js/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,10 @@ $(document).ready(function() {

'use strict';

document.querySelector('.MD-burger-icon').addEventListener(
var burger = document.querySelector('.MD-burger-icon');

if (burger !== null)
burger.addEventListener(
'click',
function() {
var child;
Expand Down
2 changes: 1 addition & 1 deletion source/js/js.min.js

Large diffs are not rendered by default.

0 comments on commit d62d09a

Please sign in to comment.