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
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

View File

@ -51,9 +51,9 @@
</div>
{%- 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">
<button{% if theme.gitter.enable %} class="js-gitter-toggle-chat-button"{% endif %}>
<button>
{%- if theme.chat.icon %}<i class="{{ theme.chat.icon }}"></i>{% endif %}
{{ __('widget.chat') }}
</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' -%}
{%- elif theme.tidio.enable %}
{%- include 'chat/tidio.njk' -%}
{%- elif theme.gitter.enable %}
{%- include 'chat/gitter.njk' -%}
{%- endif %}
{%- 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');
}
if (!theme.gitter.enable) {
hexo.route.remove('js/third-party/chat/gitter.js');
}
// Comments
if (!theme.changyan.enable || !theme.changyan.appid || !theme.changyan.appkey) {
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 'search';
@import 'math';
@import 'gitter';
.use-motion .animated {
// Fix issue #48 #55

View File

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