From ee5a68be9c217ade5fc95434d24c33626920ee6d Mon Sep 17 00:00:00 2001 From: Vincent Jousse Date: Tue, 20 Aug 2024 07:23:50 +0200 Subject: [PATCH] feat: add theming support (#69) --- .../pomotroid_themes-preview--914x219.png | Bin 0 -> 41645 bytes README.md | 10 + docs/themes/images/andromeda_01.png | Bin 0 -> 13559 bytes docs/themes/images/andromeda_02.png | Bin 0 -> 9569 bytes docs/themes/images/ayu_01.png | Bin 0 -> 13805 bytes docs/themes/images/ayu_02.png | Bin 0 -> 9627 bytes docs/themes/images/city-lights_01.png | Bin 0 -> 13866 bytes docs/themes/images/city-lights_02.png | Bin 0 -> 9553 bytes docs/themes/images/dracula_01.png | Bin 0 -> 13480 bytes docs/themes/images/dracula_02.png | Bin 0 -> 9568 bytes docs/themes/images/dva_01.png | Bin 0 -> 14178 bytes docs/themes/images/dva_02.png | Bin 0 -> 9544 bytes docs/themes/images/github_01.png | Bin 0 -> 13831 bytes docs/themes/images/github_02.png | Bin 0 -> 9546 bytes docs/themes/images/graphite_01.png | Bin 0 -> 13759 bytes docs/themes/images/graphite_02.png | Bin 0 -> 9518 bytes docs/themes/images/gruvbox_01.png | Bin 0 -> 13439 bytes docs/themes/images/gruvbox_02.png | Bin 0 -> 9526 bytes docs/themes/images/monokai_01.png | Bin 0 -> 13778 bytes docs/themes/images/monokai_02.png | Bin 0 -> 9601 bytes docs/themes/images/nord_01.png | Bin 0 -> 13826 bytes docs/themes/images/nord_02.png | Bin 0 -> 9551 bytes docs/themes/images/one-dark-pro_01.png | Bin 0 -> 13714 bytes docs/themes/images/one-dark-pro_02.png | Bin 0 -> 9498 bytes docs/themes/images/pomotroid_01.png | Bin 0 -> 13380 bytes docs/themes/images/pomotroid_02.png | Bin 0 -> 9537 bytes docs/themes/images/popping-and-locking_01.png | Bin 0 -> 13385 bytes docs/themes/images/popping-and-locking_02.png | Bin 0 -> 9586 bytes docs/themes/images/solarized-light_01.png | Bin 0 -> 14130 bytes docs/themes/images/solarized-light_02.png | Bin 0 -> 9562 bytes docs/themes/images/spandex_01.png | Bin 0 -> 13931 bytes docs/themes/images/spandex_02.png | Bin 0 -> 9466 bytes docs/themes/images/synthwave_01.png | Bin 0 -> 13999 bytes docs/themes/images/synthwave_02.png | Bin 0 -> 9567 bytes docs/themes/images/tokyo-night-storm_01.png | Bin 0 -> 13949 bytes docs/themes/images/tokyo-night-storm_02.png | Bin 0 -> 9612 bytes docs/themes/theme-template.json | 17 + docs/themes/themes.md | 67 +++ elm.json | 4 +- index.html | 16 +- main.css | 24 +- src-elm/ColorHelper.elm | 99 ++++ src-elm/ListWithCurrent.elm | 180 +++++++ src-elm/Main.elm | 485 +++++++++++++----- src-elm/Themes.elm | 48 ++ src-tauri/Cargo.lock | 10 + src-tauri/Cargo.toml | 3 +- src-tauri/src/lib.rs | 226 +++++++- src-tauri/tauri.conf.json | 2 +- src-tauri/themes/andromeda.json | 15 + src-tauri/themes/ayu.json | 15 + src-tauri/themes/city-lights.json | 15 + src-tauri/themes/dracula.json | 15 + src-tauri/themes/dva.json | 15 + src-tauri/themes/github.json | 15 + src-tauri/themes/graphite.json | 15 + src-tauri/themes/gruvbox.json | 15 + src-tauri/themes/monokai.json | 15 + src-tauri/themes/nord.json | 15 + src-tauri/themes/one-dark.json | 15 + src-tauri/themes/pomodorolm.json | 17 + src-tauri/themes/popping-and-locking.json | 15 + src-tauri/themes/solarized-light.json | 15 + src-tauri/themes/spandex.json | 15 + src-tauri/themes/synthwave.json | 15 + src-tauri/themes/tokyo-night.json | 15 + src-ts/main.ts | 104 +++- 67 files changed, 1382 insertions(+), 170 deletions(-) create mode 100644 .github/images/pomotroid_themes-preview--914x219.png create mode 100644 docs/themes/images/andromeda_01.png create mode 100644 docs/themes/images/andromeda_02.png create mode 100644 docs/themes/images/ayu_01.png create mode 100644 docs/themes/images/ayu_02.png create mode 100644 docs/themes/images/city-lights_01.png create mode 100644 docs/themes/images/city-lights_02.png create mode 100644 docs/themes/images/dracula_01.png create mode 100644 docs/themes/images/dracula_02.png create mode 100644 docs/themes/images/dva_01.png create mode 100644 docs/themes/images/dva_02.png create mode 100644 docs/themes/images/github_01.png create mode 100644 docs/themes/images/github_02.png create mode 100644 docs/themes/images/graphite_01.png create mode 100644 docs/themes/images/graphite_02.png create mode 100644 docs/themes/images/gruvbox_01.png create mode 100644 docs/themes/images/gruvbox_02.png create mode 100644 docs/themes/images/monokai_01.png create mode 100644 docs/themes/images/monokai_02.png create mode 100644 docs/themes/images/nord_01.png create mode 100644 docs/themes/images/nord_02.png create mode 100644 docs/themes/images/one-dark-pro_01.png create mode 100644 docs/themes/images/one-dark-pro_02.png create mode 100644 docs/themes/images/pomotroid_01.png create mode 100644 docs/themes/images/pomotroid_02.png create mode 100644 docs/themes/images/popping-and-locking_01.png create mode 100644 docs/themes/images/popping-and-locking_02.png create mode 100644 docs/themes/images/solarized-light_01.png create mode 100644 docs/themes/images/solarized-light_02.png create mode 100644 docs/themes/images/spandex_01.png create mode 100644 docs/themes/images/spandex_02.png create mode 100644 docs/themes/images/synthwave_01.png create mode 100644 docs/themes/images/synthwave_02.png create mode 100644 docs/themes/images/tokyo-night-storm_01.png create mode 100644 docs/themes/images/tokyo-night-storm_02.png create mode 100644 docs/themes/theme-template.json create mode 100644 docs/themes/themes.md create mode 100644 src-elm/ColorHelper.elm create mode 100644 src-elm/ListWithCurrent.elm create mode 100644 src-elm/Themes.elm create mode 100644 src-tauri/themes/andromeda.json create mode 100644 src-tauri/themes/ayu.json create mode 100644 src-tauri/themes/city-lights.json create mode 100644 src-tauri/themes/dracula.json create mode 100644 src-tauri/themes/dva.json create mode 100644 src-tauri/themes/github.json create mode 100644 src-tauri/themes/graphite.json create mode 100644 src-tauri/themes/gruvbox.json create mode 100644 src-tauri/themes/monokai.json create mode 100644 src-tauri/themes/nord.json create mode 100644 src-tauri/themes/one-dark.json create mode 100644 src-tauri/themes/pomodorolm.json create mode 100644 src-tauri/themes/popping-and-locking.json create mode 100644 src-tauri/themes/solarized-light.json create mode 100644 src-tauri/themes/spandex.json create mode 100644 src-tauri/themes/synthwave.json create mode 100644 src-tauri/themes/tokyo-night.json diff --git a/.github/images/pomotroid_themes-preview--914x219.png b/.github/images/pomotroid_themes-preview--914x219.png new file mode 100644 index 0000000000000000000000000000000000000000..a834acad7bc3ee1327fb1d591346ff63b6c107be GIT binary patch literal 41645 zcmdqIV~{3K)IB)Ao@v{*J#9RVY4_8%ZQGo-ZClgsr)}G|Z5!Kf#P0w7w%>OnGO8*n zGH+%^-ORk_+*4t4GGg#BI50nc{D23F3oHEi@iYGWc?}BU`${-jMf-ijb`nu@QnWR3 za@BV*{vlvwYhX+SwAME@Rxs8#aUlu4VpyalCo(1Vu5i!~QroP{WRrO<)=aqD0h0bT%&1$@s3;mVH z#^jkP0dPsRwe^W0i)(8<4f`(h&a3l@tw#V}LYOhCwaD3K<~a5PjMc^#?07YY-F zmHD52QX&F!qiv({5dH1=fMqlR7h%3Iq8#B^d}O62`3=!VC$wJ&Gf45B!Ru{EsADyr zn83e-^jx95$f#oiudDL8(eYj=_GDfPS47eherthE1$huQN=@I5k^2r3f>CT^aEMPV z=Vx_-B0UYT8`h3yF77;P1~=BIN4?I&t;~11#B>2T79x^-VP3O4&t$q?^Evo&^wM}a z^J~dq$UnaAh~?V|Rkv0)(fe7M_r4VNm92?J#hx>r)<>F`!35nh$Aok}iX&!L6`n=% z7_IN20GFbYoUj`gEPO!ubY1l+j&Sp(Md;`UDL}G#w3IP&=e7-$n4vz{VfkpwAt;wA z_nYO5$J@-zb&eGZOxj6eb_sFPf_%jy<`rXJbn6s&{A-|**xo{NJ0Eb@p7Y$ck(CX8 zfbxY+JasMni|RdYjQ->XxSPPU`^RZzNPU7L9}}1|njpa|ElqF9Ov(6p@>kY>%8Q__Z?2 z*-%u)Edy3ESL?BL8P&-*62-Jix}rEEQBF2ks<8cWUx@YY@oPh9+Q?xxVfa*LcL_KFYj zn*BAj_lO6bBkaQ3Q@eJ~ldRy&&?BR^*(BhXt_7bae7n;9;}1DT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