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

✨ New light/dark theme config feature: allow users to set and toggle theme colors #140

Closed
wants to merge 6 commits into from

Conversation

ani-per
Copy link

@ani-per ani-per commented Apr 3, 2024

This PR includes the following features:

  • Parameters for the user to configure the light mode and dark mode colors of the background, main text, and alt text of the site.
    • The default light theme is black text on a white background.
    • The default dark theme is white text on a black background.
  • A button placed below all of the links for easy toggling between light and dark mode. (Default off)

Example configuration:

[params]
  toggle = true # Theme toggle button visibility
  [params.light]
    bgColor = "#fabe69"
    mainTextColor = "#0e2b47"
    altTextColor = "#3d2557"
  [params.dark]
    bgColor = "#302926"
    mainTextColor = "#b8e0de"
    altTextColor = "#dee036"

  [params.author]
    name = "Your name here"
    headline = "An awesome person"

    links = [
      { email = "mailto:hello@your_domain.com" },
      { link = "https://link-to-some-website.com/" },
      { github = "https://github.com/username" },
      { gitlab = "https://gitlab.com/username" },
      { spotify = "https://spotify.com/user/username" },
      { youtube = "https://youtube.com/username" },
    ]

Light mode result:
image

Dark mode result:
image

I successfully tested the toggling on Brave (essentially Chromium), Firefox, and Edge. The retention of toggled theme upon closing and reopening functions properly too.


I have also updated the README to reflect these new features.

@ani-per ani-per changed the title ✨ New light/dark theme config feature: allow users to set and toggle ✨ New light/dark theme config feature: allow users to set and toggle theme colors Apr 3, 2024
Copy link

netlify bot commented Apr 3, 2024

Deploy Preview for hugo-lynx ready!

Name Link
🔨 Latest commit 616684f
🔍 Latest deploy log https://app.netlify.com/sites/hugo-lynx/deploys/660dd7816338f40008243bc5
😎 Deploy Preview https://deploy-preview-140--hugo-lynx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ani-per
Copy link
Author

ani-per commented Apr 3, 2024

This labeller failure is not due to my commits. The same occurred for this user in #126, so I think it's an issue with .github/labeller.yml.

Copy link

github-actions bot commented May 4, 2024

This pull request has been automatically marked as stale because it has not had any recent activity.
Please review the PR history and add a reply with any requested information. If no information has been requested, it may be that this contribution does not fit with the project objectives, or does not adhere to the contributing guidelines. If this is in error, please add a reply with further details.
This PR will automactically close in 14 days if no further activity occurs.

@github-actions github-actions bot added the stale This issue or pull request has not had any recent activity label May 4, 2024
@ani-per
Copy link
Author

ani-per commented May 4, 2024

I'd like to bump this to prevent it going stale. I think this would be a very helpful feature that would help a lot for customization.

@github-actions github-actions bot removed the stale This issue or pull request has not had any recent activity label May 5, 2024
Copy link

github-actions bot commented Jun 4, 2024

This pull request has been automatically marked as stale because it has not had any recent activity.
Please review the PR history and add a reply with any requested information. If no information has been requested, it may be that this contribution does not fit with the project objectives, or does not adhere to the contributing guidelines. If this is in error, please add a reply with further details.
This PR will automactically close in 14 days if no further activity occurs.

@github-actions github-actions bot added the stale This issue or pull request has not had any recent activity label Jun 4, 2024
@github-actions github-actions bot closed this Jun 18, 2024
@flowgunso
Copy link

I am looking for that exact feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This issue or pull request has not had any recent activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants