mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-21 19:32:34 +00:00
Remove widgetpack rating
This commit is contained in:
parent
c09c78c36c
commit
179176e3ed
@ -649,13 +649,6 @@ isso: # <data_isso>
|
|||||||
# See: https://theme-next.js.org/docs/third-party-services/post-widgets
|
# See: https://theme-next.js.org/docs/third-party-services/post-widgets
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|
||||||
# Star rating support to each article.
|
|
||||||
# To get your ID visit https://widgetpack.com
|
|
||||||
rating:
|
|
||||||
enable: false
|
|
||||||
id: # <app_id>
|
|
||||||
color: "#fc6423"
|
|
||||||
|
|
||||||
# AddThis Share. See: https://www.addthis.com
|
# AddThis Share. See: https://www.addthis.com
|
||||||
# Go to https://www.addthis.com/dashboard to customize your tools.
|
# Go to https://www.addthis.com/dashboard to customize your tools.
|
||||||
add_this_id:
|
add_this_id:
|
||||||
|
|||||||
@ -129,8 +129,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{{ partial('_partials/post/post-footer.njk', {}, {cache: theme.cache.enable}) }}
|
|
||||||
|
|
||||||
{%- if theme.post_navigation and (post.prev or post.next) %}
|
{%- if theme.post_navigation and (post.prev or post.next) %}
|
||||||
{%- set prev = post.prev if theme.post_navigation === 'right' else post.next %}
|
{%- set prev = post.prev if theme.post_navigation === 'right' else post.next %}
|
||||||
{%- set next = post.next if theme.post_navigation === 'right' else post.prev %}
|
{%- set next = post.next if theme.post_navigation === 'right' else post.prev %}
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
{%- if theme.rating.enable %}
|
|
||||||
<div class="post-widgets">
|
|
||||||
<div class="wpac-rating-container">
|
|
||||||
<div id="wpac-rating"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{%- endif %}
|
|
||||||
2
layout/_third-party/index.njk
vendored
2
layout/_third-party/index.njk
vendored
@ -1,5 +1,3 @@
|
|||||||
{%- include 'rating.njk' -%}
|
|
||||||
|
|
||||||
{%- if theme.algolia_search.enable %}
|
{%- if theme.algolia_search.enable %}
|
||||||
{%- include 'search/algolia-search.njk' -%}
|
{%- include 'search/algolia-search.njk' -%}
|
||||||
{%- elif theme.local_search.enable %}
|
{%- elif theme.local_search.enable %}
|
||||||
|
|||||||
5
layout/_third-party/rating.njk
vendored
5
layout/_third-party/rating.njk
vendored
@ -1,5 +0,0 @@
|
|||||||
{%- if theme.rating.enable %}
|
|
||||||
<script src="https://embed.widgetpack.com/widget.js" async></script>
|
|
||||||
{{ next_data('rating', theme.rating) }}
|
|
||||||
{{ next_js('third-party/rating.js') }}
|
|
||||||
{%- endif %}
|
|
||||||
@ -149,8 +149,4 @@ hexo.extend.filter.register('after_generate', () => {
|
|||||||
if (!theme.quicklink.enable) {
|
if (!theme.quicklink.enable) {
|
||||||
hexo.route.remove('js/third-party/quicklink.js');
|
hexo.route.remove('js/third-party/quicklink.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!theme.rating.enable) {
|
|
||||||
hexo.route.remove('js/third-party/rating.js');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,17 +1,3 @@
|
|||||||
.post-widgets {
|
|
||||||
border-top: 1px solid $gainsboro;
|
|
||||||
margin-top: 15px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wpac-rating-container {
|
|
||||||
height: 20px;
|
|
||||||
line-height: 20px;
|
|
||||||
margin-top: 10px;
|
|
||||||
padding-top: 6px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.social-like {
|
.social-like {
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: $font-size-small;
|
font-size: $font-size-small;
|
||||||
|
|||||||
22
source/js/third-party/rating.js
vendored
22
source/js/third-party/rating.js
vendored
@ -1,22 +0,0 @@
|
|||||||
/* global CONFIG, WPac */
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
const widgets = [{
|
|
||||||
widget: 'Rating',
|
|
||||||
id : CONFIG.rating.id,
|
|
||||||
el : 'wpac-rating',
|
|
||||||
color : CONFIG.rating.color
|
|
||||||
}];
|
|
||||||
|
|
||||||
document.addEventListener('page:loaded', () => {
|
|
||||||
if (!CONFIG.page.isPost) return;
|
|
||||||
|
|
||||||
const newWidgets = widgets.map(widget => ({ ...widget }));
|
|
||||||
|
|
||||||
if (window.WPac) {
|
|
||||||
WPac.init(newWidgets);
|
|
||||||
} else {
|
|
||||||
window.wpac_init = newWidgets;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
Loading…
x
Reference in New Issue
Block a user