diff --git a/_config.yml b/_config.yml index 0a68a13..20db512 100644 --- a/_config.yml +++ b/_config.yml @@ -649,13 +649,6 @@ 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: # - color: "#fc6423" - # AddThis Share. See: https://www.addthis.com # Go to https://www.addthis.com/dashboard to customize your tools. add_this_id: diff --git a/layout/_macro/post.njk b/layout/_macro/post.njk index 70b05c6..222723d 100644 --- a/layout/_macro/post.njk +++ b/layout/_macro/post.njk @@ -129,8 +129,6 @@ {%- 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 %} diff --git a/layout/_partials/post/post-footer.njk b/layout/_partials/post/post-footer.njk deleted file mode 100644 index 55e51e7..0000000 --- a/layout/_partials/post/post-footer.njk +++ /dev/null @@ -1,7 +0,0 @@ -{%- if theme.rating.enable %} -
-
-
-
-
-{%- endif %} diff --git a/layout/_third-party/index.njk b/layout/_third-party/index.njk index a6afcc8..b82ec34 100644 --- a/layout/_third-party/index.njk +++ b/layout/_third-party/index.njk @@ -1,5 +1,3 @@ -{%- include 'rating.njk' -%} - {%- if theme.algolia_search.enable %} {%- include 'search/algolia-search.njk' -%} {%- elif theme.local_search.enable %} diff --git a/layout/_third-party/rating.njk b/layout/_third-party/rating.njk deleted file mode 100644 index 87c4e36..0000000 --- a/layout/_third-party/rating.njk +++ /dev/null @@ -1,5 +0,0 @@ -{%- if theme.rating.enable %} - - {{ next_data('rating', theme.rating) }} - {{ next_js('third-party/rating.js') }} -{%- endif %} diff --git a/scripts/filters/minify.js b/scripts/filters/minify.js index 9125e55..66c2b36 100644 --- a/scripts/filters/minify.js +++ b/scripts/filters/minify.js @@ -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'); - } }); diff --git a/source/css/_common/components/post/post-widgets.styl b/source/css/_common/components/post/post-widgets.styl index eea67c8..632f0a8 100644 --- a/source/css/_common/components/post/post-widgets.styl +++ b/source/css/_common/components/post/post-widgets.styl @@ -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; diff --git a/source/js/third-party/rating.js b/source/js/third-party/rating.js deleted file mode 100644 index fc61a3a..0000000 --- a/source/js/third-party/rating.js +++ /dev/null @@ -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; - } - }); -})();