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

Doc edits for Windows users and Light/Dark Mode toggle #25

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dopecello
Copy link

Note:

Commits on August 8th were already in master branch on my repo

I reduced the amount of commits by doing git diff master..<feature-branches> | git apply - and then applying the changes.

Doc Changes

  • All the August 8th commits are edits to the pb/README.md doc and illustrate a Windows set up with Docker. I made some slight edits to uncapitalized letters, misspellings, and some extra clarifications..

  • Overall, I used the ./README.md file to illustrate a clear set up process in the following order: With Docker, With pocketbase binary, and with Go Tools installed.

Frontend Changes

  • Removed the --background-color-dark SCSS variable from the main app.scss file. This allowed for the water.css CDN to take more control.

  • Added a <ThemeToggle /> component as a button to toggle the light and dark theme of the site. Seeing how the website generally stems from a CDN water.css, I checked the website and the terse documentation and came up with a solution where the CDN renders a light and dark through interaction with this component.

    • The component stores a light or dark mode value into local storage
    • app.html upon loading reads local storage and determines which CDN link to render. This way changes are dynamic and persistent.
    • the component null-checks the element and type-assets the media attribute on the HTMLelement.
    • Added an icon through another CDN called feather-icons instead of just having the word "Toggle" written in the button

Conclusion

Light mode and dark mode is fully controlled by the CDN now and this paves the way to clean up a lot of the CSS. Now we can measure which elements to override on both modes

Copy link
Contributor

@jkdoshi jkdoshi 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. Bear with me while I integrate it.

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