mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-22 06:46:29 +01:00
feat: use partial plugin/script.html for comments script
This commit is contained in:
parent
f0e0661c1c
commit
96d2523bcc
1 changed files with 21 additions and 21 deletions
|
@ -78,27 +78,27 @@
|
||||||
{{- $telegram := $comment.telegram | default dict -}}
|
{{- $telegram := $comment.telegram | default dict -}}
|
||||||
{{- if $telegram.enable -}}
|
{{- if $telegram.enable -}}
|
||||||
<div id="telegram-comments" class="comment">
|
<div id="telegram-comments" class="comment">
|
||||||
{{- $attr := printf `data-comments-app-website="%v"` $telegram.siteID -}}
|
{{- $attr := printf `data-comments-app-website="%v"` $telegram.siteID -}}
|
||||||
{{- $attr = printf `%v data-limit="%v"` $attr ($telegram.limit | default 5) -}}
|
{{- $attr = printf `%v data-limit="%v"` $attr ($telegram.limit | default 5) -}}
|
||||||
{{- with $telegram.height -}}
|
{{- with $telegram.height -}}
|
||||||
{{- $attr = printf `%v data-height="%v"` $attr . -}}
|
{{- $attr = printf `%v data-height="%v"` $attr . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with $telegram.color -}}
|
{{- with $telegram.color -}}
|
||||||
{{- $attr = printf `%v data-color="%v"` $attr . -}}
|
{{- $attr = printf `%v data-color="%v"` $attr . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $telegram.colorful -}}
|
{{- if $telegram.colorful -}}
|
||||||
{{- $attr = printf `%v data-colorful="1"` $attr -}}
|
{{- $attr = printf `%v data-colorful="1"` $attr -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $telegram.dislikes -}}
|
{{- if $telegram.dislikes -}}
|
||||||
{{- $attr = printf `%v data-dislikes="1"` $attr -}}
|
{{- $attr = printf `%v data-dislikes="1"` $attr -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $telegram.outlined -}}
|
{{- if $telegram.outlined -}}
|
||||||
{{- $attr = printf `%v data-outlined="1"` $attr -}}
|
{{- $attr = printf `%v data-outlined="1"` $attr -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<script type="text/javascript" src="https://comments.app/js/widget.js?3" {{ with $attr }} {{ . | safeHTMLAttr }}{{ end }}></script>
|
{{- dict "Source" "https://comments.app/js/widget.js?3" "Defer" true "Attr" $attr | partial "plugin/script.html" -}}
|
||||||
<noscript>
|
<noscript>
|
||||||
Please enable JavaScript to view the comments powered by <a href="https://comments.app/">Telegram Comments</a>.
|
Please enable JavaScript to view the comments powered by <a href="https://comments.app/">Telegram Comments</a>.
|
||||||
</noscript>
|
</noscript>
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue