Remove widgetpack rating

This commit is contained in:
Mimi 2022-11-12 11:53:15 +08:00
parent c09c78c36c
commit 179176e3ed
8 changed files with 0 additions and 63 deletions

View File

@ -649,13 +649,6 @@ isso: # <data_isso>
# 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
# Go to https://www.addthis.com/dashboard to customize your tools.
add_this_id:

View File

@ -129,8 +129,6 @@
</div>
{%- endif %}
{{ partial('_partials/post/post-footer.njk', {}, {cache: theme.cache.enable}) }}
{%- if theme.post_navigation and (post.prev or 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 %}

View File

@ -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 %}

View File

@ -1,5 +1,3 @@
{%- include 'rating.njk' -%}
{%- if theme.algolia_search.enable %}
{%- include 'search/algolia-search.njk' -%}
{%- elif theme.local_search.enable %}

View File

@ -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 %}

View File

@ -149,8 +149,4 @@ hexo.extend.filter.register('after_generate', () => {
if (!theme.quicklink.enable) {
hexo.route.remove('js/third-party/quicklink.js');
}
if (!theme.rating.enable) {
hexo.route.remove('js/third-party/rating.js');
}
});

View File

@ -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 {
display: flex;
font-size: $font-size-small;

View File

@ -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;
}
});
})();