💄 Add gitter chat room page.

This commit is contained in:
凡梦星尘 2022-06-16 10:00:36 +08:00
parent 2fed079938
commit 2294f936e4
4 changed files with 17 additions and 5 deletions

View File

@ -1,7 +1,7 @@
@if $gitter_enable {
.gitter-open-chat-button {
$alignment : sidebar-toggle-alignment(false);
#{$alignment[0]}: auto !important;
#{$alignment[1]}: 10px !important;
$alignment: sidebar-toggle-alignment(false);
#{nth($alignment, 1)}: auto !important;
#{nth($alignment, 2)}: 10px !important;
}
}

View File

@ -12,6 +12,8 @@ paginate: 8
enableEmoji: true
relativeurls: true
# Make markdown content support HTML syntax
markup:
goldmark:
@ -938,8 +940,8 @@ params:
# Gitter Support
# For more information: https://gitter.im
gitter:
enable: false
room:
enable: true
room: hugo-next/community
# ---------------------------------------------------------------

View File

@ -0,0 +1,6 @@
<script type="text/javascript" src="//sidecar.gitter.im/dist/sidecar.v1.js" async></script>
<script type="text/javascript">
((window.gitter = {}).chat = {}).options = {
room: {{ .Site.Params.gitter.room }}
};
</script>

View File

@ -21,6 +21,10 @@
{{- end }}
{{- end }}
{{- if .Site.Params.gitter.enable }}
{{ partial "_thirdparty/chat/gitter.html" . }}
{{- end }}
<noscript>
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>