Fix id conflict with markdown headerlink

This commit is contained in:
Mimi 2020-08-11 12:09:04 +08:00
parent 92bdb32a29
commit 523e39e9d6
16 changed files with 25 additions and 25 deletions

View File

@ -712,7 +712,7 @@ busuanzi_count:
total_views: true total_views: true
total_views_icon: fa fa-eye total_views_icon: fa fa-eye
post_views: true post_views: true
post_views_icon: fa fa-eye post_views_icon: far fa-eye
# --------------------------------------------------------------- # ---------------------------------------------------------------

View File

@ -100,7 +100,7 @@
{%- if theme.leancloud_visitors.enable or (theme.valine.enable and theme.valine.visitor) %} {%- 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 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"> <span class="post-meta-item-icon">
<i class="fa fa-eye"></i> <i class="far fa-eye"></i>
</span> </span>
<span class="post-meta-item-text">{{ __('post.views') + __('symbol.colon') }}</span> <span class="post-meta-item-text">{{ __('post.views') + __('symbol.colon') }}</span>
<span class="leancloud-visitors-count"></span> <span class="leancloud-visitors-count"></span>
@ -110,7 +110,7 @@
{%- if theme.firestore.enable %} {%- if theme.firestore.enable %}
<span class="post-meta-item" title="{{ __('post.views') }}"> <span class="post-meta-item" title="{{ __('post.views') }}">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="fa fa-users"></i> <i class="far fa-eye"></i>
</span> </span>
<span class="post-meta-item-text">{{ __('post.views') + __('symbol.colon') }}</span> <span class="post-meta-item-text">{{ __('post.views') + __('symbol.colon') }}</span>
<span class="firestore-visitors-count"></span> <span class="firestore-visitors-count"></span>

View File

@ -44,5 +44,5 @@
{%- endif %} {%- endif %}
</div> </div>
</aside> </aside>
<div id="sidebar-dimmer"></div> <div class="sidebar-dimmer"></div>
{% endmacro %} {% endmacro %}

View File

@ -2,7 +2,7 @@
{%- if theme.menu or theme.algolia_search.enable or theme.local_search.enable %} {%- if theme.menu or theme.algolia_search.enable or theme.local_search.enable %}
<nav class="site-nav"> <nav class="site-nav">
<ul id="menu" class="main-menu menu"> <ul class="main-menu menu">
{%- for name, path in theme.menu %} {%- for name, path in theme.menu %}
{%- set respath = path %} {%- set respath = path %}
{%- if path == '[object Object]' %} {%- if path == '[object Object]' %}

View File

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

View File

@ -1,9 +1,9 @@
<div class="reward-container"> <div class="reward-container">
<div>{{ page.reward_settings.comment }}</div> <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') }} {{ __('reward.donate') }}
</button> </button>
<div id="post-reward"> <div class="post-reward">
{%- for name, image in theme.reward %} {%- for name, image in theme.reward %}
{%- set builtin = ['wechatpay', 'alipay', 'paypal', 'bitcoin'] %} {%- set builtin = ['wechatpay', 'alipay', 'paypal', 'bitcoin'] %}

View File

@ -8,7 +8,7 @@
</span> </span>
</div> </div>
<div class="search-result-container"> <div class="search-result-container">
<div id="algolia-stats"></div> <div class="algolia-stats"></div>
<div id="algolia-hits"></div> <div class="algolia-hits"></div>
<div id="algolia-pagination"></div> <div class="algolia-pagination"></div>
</div> </div>

View File

@ -12,7 +12,7 @@
</span> </span>
</div> </div>
<div class="search-result-container"> <div class="search-result-container">
<div id="no-result"> <div class="no-result">
<i class="fa fa-spinner fa-pulse fa-5x"></i> <i class="fa fa-spinner fa-pulse fa-5x"></i>
</div> </div>
</div> </div>

View File

@ -23,5 +23,5 @@
{%- endif %} {%- endif %}
<noscript> <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> </noscript>

View File

@ -12,7 +12,7 @@ if (hexo-config('back2top.enable')) {
@import (hexo-config('back2top.sidebar') ? 'back-to-top-sidebar' : 'back-to-top'); @import (hexo-config('back2top.sidebar') ? 'back-to-top-sidebar' : 'back-to-top');
} }
#noscript-warning { .noscript-warning {
background-color: lighten($red, 20%); background-color: lighten($red, 20%);
color: #fff; color: #fff;
font-family: sans-serif; font-family: sans-serif;

View File

@ -24,7 +24,7 @@
} }
} }
#post-reward { .post-reward {
padding-top: 20px; padding-top: 20px;
display: none; display: none;

View File

@ -152,7 +152,7 @@ if (hexo-config('local_search.enable')) {
width: 100%; width: 100%;
} }
#no-result { .no-result {
color: $grey-light; color: $grey-light;
margin: auto; margin: auto;
} }

View File

@ -1,9 +1,9 @@
#sidebar-dimmer { .sidebar-dimmer {
display: none; display: none;
} }
+mobile() { +mobile() {
#sidebar-dimmer { .sidebar-dimmer {
background: black; background: black;
display: block; display: block;
height: 100%; height: 100%;

View File

@ -37,7 +37,7 @@ document.addEventListener('DOMContentLoaded', () => {
}), }),
instantsearch.widgets.stats({ instantsearch.widgets.stats({
container: '#algolia-stats', container: '.algolia-stats',
templates: { templates: {
text: data => { text: data => {
const stats = algoliaSettings.labels.hits_stats const stats = algoliaSettings.labels.hits_stats
@ -53,7 +53,7 @@ document.addEventListener('DOMContentLoaded', () => {
}), }),
instantsearch.widgets.hits({ instantsearch.widgets.hits({
container : '#algolia-hits', container : '.algolia-hits',
escapeHTML: false, escapeHTML: false,
templates : { templates : {
item: data => { item: data => {
@ -79,7 +79,7 @@ document.addEventListener('DOMContentLoaded', () => {
}), }),
instantsearch.widgets.pagination({ instantsearch.widgets.pagination({
container: '#algolia-pagination', container: '.algolia-pagination',
scrollTo : false, scrollTo : false,
showFirst: false, showFirst: false,
showLast : false, showLast : false,

View File

@ -171,9 +171,9 @@ document.addEventListener('DOMContentLoaded', () => {
resultItems = getResultItems(keywords); resultItems = getResultItems(keywords);
} }
if (keywords.length === 1 && keywords[0] === '') { 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) { } 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 { } else {
resultItems.sort((left, right) => { resultItems.sort((left, right) => {
if (left.includedCount !== right.includedCount) { if (left.includedCount !== right.includedCount) {

View File

@ -10,7 +10,7 @@ document.addEventListener('DOMContentLoaded', () => {
init : function() { init : function() {
window.addEventListener('mousedown', this.mousedownHandler); window.addEventListener('mousedown', this.mousedownHandler);
window.addEventListener('mouseup', this.mouseupHandler.bind(this)); 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)); document.querySelector('.sidebar-toggle').addEventListener('click', this.clickHandler.bind(this));
window.addEventListener('sidebar:show', this.showSidebar); window.addEventListener('sidebar:show', this.showSidebar);
window.addEventListener('sidebar:hide', this.hideSidebar); window.addEventListener('sidebar:hide', this.hideSidebar);