Skip to content

Commit

Permalink
Fix id conflict with markdown headerlink
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Aug 11, 2020
1 parent 92bdb32 commit 523e39e
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ busuanzi_count:
total_views: true
total_views_icon: fa fa-eye
post_views: true
post_views_icon: fa fa-eye
post_views_icon: far fa-eye


# ---------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions layout/_macro/post.njk
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
{%- if theme.leancloud_visitors.enable or (theme.valine.enable and theme.valine.visitor) %}
<span id="{{ url_for(post.path) }}" class="post-meta-item leancloud_visitors" data-flag-title="{{ post.title }}" title="{{ __('post.views') }}">
<span class="post-meta-item-icon">
<i class="fa fa-eye"></i>
<i class="far fa-eye"></i>
</span>
<span class="post-meta-item-text">{{ __('post.views') + __('symbol.colon') }}</span>
<span class="leancloud-visitors-count"></span>
Expand All @@ -110,7 +110,7 @@
{%- if theme.firestore.enable %}
<span class="post-meta-item" title="{{ __('post.views') }}">
<span class="post-meta-item-icon">
<i class="fa fa-users"></i>
<i class="far fa-eye"></i>
</span>
<span class="post-meta-item-text">{{ __('post.views') + __('symbol.colon') }}</span>
<span class="firestore-visitors-count"></span>
Expand Down
2 changes: 1 addition & 1 deletion layout/_macro/sidebar.njk
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@
{%- endif %}
</div>
</aside>
<div id="sidebar-dimmer"></div>
<div class="sidebar-dimmer"></div>
{% endmacro %}
2 changes: 1 addition & 1 deletion layout/_partials/header/menu.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{%- if theme.menu or theme.algolia_search.enable or theme.local_search.enable %}
<nav class="site-nav">
<ul id="menu" class="main-menu menu">
<ul class="main-menu menu">
{%- for name, path in theme.menu %}
{%- set respath = path %}
{%- if path == '[object Object]' %}
Expand Down
4 changes: 2 additions & 2 deletions layout/_partials/header/sub-menu.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{%- if currentParentUrl == value.default.split('||')[0] | trim | replace('/', '') %}

{# Submenu items #}
<ul id="sub-menu" class="sub-menu menu">
<ul class="sub-menu menu">
{%- for subname, subvalue in value %}
{# For main submenu items #}
{%- if subvalue != '[object Object]' %}
Expand Down Expand Up @@ -54,7 +54,7 @@
{%- if paths[1] == subvalue.default.split('||')[0] | trim | replace('/', '') %}

{# Submenu-2 items #}
<ul id="sub-menu-2" class="sub-menu menu">
<ul class="sub-menu menu">
{%- for subname2, subvalue2 in subvalue %}
{%- set respath2 = subvalue %}
{%- set itemName = subname2 | lower %}
Expand Down
4 changes: 2 additions & 2 deletions layout/_partials/post/post-reward.njk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="reward-container">
<div>{{ page.reward_settings.comment }}</div>
<button onclick="document.getElementById('post-reward').classList.toggle('active');">
<button onclick="document.querySelector('.post-reward').classList.toggle('active');">
{{ __('reward.donate') }}
</button>
<div id="post-reward">
<div class="post-reward">

{%- for name, image in theme.reward %}
{%- set builtin = ['wechatpay', 'alipay', 'paypal', 'bitcoin'] %}
Expand Down
6 changes: 3 additions & 3 deletions layout/_partials/search/algolia-search.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</span>
</div>
<div class="search-result-container">
<div id="algolia-stats"></div>
<div id="algolia-hits"></div>
<div id="algolia-pagination"></div>
<div class="algolia-stats"></div>
<div class="algolia-hits"></div>
<div class="algolia-pagination"></div>
</div>
2 changes: 1 addition & 1 deletion layout/_partials/search/localsearch.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</span>
</div>
<div class="search-result-container">
<div id="no-result">
<div class="no-result">
<i class="fa fa-spinner fa-pulse fa-5x"></i>
</div>
</div>
2 changes: 1 addition & 1 deletion layout/_partials/widgets.njk
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
{%- endif %}

<noscript>
<div id="noscript-warning">Theme NexT works best with JavaScript enabled</div>
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>
2 changes: 1 addition & 1 deletion source/css/_common/components/components.styl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (hexo-config('back2top.enable')) {
@import (hexo-config('back2top.sidebar') ? 'back-to-top-sidebar' : 'back-to-top');
}

#noscript-warning {
.noscript-warning {
background-color: lighten($red, 20%);
color: #fff;
font-family: sans-serif;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/post/post-reward.styl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
}

#post-reward {
.post-reward {
padding-top: 20px;
display: none;

Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/third-party/search.styl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ if (hexo-config('local_search.enable')) {
width: 100%;
}

#no-result {
.no-result {
color: $grey-light;
margin: auto;
}
Expand Down
4 changes: 2 additions & 2 deletions source/css/_common/outline/sidebar/sidebar-dimmer.styl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#sidebar-dimmer {
.sidebar-dimmer {
display: none;
}

+mobile() {
#sidebar-dimmer {
.sidebar-dimmer {
background: black;
display: block;
height: 100%;
Expand Down
6 changes: 3 additions & 3 deletions source/js/algolia-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ document.addEventListener('DOMContentLoaded', () => {
}),

instantsearch.widgets.stats({
container: '#algolia-stats',
container: '.algolia-stats',
templates: {
text: data => {
const stats = algoliaSettings.labels.hits_stats
Expand All @@ -53,7 +53,7 @@ document.addEventListener('DOMContentLoaded', () => {
}),

instantsearch.widgets.hits({
container : '#algolia-hits',
container : '.algolia-hits',
escapeHTML: false,
templates : {
item: data => {
Expand All @@ -79,7 +79,7 @@ document.addEventListener('DOMContentLoaded', () => {
}),

instantsearch.widgets.pagination({
container: '#algolia-pagination',
container: '.algolia-pagination',
scrollTo : false,
showFirst: false,
showLast : false,
Expand Down
4 changes: 2 additions & 2 deletions source/js/local-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ document.addEventListener('DOMContentLoaded', () => {
resultItems = getResultItems(keywords);
}
if (keywords.length === 1 && keywords[0] === '') {
resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x"></i></div>';
resultContent.innerHTML = '<div class="no-result"><i class="fa fa-search fa-5x"></i></div>';
} else if (resultItems.length === 0) {
resultContent.innerHTML = '<div id="no-result"><i class="far fa-frown fa-5x"></i></div>';
resultContent.innerHTML = '<div class="no-result"><i class="far fa-frown fa-5x"></i></div>';
} else {
resultItems.sort((left, right) => {
if (left.includedCount !== right.includedCount) {
Expand Down
2 changes: 1 addition & 1 deletion source/js/schemes/muse.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ document.addEventListener('DOMContentLoaded', () => {
init : function() {
window.addEventListener('mousedown', this.mousedownHandler);
window.addEventListener('mouseup', this.mouseupHandler.bind(this));
document.querySelector('#sidebar-dimmer').addEventListener('click', this.clickHandler.bind(this));
document.querySelector('.sidebar-dimmer').addEventListener('click', this.clickHandler.bind(this));
document.querySelector('.sidebar-toggle').addEventListener('click', this.clickHandler.bind(this));
window.addEventListener('sidebar:show', this.showSidebar);
window.addEventListener('sidebar:hide', this.hideSidebar);
Expand Down

1 comment on commit 523e39e

@stevenjoezhang
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.