Skip to content

Commit

Permalink
fix: telegram comment style (#443)
Browse files Browse the repository at this point in the history
* chore: update config.toml

Signed-off-by: HEIGE-PCloud <[email protected]>

* fix: move telegram script inline

Signed-off-by: HEIGE-PCloud <[email protected]>

* chore: clean up code

Signed-off-by: HEIGE-PCloud <[email protected]>
  • Loading branch information
HEIGE-PCloud authored Jan 7, 2022
1 parent a5c01fe commit 91609b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions layouts/partials/comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
{{- /* Telegram Comments System */ -}}
{{- $telegram := $comment.telegram | default dict -}}
{{- if $telegram.enable -}}
<div id="telegram-comments" class="comment"></div>
<div id="telegram-comments" class="comment">
{{- $attr := printf `data-comments-app-website="%v"` $telegram.siteID -}}
{{- $attr = printf `%v data-limit="%v"` $attr ($telegram.limit | default 5) -}}
{{- with $telegram.height -}}
Expand All @@ -164,10 +164,11 @@
{{- if $telegram.dark -}}
{{- $attr = printf `%v data-dark="1"` $attr -}}
{{- end -}}
{{- dict "Source" "https://comments.app/js/widget.js?3" "Defer" true "Attr" $attr | dict "Scratch" .Scratch "Data" | partial "scratch/pjaxScript.html" -}}
<script type="text/javascript" src="https://comments.app/js/widget.js?3" defer {{ with $attr }} {{ . | safeHTMLAttr }}{{ end }}></script>
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://comments.app/">Telegram Comments</a>.
</noscript>
</div>
{{- end -}}

{{- /* Commento Comment System */ -}}
Expand Down

1 comment on commit 91609b3

@vercel
Copy link

@vercel vercel bot commented on 91609b3 Jan 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.