From 6eedd856343ae885abf9e17d90391fe73066813b Mon Sep 17 00:00:00 2001 From: Dylan Hackworth Date: Sat, 6 Jun 2020 22:57:27 -0500 Subject: [PATCH 1/6] Updated Selenized Black timeline-highlights-color --- Selenized/Selenized Black/Selenized Black.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Selenized/Selenized Black/Selenized Black.json b/Selenized/Selenized Black/Selenized Black.json index b02a284..db35a81 100644 --- a/Selenized/Selenized Black/Selenized Black.json +++ b/Selenized/Selenized Black/Selenized Black.json @@ -16,7 +16,7 @@ "timeline-background-color": "#181818", "timeline-text-color": "#FFFFFF", "timeline-text-secondary-color": "#777777", - "timeline-highlights-color": "#bf616a", + "timeline-highlights-color": "#181818", "reaction-row-button-selected-bg-color": "#4695f7" } } From 647499e02ad906dbd5204248175f0fbcd6770b11 Mon Sep 17 00:00:00 2001 From: Dylan Hackworth Date: Sat, 6 Jun 2020 23:00:08 -0500 Subject: [PATCH 2/6] Updated Selenized Light timeline-highlights-color --- Selenized/Selenized Light/Selenized Light.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" } } From b079e26ec8d7d0570ab79978eb2104216844044e Mon Sep 17 00:00:00 2001 From: Dylan Hackworth Date: Sat, 6 Jun 2020 23:07:45 -0500 Subject: [PATCH 3/6] Fixed other timeline-highlights-color issues --- Luxury/Luxury Dark.json | 2 +- Selenized/Selenized Dark/Selenized Dark.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Luxury/Luxury Dark.json b/Luxury/Luxury Dark.json index 78beb29..ff70363 100644 --- a/Luxury/Luxury Dark.json +++ b/Luxury/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/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" } } From 36495fa4cef056c9a4ef41586f293efec4621095 Mon Sep 17 00:00:00 2001 From: Dylan Hackworth Date: Sat, 6 Jun 2020 23:37:56 -0500 Subject: [PATCH 4/6] Added build.py --- build.py | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 build.py diff --git a/build.py b/build.py new file mode 100755 index 0000000..7a3cb4d --- /dev/null +++ b/build.py @@ -0,0 +1,62 @@ +#!/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 = [] + # Let's recursively look for all the JSON files + + # root_dirs = ["Discord", "Geeko Dark", etc...] + root = os.listdir("./") + for root_dir in root: + if root_dir in BLACKLIST: + continue + + is_dir = os.path.isdir(f"./{root_dir}") + if not is_dir: + continue + + # if root_Dir is "Discord" then deep_dirs is + # deep_dirs = ["Discord-Dark"] + 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}") + + # 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) + + + # Finally output the themes as an array + with open(OUTPUT, 'w') as output: + output.write( + json.dumps(result, indent=2) + ) + output.close() + print(f"Output: {OUTPUT}") From e2a78e9395d9dc0e98d8913bb220fec39fa20157 Mon Sep 17 00:00:00 2001 From: Dylan Hackworth Date: Sat, 6 Jun 2020 23:41:18 -0500 Subject: [PATCH 5/6] Added build.py --- build.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/build.py b/build.py index 7a3cb4d..f570436 100755 --- a/build.py +++ b/build.py @@ -14,20 +14,25 @@ BLACKLIST = [ if __name__ == '__main__': result = [] json_paths = [] - # Let's recursively look for all the JSON files + + + # 1. Let's recursively look for all the JSON files # root_dirs = ["Discord", "Geeko Dark", etc...] root = os.listdir("./") for root_dir in root: - if root_dir in BLACKLIST: + is_dir = os.path.isdir(f"./{root_dir}") + if root_dir in BLACKLIST or not is_dir: continue - is_dir = os.path.isdir(f"./{root_dir}") - if not is_dir: - continue - # if root_Dir is "Discord" then deep_dirs is + # 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}" @@ -41,19 +46,19 @@ if __name__ == '__main__': 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}") - # Now let's parse all the JSON files + # 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) - # Finally output the themes as an array + # 3. Finally output the themes as a JSON array with open(OUTPUT, 'w') as output: output.write( json.dumps(result, indent=2) From 2ad8dda65f108445f844059ff14cae570e3e58da Mon Sep 17 00:00:00 2001 From: Dylan Hackworth Date: Sat, 6 Jun 2020 23:49:24 -0500 Subject: [PATCH 6/6] Consistency --- Luxury/{ => Luxury Dark}/Luxury Dark.json | 0 Luxury/{ => Luxury Dark}/Luxury Dark.png | Bin README.md | 25 +++++++++++++++------- 3 files changed, 17 insertions(+), 8 deletions(-) rename Luxury/{ => Luxury Dark}/Luxury Dark.json (100%) rename Luxury/{ => Luxury Dark}/Luxury Dark.png (100%) diff --git a/Luxury/Luxury Dark.json b/Luxury/Luxury Dark/Luxury Dark.json similarity index 100% rename from Luxury/Luxury Dark.json rename to Luxury/Luxury Dark/Luxury Dark.json 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 f5a0ae3..05fc4a0 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.