Remove gitter support

This commit is contained in:
Mimi 2023-07-16 01:40:20 +08:00
parent d3b76a8599
commit 223ea199f3
8 changed files with 2 additions and 30 deletions

View File

@ -893,12 +893,6 @@ tidio:
enable: false enable: false
key: # Public Key, get it from dashboard. See: https://www.tidio.com/panel/settings/developer key: # Public Key, get it from dashboard. See: https://www.tidio.com/panel/settings/developer
# Gitter is a chat and networking platform.
# For more information: https://gitter.im
gitter:
enable: false
room:
# --------------------------------------------------------------- # ---------------------------------------------------------------
# CDN Settings # CDN Settings

View File

@ -51,9 +51,9 @@
</div> </div>
{%- endif %} {%- endif %}
{%- if theme.chat.enable and (theme.chatra.enable or theme.tidio.enable or theme.gitter.enable) %} {%- if theme.chat.enable and (theme.chatra.enable or theme.tidio.enable) %}
<div class="sidebar-button animated"> <div class="sidebar-button animated">
<button{% if theme.gitter.enable %} class="js-gitter-toggle-chat-button"{% endif %}> <button>
{%- if theme.chat.icon %}<i class="{{ theme.chat.icon }}"></i>{% endif %} {%- if theme.chat.icon %}<i class="{{ theme.chat.icon }}"></i>{% endif %}
{{ __('widget.chat') }} {{ __('widget.chat') }}
</button> </button>

View File

@ -1,3 +0,0 @@
{{ next_data('gitter', theme.gitter) }}
{{ next_js('third-party/chat/gitter.js') }}
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>

View File

@ -8,8 +8,6 @@
{%- include 'chat/chatra.njk' -%} {%- include 'chat/chatra.njk' -%}
{%- elif theme.tidio.enable %} {%- elif theme.tidio.enable %}
{%- include 'chat/tidio.njk' -%} {%- include 'chat/tidio.njk' -%}
{%- elif theme.gitter.enable %}
{%- include 'chat/gitter.njk' -%}
{%- endif %} {%- endif %}
{%- include 'tags/pdf.njk' -%} {%- include 'tags/pdf.njk' -%}

View File

@ -67,10 +67,6 @@ hexo.extend.filter.register('after_generate', () => {
hexo.route.remove('js/third-party/chat/tidio.js'); hexo.route.remove('js/third-party/chat/tidio.js');
} }
if (!theme.gitter.enable) {
hexo.route.remove('js/third-party/chat/gitter.js');
}
// Comments // Comments
if (!theme.changyan.enable || !theme.changyan.appid || !theme.changyan.appkey) { if (!theme.changyan.enable || !theme.changyan.appid || !theme.changyan.appkey) {
hexo.route.remove('js/third-party/comments/changyan.js'); hexo.route.remove('js/third-party/comments/changyan.js');

View File

@ -1,7 +0,0 @@
if (hexo-config('gitter.enable')) {
.gitter-open-chat-button {
$alignment = sidebar-toggle-alignment(false);
{$alignment[0]}: auto !important;
{$alignment[1]}: 10px !important;
}
}

View File

@ -3,7 +3,6 @@
@import 'utterances'; @import 'utterances';
@import 'search'; @import 'search';
@import 'math'; @import 'math';
@import 'gitter';
.use-motion .animated { .use-motion .animated {
// Fix issue #48 #55 // Fix issue #48 #55

View File

@ -1,5 +0,0 @@
/* global CONFIG */
((window.gitter = {}).chat = {}).options = {
room: CONFIG.gitter.room
};