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

Dark highlighting #463

Closed
wants to merge 8 commits into from
Closed

Conversation

pdmosses
Copy link
Contributor

Fix #374 using a Pygments highlighting theme suggested by @MrBartusek, producing:

Screenshot 2020-10-17 at 23 15 43

Copies of alternative Pygments files are included, to make it easy for users to change.

Move highlighting colours from `code.scss` to `light.scss`.
Add GitHub Dark hihlighting colurs to `dark.scss`.
Test using `Preview dark...` button in Configuration page.
- Add copies of CSS files from Pygments
- Replace GitHub Dark colours in _sass/color_schemes/dark.scss by an import
@MrBartusek
Copy link

Looks good but I don't think all of the 200 style files are needed

@pdmosses pdmosses mentioned this pull request Oct 18, 2020
@pdmosses
Copy link
Contributor Author

I don't think all of the 200 style files are needed

I'll be happy to remove some/most of them, but I'm not sure which to keep – users may have custom color schemes, and prefer different highlighting themes.

Correct the dark code highlighting:
- Change the extension of the imported CSS file to `scss`.
- Remove unused `pygments` folders and files.
Dark code highlighting tested with Jekyll 3.8.7 and 4.1.1.
@pdmosses
Copy link
Contributor Author

The above update changes the extension of the imported CSS file for dark code highlighting from css to scss, and remove unused CSS files.

- Useful for local testing when using Jekyll >= 4.2
- Allow bundler >= 2.1.4
- Add dark mode preview button
- Remove color setting for h5 and h6
It was overriding the setting in base.scss, and unsuitable for dark color schemes.
@pdmosses pdmosses linked an issue Jan 4, 2021 that may be closed by this pull request
@pdmosses
Copy link
Contributor Author

pdmosses commented Jan 4, 2021

The color setting for h5 and h6 elements has been removed. It was overriding the setting in base.scss, and unsuitable for dark color schemes.

Copy link
Contributor

@koppor koppor left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

I would love to see a better dark-theming.

I left some comments on IMHO minor issues.

@@ -0,0 +1,5 @@
# For local development and testing, use the option
Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove this file as it does not contain any non-default setting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review! I agree that this file should be removed – especially as a change in Jekyll v4 makes it useless.

This PR is included in #578, which @mattxwang is currently reviewing for possible inclusion in v0.4.0; if it is included, this PR will be closed, so I'm inclined to wait with updates until that has been decided.

spec.add_development_dependency "bundler", "~> 2.1.4"
spec.add_development_dependency "bundler", ">= 2.1.4"
Copy link
Contributor

Choose a reason for hiding this comment

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

i think, this should go into s seperate PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. @mattxwang is adjusting the gem spec for v0.4.0.

@@ -0,0 +1,858 @@
<!DOCTYPE html>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this file be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes; the docs could provide a link to https://pygments.org. I should do this also in #578 when it that PR has been reviewed.

mattxwang added a commit that referenced this pull request Jul 4, 2022
This PR combines (and resolves conflicts between) #448, #463, #466, #494, #495, #496, #498, and #572. 

The main aim is to facilitate use of several of the implemented features _together_, when using the fork as a remote theme. It should also simplify merging the included PRs into a future release.

The branch [combination-rec-nav](https://github.com/pdmosses/just-the-docs/tree/combination-rec-nav) adds [multi-level navigation](#462) and (NEW:) [sibling links](#394) to the branch used for this PR. It includes updated [documentation for the navigation structure](https://pdmosses.github.io/just-the-docs/docs/navigation-structure/), and reorganised and extended [navigation tests](https://pdmosses.github.io/just-the-docs/tests/navigation/). The documentation and the tests can be browsed at the (temporary) [website published from the combination-rec-nav branch](https://pdmosses.github.io/just-the-docs/).

_Caveat:_ The changes to v0.3.3 in this PR and #462 have not yet been reviewed or approved, and may need updating before merging into a release of the theme. If you use a branch from a PR as a remote theme, there is a risk of such updates affecting your website. Moreover, these branches are likely to be deleted after they have been merged. To avoid  such problems, you could copy the branch that you want to use to your own fork of the theme.

Co-authored-by: Matt Wang <matt@matthewwang.me>
@mattxwang
Copy link
Member

Going to close as we've merged in #578; @pdmosses feel free to reopen if necessary!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<h5> and <h6> are very hard to read in dark mode Code snippet/blocks barely readable on black theme
4 participants