mirror of
https://github.com/gchq/CyberChef.git
synced 2024-09-29 23:11:30 +02:00
Created Creating a new theme (markdown)
parent
767a0ca7ff
commit
b8c6e56aeb
20
Creating-a-new-theme.md
Normal file
20
Creating-a-new-theme.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
## How to create a new theme
|
||||||
|
|
||||||
|
It's very easy to add a new theme, there are just a few simple steps:
|
||||||
|
|
||||||
|
1. Add a new `<option>` element to `select#theme` in [`src/web/html/index.html`](https://github.com/gchq/CyberChef/blob/master/src/web/html/index.html) with the name of your theme.
|
||||||
|
|
||||||
|
```html
|
||||||
|
<option value="mytheme">My Theme</option>
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Copy the contents of [`src/web/stylesheets/themes/_dark.css`](https://github.com/gchq/CyberChef/blob/master/src/web/stylesheets/themes/_dark.css) into a new file with the name of your theme i.e. `src/web/stylesheets/themes/_mytheme.css`.
|
||||||
|
3. Modify the JSDoc comment appropriately.
|
||||||
|
4. Change the class name attached to the `:root` selector to be the same as the value you gave the `<option>` tag in step 1.
|
||||||
|
|
||||||
|
```css
|
||||||
|
:root.mytheme {
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Change the values of the CSS properties to modify the theme to your taste.
|
||||||
|
6. [Submit a pull request!](https://github.com/gchq/CyberChef/wiki/Contributing)
|
Loading…
Reference in New Issue
Block a user