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 mode for website #1382

Closed
MehfoozurRehman opened this issue Dec 26, 2022 · 24 comments
Closed

dark mode for website #1382

MehfoozurRehman opened this issue Dec 26, 2022 · 24 comments
Labels
UI Change, update, or fix for site UI (not content)

Comments

@MehfoozurRehman
Copy link
Contributor

would like to help here with making a dark theme for expressjs.com

@dougwilson
Copy link
Contributor

Sounds awesome! I look forward to your contribution!

@0x1026
Copy link

0x1026 commented Jan 14, 2023

Just remove the background image every time u join a page of the website, or make a pr removing the file xd
image

@tabishnaqvi1311
Copy link

Hello @MehfoozurRehman , I noticed that you opened this issue three months ago about adding dark mode. I'm interested in contributing to the project and was wondering if you are still working on this issue or if you would be willing to let me take a look at it? Please let me know if there's anything I can do to help.

@codesmith25103
Copy link

Hey @dougwilson, is this issue still open? If yes, can you please assign me this issue?

YashNuhash added a commit to YashNuhash/expressjs.com that referenced this issue Jun 14, 2023
Fixes expressjs#1382

Sometimes it creates eye strain when you are learning form a white backgrounded documentation since 4 to 6 hours a day. 
That is why, I removed that white background image and the website is looking very good now.
YashNuhash added a commit to YashNuhash/expressjs.com that referenced this issue Jun 14, 2023
@faisalsaifii
Copy link

What's pending here?

@MehfoozurRehman
Copy link
Contributor Author

Hey everyone,

Apologies for my absence last year due to studies. I'm comfortable with the MERN stack but not Ruby. However, I use Express.js daily and am eager to implement dark mode. Can someone guide me on running the project locally? I'm ready to contribute.

Thanks,

@MehfoozurRehman
Copy link
Contributor Author

MehfoozurRehman commented Feb 8, 2024

ok so last year I tried doing the local run according to repo readme and again today i tried but

image

its giving me this error for some reason to make sure it's not my local pc i am using GitHub code spaces.

image
image

these is the result of first steps I am not really familiar with the ruby ecosystem so please let me know what i am doing wrong.

@MehfoozurRehman
Copy link
Contributor Author

and i have read the issues created based on this one so what i am thinking once i have this running locally

image

the area where i have marked red i am thinking of adding

image
image

these two icons first there can be some js to check the user device preference and adjust the theme according to that and if a user switches the theme, we save the preference in local storage. also i have read the concern about removing the background image from body i will make sure i pick the background color from that image for the light mode

@chrisdel101
Copy link
Contributor

Hey Guys, was this still active? And/or still being worked on? I'm looking to make some contributions here.

@crandmck
Copy link
Member

crandmck commented Apr 9, 2024

@chrisdel101 Please do.... I haven't delved into this issue, but if you can sort it out your contribs are welcome!

@chrisdel101
Copy link
Contributor

okay, I'm looking into this and will plan to handle it.

chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 10, 2024
- init commit
- add darkmode.css file and include
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 11, 2024
- add darkmode icon
- add darkmmode JS file after body
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 12, 2024
@MehfoozurRehman
Copy link
Contributor Author

guys can someone please help me run the repo locally

@0x1026
Copy link

0x1026 commented Apr 12, 2024

Hey, just read the /README.md#local-setup

@MehfoozurRehman
Copy link
Contributor Author

ok so last year I tried doing the local run according to repo readme and again today i tried but

image

its giving me this error for some reason to make sure it's not my local pc i am using GitHub code spaces.

image image

these is the result of first steps I am not really familiar with the ruby ecosystem so please let me know what i am doing wrong.

i have sent this before the instructions in readme are not working for me please can you help here

@MehfoozurRehman
Copy link
Contributor Author

i have tried on github codespaces and my local computer its the same

@chrisdel101
Copy link
Contributor

chrisdel101 commented Apr 12, 2024

@MehfoozurRehman I've already started working on this, see above, and have made some significant progress. Prob not worth you also working on at this point.

If you are set on it, I am making this as a "theme", meaning there could be numerous themes. So after I complete PR this you could add another "theme". Like GH has multiple dark themes?

@MehfoozurRehman
Copy link
Contributor Author

@chrisdel101, it's okay. Please continue working on this. I was under the impression that this issue was abandoned, but if you can, please complete the pull request.

@chrisdel101
Copy link
Contributor

Re: your setup, the images above are not showing up for me. After you install Jekyll and run the serve command what happens?

@MehfoozurRehman
Copy link
Contributor Author

MehfoozurRehman commented Apr 14, 2024

image
this is what I am getting
I followed the readme file here

@chrisdel101
Copy link
Contributor

chrisdel101 commented Apr 14, 2024

Huh, yeah I have no idea why you are getting that. Seems like something is not intstalled correctly, or a gem is missing. I assume you did all these steps first:

  1. https://jekyllrb.com/docs/installation/
  2. https://jekyllrb.com/docs/

If something failed in the first two steps then the server will fail. Maybe try the example in the docs they give and see you can run the basic example there. You should have something like this before it will run

ruby-v
ruby 3.3.0
jekyll -v
jekyll 4.3.3

Install extra gem from /README.md#local-setup
gem install jekyll-redirect-from

Then after cloning/forking the expressJS repo, this is what I see:

bundle install
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Fetching nokogiri 1.16.4 (x86_64-darwin)
Installing nokogiri 1.16.4 (x86_64-darwin)
Bundle complete! 3 Gemfile dependencies, 96 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
bundle exec jekyll serve
/usr/local/lib/ruby/gems/3.3.0/gems/jekyll-3.9.5/lib/jekyll.rb:28: warning: csv was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add csv to your Gemfile or gemspec. Also contact author of jekyll-3.9.5 to add csv into its gemspec.
Configuration file: /Users/myComputer/code_work/jekyll/expressjs_copy/_config.yml
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
            Source: /Users/myComputer/code_work/jekyll/expressjs_copy
       Destination: /Users/myComputer/code_work/jekyll/expressjs_copy/_site
 Incremental build: enabled
      Generating... 
                    done in 15.486 seconds.
 Auto-regeneration: enabled for '/Users/myComputer/code_work/jekyll/expressjs_copy'
LiveReload address: http://127.0.0.1:35729
    Server address: http://127.0.0.1:4000
  Server running... press ctrl-c to stop.
        LiveReload: Browser connected

@MehfoozurRehman
Copy link
Contributor Author

image
image
image
image
image
yes so I have done the steps mentioned above It is saying the same thing for me just my ruby and Jakyell versions are different I am using GitHub code spaces for this these are the versions installed on that by default

@MehfoozurRehman
Copy link
Contributor Author

image
ok so I was trying a few things i didn't know how to update the ruby version I changed the codespaces settings to use the beta docker image and gem update --system 3.5.9 updated the ruby using this. I don't know which one fixed it but now it's working
image
anyways appreciate the help please let me where you are in completing this and if you need any help with this issue

chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 14, 2024
- futher changes to dark mode CSS for index
- futher changes to dark mode JS for index
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 16, 2024
- add hover state styles
- complete most of index page
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 16, 2024
- init commit
- add darkmode.css file and include
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 16, 2024
- add darkmode icon
- add darkmmode JS file after body
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 16, 2024
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 16, 2024
- futher changes to dark mode CSS for index
- futher changes to dark mode JS for index
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 16, 2024
- add hover state styles
- complete most of index page
@chrisdel101
Copy link
Contributor

chrisdel101 commented Apr 17, 2024

Hey guys, I ran into a problem.
This is the _layouts/home.html which is used for the main index.md. It pulls a JS file I added from the JS folder. It needs to run at the end of the page, and it works.

<html lang="{{ page.lang }}">
   <body class="en-doc">
   <script data-cfasync="false" src="../js/theme.js"></script>
   </body>
</html>

This is the _layouts/page.html which runs most of the other pages, for example installing.md. It pulls a JS file I added to the same folder _layouts just for test purposes to show the problem.

<html lang="{{ page.lang }}">
   <body class="en-doc">
   <script data-cfasync="false" src="test.js"></script>
   </body>
</html>

I get ERROR 'en/starter/test.js' not found. It is ignoring the src, even absolute paths, and pulling for path where the markdown file is located en/starter/markdown.md. How do I stop this? Why is this happening?

The overall point is all the pages need that theme.js file

Update-- Status: working now.

chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 18, 2024
- Get page layout script tag path to work
- clean out CSS to nest under body.dark-mode
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 18, 2024
- add styles for hello-world, routing, generator
- hello-world not possible to style iframe
@crandmck crandmck added the UI Change, update, or fix for site UI (not content) label Apr 18, 2024
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 19, 2024
- complete all CSS for all Getting Started pages
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 19, 2024
- add all script tags
- finish JS file
- finish all CSS for pages
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 19, 2024
- fix whitespace
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 20, 2024
- add css to search bar drop down
- rearrange css file and add comments
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 21, 2024
- add check for local storage
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 21, 2024
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 21, 2024
- add hover color on search bar results
- fix search bar width on FR, DE, RU, UZ
pages caused by adding moon icon to navbar
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 21, 2024
- remove error line css
- add system style check
- remove local storage use until toggled
chrisdel101 added a commit to chrisdel101/expressjs.com that referenced this issue Apr 22, 2024
- clean up comments in theme js
- wrap system theme check in function
crandmck pushed a commit that referenced this issue May 2, 2024
* Issue ##1382
- init commit
- add darkmode.css file and include

* Issue ##1382
- add darkmode icon
- add darkmmode JS file after body

* Issue ##1382: work on JS and CSS

* Issue ##1382
- futher changes to dark mode CSS for index
- futher changes to dark mode JS for index

* Issue ##1382
- add hover state styles
- complete most of index page

* Issue ##1382
- Get page layout script tag path to work
- clean out CSS to nest under body.dark-mode

* Issue ##1382
- add styles for hello-world, routing, generator
- hello-world not possible to style iframe

* Issue #1382
- complete all CSS for all Getting Started pages

* Issue #1382
- add all script tags
- finish JS file
- finish all CSS for pages

* issue #1382
- fix whitespace

* issue #1382
- add css to search bar drop down
- rearrange css file and add comments

* issue #1382
- add check for local storage

* issue #1382 -add css to add header html

* issue #1382
- add hover color on search bar results
- fix search bar width on FR, DE, RU, UZ
pages caused by adding moon icon to navbar

* issue #1382
- remove error line css
- add system style check
- remove local storage use until toggled

* issue #1382
- clean up comments in theme js
- wrap system theme check in function

* Issue #1490
- remove bands on dropdowns
- slight fix to first "installing" drop down

* Issue #1490
- rejig JS - add listener to mediaQuery
- make latest change be the override

* Issue #1490
 - fix forgotten merge conflict line in header uz & ru
@crandmck
Copy link
Member

crandmck commented May 2, 2024

Fixed with #1490

@crandmck crandmck closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Change, update, or fix for site UI (not content)
Projects
None yet
Development

No branches or pull requests

8 participants