We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Creating new themes
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:
- Fork the repo and create your branch from
main
. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints.
- Issue that pull request!
In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project.
Report bugs using Github's issues
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy!
To create a new theme:
-
Create a new CSS file in the
themes
directory (e.g.,my-awesome-theme.css
). -
Use the following template for your theme file:
html[data-theme="my-awesome-theme"] { --bg-color: #your-color; --content-bg-color: #your-color; --content-border-color: #your-color; --text-color: #your-color; --comment-text-color: #your-color; --link-color: #your-color; --visited-color: #your-color; --header-bg-color: #your-color; --header-text-color: #your-color; --toptext-color: #your-color; --subtext-color: #your-color; --titleline-color: #your-color; --titleline-visited-color: #your-color; --comment-border-color: #your-color; --comment-highlight-color: #your-color; --input-bg-color: #your-color; --input-text-color: #your-color; --input-border-color: #your-color; --code-bg-color: #your-color; --code-text-color: #your-color; --font-size-base: 14px; --font-size-title: 16px; --font-size-subtext: 12px; --font-size-comment: 14px; }
-
Replace
my-awesome-theme
with your theme's name and set appropriate color values. -
Add your new theme to the
THEMES
array injs/constants.js
. -
Test your theme thoroughly.
-
Submit a pull request with your new theme file and the updated
constants.js
.
By contributing, you agree that your contributions will be licensed under its MIT License.
Feel free to open an issue with the tag "question" or "suggestion".
Thank you for contributing to the Hacker News Theme Switcher!