djyde / cusdis

lightweight, privacy-friendly alternative to Disqus.
https://cusdis.com
GNU General Public License v3.0
2.64k stars 233 forks source link

How can I modify the font in Cusdis? #255

Closed iLucis closed 1 year ago

iLucis commented 1 year ago

How can I make the font of elements such as nickname, email, reply, input box text, and comment content in Cusdis consistent with the font of my website theme?

I have added the code to link the custom.css file for the theme font in the comments.html of Hugo, as shown below. However, only the title and counter text have been changed, as shown in the attached screenshot.

<div>
<h3>Comment</h3>
<span data-cusdis-count-page-id="{{ .File.UniqueID }}">0</span> comments
<div id="cusdis_thread"
  data-host="https://cusdis.com"
  data-app-id="****"
  data-page-id="{{ .File.UniqueID }}"
  data-page-url="{{ .RelPermalink }}"
  data-page-title="{{ .Title }}"
></div>
<link rel="stylesheet" href="custom.css">
</div>
<script defer src ····
Snipaste
DannySu09 commented 1 year ago

It's because Cusdis use iframe to display the form for inputting comments, and the css which is outside of the iframe will not have any effect.

Maybe you can fork Cusdis to do your own changes. The relative files are in the widget directory. It's all css classes of tailwindcss. So it's quite straightforward to modify.

iLucis commented 1 year ago

It's because Cusdis use iframe to display the form for inputting comments, and the css which is outside of the iframe will not have any effect.

Maybe you can fork Cusdis to do your own changes. The relative files are in the widget directory. It's all css classes of tailwindcss. So it's quite straightforward to modify.

Thanks! I'll try it.