Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement dark mode support for comment sections #211

Merged
merged 1 commit into from Jul 22, 2022
Merged

Conversation

joulev
Copy link
Owner

@joulev joulev commented Jul 22, 2022

Dark Mode

The embed URL will have a query parameter isDark. If it is used, the comment is delivered in dark mode. The <html> element would have a class .dark, and of course, the user can control how their comment section looks in dark mode by modifying his <style> accordingly.

<!-- /embed/:siteId/:pageId -->
<html>
  <!-- everything -->
</html>

<!-- /embed/:siteId/:pageId?isDark=1 -->
<html class="dark">
  <!-- everything -->
</html>

I was preparing ms3-readme when I read this part from ms2-readme. We completely forgot this.

It was quite easy to implement though. I shortened the query to dark.

image

Signed-off-by: Vu Van Dung <joulev.vvd@yahoo.com>
@joulev joulev added enhancement New feature or request backend All issues related to the backend labels Jul 22, 2022
@joulev joulev requested a review from VietAnh1010 as a code owner July 22, 2022 08:12
@joulev joulev self-assigned this Jul 22, 2022
@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #211 (e17c919) into main (ffe5afb) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #211   +/-   ##
=======================================
  Coverage   96.48%   96.48%           
=======================================
  Files          38       38           
  Lines         853      853           
  Branches      172      172           
=======================================
  Hits          823      823           
  Misses         27       27           
  Partials        3        3           

Copy link
Collaborator

@VietAnh1010 VietAnh1010 left a comment

Choose a reason for hiding this comment

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

Nothing much. This can be merged.

@joulev joulev merged commit f242d40 into main Jul 22, 2022
@joulev joulev deleted the embed-dark-mode branch July 22, 2022 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend All issues related to the backend enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants