diff --git a/Luxury/Luxury Dark.json b/Luxury/Luxury Dark/Luxury Dark.json similarity index 93% rename from Luxury/Luxury Dark.json rename to Luxury/Luxury Dark/Luxury Dark.json index 78beb29..ff70363 100644 --- a/Luxury/Luxury Dark.json +++ b/Luxury/Luxury Dark/Luxury Dark.json @@ -14,7 +14,7 @@ "roomlist-text-secondary-color": "#FFF3A4", "timeline-background-color": "#05192D", - "timeline-highlights-color": "#32353b", + "timeline-highlights-color": "#011223", "timeline-text-color": "#FFF3A4", "timeline-text-secondary-color": "#A79000", "reaction-row-button-selected-bg-color": "#FFEC70" diff --git a/Luxury/Luxury Dark.png b/Luxury/Luxury Dark/Luxury Dark.png similarity index 100% rename from Luxury/Luxury Dark.png rename to Luxury/Luxury Dark/Luxury Dark.png diff --git a/README.md b/README.md index 591e14d..15f4bf2 100644 --- a/README.md +++ b/README.md @@ -13,15 +13,18 @@ Join us in [#riot-web-themes:dhdf.dev](https://matrix.to/#/!pjCLhvJxLkGjNQFqcB:m * [If you are a Firefox user](#if-you-are-a-firefox-user) * [Or use my instance of Riot Web](#use-my-riot-web-instance) - [Themes](#themes) - * [ThomCat Black](#thomcat-black) * [Discord Dark Theme](#discord-dark-theme) + * [Geeko Dark Theme](#geeko-dark-theme) + * [Luxury Dark Theme](#luxury-dark-theme) * [Nord Dark Theme](#nord-dark-theme) * [Nord Light Theme](#nord-light-theme) - * [Selenized Light Theme](#selenized-light-theme) - * [Selenized Dark Theme](#selenized-dark-theme) * [Selenized Black Theme](#selenized-black-theme) - * [Geeko Dark Theme](#geeko-dark-theme) -- [Advanced](#workarounds) + * [Selenized Dark Theme](#selenized-dark-theme) + * [Selenized Light Theme](#selenized-light-theme) + * [ThomCat Black](#thomcat-black) +- [Advanced](#advanced) + * [Workarounds](#workarounds) + * [build.py](#build.py) ### How to use themes @@ -80,11 +83,11 @@ Made by `@dhmf:dhdf.dev` ![Discord Dark Theme Screenshot](Discord/Discord-Dark/Discord-Dark-Theme.png) -## [Luxury Dark Theme](./Luxury/Luxury%20Dark.json) +## [Luxury Dark Theme](./Luxury/Luxury%20Dark/Luxury%20Dark.json) Made by `@dhmf:dhdf.dev` -![Luxury Dark Theme Screenshot](./Luxury/Luxury%20Dark.png) +![Luxury Dark Theme Screenshot](./Luxury/Luxury%20Dark/Luxury%20Dark.png) ## [Nord Dark Theme](https://raw.githubusercontent.com/aaronraimist/riot-web-themes/master/Nord/Nord%20Dark/Nord%20Dark.json) @@ -129,7 +132,9 @@ Made by `@swedneck:hielle.com` -# Workarounds +# Advanced + +## Workarounds Riot's theme implementation is fairly limited so custom themes might introduce some odd elements. For example, when using ThomCat Black, the selected reaction 'pill' is outlined in green since Riot doesn't give us a variable to control the color that is used there. @@ -145,3 +150,7 @@ sudo -u cp /tmp/theme-dark-custom.css //bund The results: ![pill_after](images/Pill2.png) + +## build.py +There is a [build.py](./build.py) python file which takes all the themes and +outputs it to a file as an array of JSON. Simply execute it in this directory. diff --git a/Selenized/Selenized Dark/Selenized Dark.json b/Selenized/Selenized Dark/Selenized Dark.json index 4584bf7..74205ac 100644 --- a/Selenized/Selenized Dark/Selenized Dark.json +++ b/Selenized/Selenized Dark/Selenized Dark.json @@ -16,7 +16,7 @@ "timeline-background-color": "#2d5b69", "timeline-text-color": "#FFFFFF", "timeline-text-secondary-color": "#72898f", - "timeline-highlights-color": "#bf616a", + "timeline-highlights-color": "#184956", "reaction-row-button-selected-bg-color": "#4695f7" } } diff --git a/Selenized/Selenized Light/Selenized Light.json b/Selenized/Selenized Light/Selenized Light.json index 1ff1c83..c3c9f8b 100644 --- a/Selenized/Selenized Light/Selenized Light.json +++ b/Selenized/Selenized Light/Selenized Light.json @@ -16,7 +16,7 @@ "timeline-background-color": "#fbf3db", "timeline-text-color": "#000000", "timeline-text-secondary-color": "#777777", - "timeline-highlights-color": "#bf616a", + "timeline-highlights-color": "#ece3cc", "reaction-row-button-selected-bg-color": "#4695f7" } } diff --git a/build.py b/build.py new file mode 100755 index 0000000..f570436 --- /dev/null +++ b/build.py @@ -0,0 +1,67 @@ +#!/usr/bin/python +# This takes all the themes and puts it in one file +import json +import os + + +OUTPUT = "./output.json" +BLACKLIST = [ + ".git", + "images" +] + + +if __name__ == '__main__': + result = [] + json_paths = [] + + + # 1. Let's recursively look for all the JSON files + + # root_dirs = ["Discord", "Geeko Dark", etc...] + root = os.listdir("./") + for root_dir in root: + is_dir = os.path.isdir(f"./{root_dir}") + if root_dir in BLACKLIST or not is_dir: + continue + + + # if root_dir is "Discord" then deep_dirs is + # deep_dirs = ["Discord-Dark"] + # ./Discord + # └── Discord-Dark + # ├── Discord-Dark-Theme.json + # └── Discord-Dark-Theme.png + + deep_dirs = os.listdir(f"./{root_dir}") + for deep in deep_dirs: + current_path = f"./{root_dir}/{deep}" + + is_dir = os.path.isdir(current_path) + if is_dir: + files = os.listdir(current_path) + + for file in files: + current_path = f"./{root_dir}/{deep}/{file}" + if file.lower().endswith(".json"): + json_paths.append(current_path) + print(f"Added {file}") + + elif deep.lower().endswith(".json"): + json_paths.append(current_path) + print(f"Added {file}") + + # 2. Now let's parse all the JSON files + for json_path in json_paths: + with open(json_path, 'r') as file: + parsed = json.load(file) + result.append(parsed) + + + # 3. Finally output the themes as a JSON array + with open(OUTPUT, 'w') as output: + output.write( + json.dumps(result, indent=2) + ) + output.close() + print(f"Output: {OUTPUT}")