mirror of https://github.com/luizdepra/hugo-coder.git

Piotr Kozerski
24.01.2023 e35f1da207cb25f4fce730177423d041cf90e7dd
refs
author Piotr Kozerski <piotrek-k@users.noreply.github.com>
Thursday, August 24, 2023 22:01 +0200
committer GitHub <noreply@github.com>
Thursday, August 24, 2023 22:01 +0200
commite35f1da207cb25f4fce730177423d041cf90e7dd
tree 309ac84249919df9672bc58e8554ab277143b8f3 tree | zip | gz
parent c9f0d57c46b537d2f2ee69c396483af598bc5624 view | diff
Fixing problem with incorrect style of utterances comment section (#840)

### Prerequisites

Put an `x` into the box(es) that apply:

- [x] This pull request fixes a bug.
- [ ] This pull request adds a feature.
- [ ] This pull request introduces breaking change.

### Description

This PR fixes a bug that causes inconsistencies between the themes used
by the website and the utterances comments section.

If the website theme is set automatically and the user is in dark mode,
utterances will use light mode.

This is because the `colorscheme` parameter in localStorage is not set
until the button to switch themes is used, and if this parameter is not
set, utterances displays the light theme by default.

Steps to reproduce:
1. Use dark mode on your system
2. Load a website with "utterances" comment section enabled
3. See that although your website is in dark mode, utterances uses light
mode

### Issues Resolved

None
1 files modified
31 ■■■■■ changed files
layouts/partials/posts/utterances.html 31 ●●●●● diff | view | raw | blame | history