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

Issue 180 - Distill Bugfix #182

Merged
merged 1 commit into from
Jan 14, 2021
Merged

Conversation

Jongwoo-Shim
Copy link

  • dark_mode.js was not being loaded on distill blog pages.
  • Moved dark_mode.js and jquery.html to head.html to simplify/standardize dark mode/theming for other pages.

* dark_mode.js was not being loaded on distill blog pages.
* Moved dark_mode.js and jquery.html to head.html to simplify/standardize dark mode/theming for other pages.
@Jongwoo-Shim
Copy link
Author

Bug fix can be checked here : https://jongwoo-shim.github.io/al-folio/blog/2018/distill/

@alshedivat
Copy link
Owner

Thanks for the bug fix, really appreciate it!

While we are at it, do you mind adding some minor dark mode style fixes (1) the text color of authors in the blog post header (in the dark mode, should be white), (2) the color of horizontal lines (should be white in dark mode), and (3) same for the color of footnotes and references?

Thanks again for all your contributions to the theme!!

@Jongwoo-Shim
Copy link
Author

Jongwoo-Shim commented Jan 12, 2021

@alshedivat No problem. I actually have made most of the fixes and was planning on making a separate branch for it.
The distill template was really problematic, due to the fact that the css was written into the template.v2.js file.

Just need your input on the code blocks : #183, and I'll make a pull request with the fixes.

@alshedivat
Copy link
Owner

@Jongwoo-Shim, thank you! Let me take a look at the issue you linked.

Re: distill styles and template.v2.js -- I maintain a fork of the distillpub-template which has al-folio branch. It might be easier to make significant style changes there and then re-generate template.v2.js, which is programmatically generated. However, dark mode style overrides do not require significant changes (only adjusting colors in a few places), so the preferred solution is just to override CSS without touching template.v2.js.

@Jongwoo-Shim
Copy link
Author

Jongwoo-Shim commented Jan 12, 2021

@alshedivat Part of the reason that I started to modify the template.v2.js file was due to the fact that there are several css attributes that are currently hard coded into it. I was finding that it was difficult/impossible to modify certain attributes of the distill template, due to this.

Then again, I'm not particularly great at web-dev so I might be implementing the css incorrectly.

Regardless, I personally think that the css should be stripped from the distill template, and either added to the _base.scss file or added to it's own scss file.

This is due to the fact that :

  • It's unintuitive where to look to make css changes for distill pages.
  • It forces additional changes to be custom tailored for distill; which I think would be otherwise unnecessary.
    • I believe this will cause scalability issues in the long run.

Unless, there's a specific reason that would restrict the movement of the css from the template. The template that you linked could just be used to create the scaffold of the page, while the css is managed in the al-folio project.

We could merge in the changes to the template.v2.js file as a temporary bug-fix and migrate the css files later down the line.

@Jongwoo-Shim
Copy link
Author

Jongwoo-Shim commented Jan 12, 2021

@alshedivat Additionally, are you looking for all of the fixes to be in a single merge?

As previously mentioned I was planning to make a separate branch/merge request for it. Which is why I created a separate issue. But I can adjust it if need be.

@alshedivat
Copy link
Owner

We could merge in the changes to the template.v2.js file as a temporary bug-fix and migrate the css files later down the line.

That sounds good. Let's discuss this in the corresponding issue before making any changes.

@alshedivat Additionally, are you looking for all of the fixes to be in a single merge?

No need to, it's a good idea to stage these changes through multiple PRs. I'll also think more what's the best way to go about altering CSS in template.v2.js. Since that file is generated from distillpub-template, if we are to upgrade to a later version of distillpub styles in the future, it will have to be re-generated, so any changes we make will be lost or have to be re-applied.

Copy link
Owner

@alshedivat alshedivat left a comment

Choose a reason for hiding this comment

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

LGTM

@alshedivat alshedivat merged commit 40921e4 into alshedivat:master Jan 14, 2021
@Jongwoo-Shim Jongwoo-Shim deleted the distill-bug branch January 14, 2021 22:33
@alshedivat alshedivat mentioned this pull request Jan 23, 2021
3 tasks
song-qun pushed a commit to song-qun/song-qun.github.io that referenced this pull request Mar 19, 2021
* dark_mode.js was not being loaded on distill blog pages.
* Moved dark_mode.js and jquery.html to head.html to simplify/standardize dark mode/theming for other pages.
MichaelHilton pushed a commit to MichaelHilton/MichaelHilton.github.io that referenced this pull request Jul 22, 2021
* dark_mode.js was not being loaded on distill blog pages.
* Moved dark_mode.js and jquery.html to head.html to simplify/standardize dark mode/theming for other pages.
antchristou pushed a commit to antchristou/antchristou.github.io that referenced this pull request Nov 20, 2023
* dark_mode.js was not being loaded on distill blog pages.
* Moved dark_mode.js and jquery.html to head.html to simplify/standardize dark mode/theming for other pages.
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.

2 participants