196 Commits

Author SHA1 Message Date
Daniel
fd2bf25d92 Merge pull request #59 from accusitive/patch-1
Update README.md to the new Jellyfin link
2023-09-16 16:41:59 +02:00
accusitive
5f31f40700 Update README.md to the new Jellyfin link
The old link seems to be malicious (or spam)
2023-09-15 22:16:28 -04:00
Daniel
a26110a15e Merge pull request #46 from jenslys/fix-jellyskin-url
Updated JellySkin
2022-08-18 16:06:01 +02:00
Jens
2a2859bc16 updated JellySkin 2022-08-18 15:52:50 +02:00
Daniel
b72546b3eb Added JellyTheme 2022-06-14 19:04:51 +02:00
Daniel
84c4462648 Added ultrachromic and new color picked mode 2022-06-14 17:56:25 +02:00
Mister Rajoy
a970349a1f Fix error 2021-12-06 18:09:21 +01:00
Mister Rajoy
deeb8976f6 Add Dark And Green Skin 2021-12-06 18:02:18 +01:00
Mister Rajoy
a00e8b6352 Update thumb.png 2021-05-15 00:56:51 +02:00
Mister Rajoy
4b63aa0c8c Add thumb 2021-05-14 17:05:14 +02:00
Mister Rajoy
59a46ae222 Fix background 2021-05-13 15:50:33 +02:00
Mister Rajoy
03b7f0bc25 Set imports at the start of the string 2021-05-13 15:50:21 +02:00
Daniel
781ef1c9f8 Merge pull request #34 from prayag17/master
Add new option and change the preview for blur
2021-05-13 13:15:17 +02:00
Prayag
6364927f99 Add new option and change the preview for blur 2021-05-13 12:26:26 +05:30
Mister Rajoy
cd8d71ada7 Fix default images 2021-05-12 13:28:55 +02:00
Daniel
247175d753 Merge pull request #33 from prayag17/master
Update/fix few things
2021-05-12 13:15:43 +02:00
Prayag
94f7473108 Add logo theming option for jellyflix 2021-05-12 08:33:51 +05:30
Prayag
f41d67cf39 Add 1 more option 2021-05-12 08:28:43 +05:30
Prayag
68e00efcca Add images for default 2021-05-12 08:23:24 +05:30
Prayag
fc8b88ee6b Merge branch 'master' of https://github.com/prayag17/jellyfin-plugin-skin-manager 2021-05-12 08:08:13 +05:30
Prayag
57c422ff87 Update few things 2021-05-12 07:59:30 +05:30
Prayag
d2f65e0060 Merge pull request #1 from danieladov/master
Update
2021-05-12 07:57:22 +05:30
Mister Rajoy
c15c47111b Fix selectors 2021-05-12 01:35:01 +02:00
Daniel
438f1bd2fa Merge pull request #32 from prayag17/master
Fix position of color picker
2021-05-11 14:11:30 +02:00
Prayag
e31d0e4c13 Fix position of color picker 2021-05-11 17:12:42 +05:30
Daniel
7b0ebf6e32 Merge pull request #31 from prayag17/master
Theme new inputs
2021-05-11 13:12:17 +02:00
Prayag
4d58525fa6 Defaultize custom option's default value 2021-05-11 16:37:44 +05:30
Prayag
0be80d9956 Update batch file 2021-05-11 15:36:14 +05:30
Prayag
5e10675eea Theme new inputs 2021-05-11 14:12:42 +05:30
Mister Rajoy
426782031b Add better colorpicker 2021-05-11 01:38:46 +02:00
Mister Rajoy
814d84f4e6 Fix font picker 2021-05-10 18:45:40 +02:00
Mister Rajoy
82cdcd904a Update skins-3.0.json 2021-05-10 18:20:59 +02:00
Mister Rajoy
edac2f8254 Fix json 2021-05-10 18:13:52 +02:00
Mister Rajoy
1758ffead2 Change font picker 2021-05-10 02:45:31 +02:00
Mister Rajoy
76cbeef6a1 Update skins-3.0.json 2021-05-10 02:45:06 +02:00
Mister Rajoy
b24f0d4b8c Add new fontPicker Files 2021-05-10 02:42:58 +02:00
Daniel
13383919ca Merge pull request #30 from prayag17/master
Add JSON maker
2021-05-02 23:20:27 +02:00
Daniel
583db6ea3d Merge branch 'master' into master 2021-05-02 23:19:38 +02:00
Prayag
0317cc7ef2 make custom look more default without theming 2021-05-02 19:02:56 +05:30
Prayag
ddfb13cf18 Add JSON maker 2021-05-02 18:54:47 +05:30
Daniel
b334cc04df Merge pull request #29 from prayag17/master
Update Json images
2021-04-30 14:44:08 +02:00
Mister Rajoy
6872ddcbf5 Add css tag to Google Font 2021-04-20 14:18:52 +02:00
Prayag
c369e8942f Merge branch 'master' of https://github.com/prayag17/jellyfin-plugin-skin-manager 2021-04-20 09:21:49 +05:30
Prayag
f696f71b55 Add Images for JellyFlix 2021-04-20 09:21:46 +05:30
Prayag
f7759d1418 Merge pull request #1 from danieladov/master
Update
2021-04-20 08:56:21 +05:30
Daniel
da71d56088 Merge pull request #28 from prayag17/master
Add few things
2021-04-19 17:11:27 +02:00
Prayag
372203cf87 Add few things 2021-04-19 20:34:33 +05:30
Mister Rajoy
eefb4080ac Fix rounding 2021-04-16 15:42:12 +02:00
Mister Rajoy
15b16315f0 Fix syntax 2021-04-16 15:32:43 +02:00
Daniel
abe5050ab5 Merge pull request #27 from prayag17/master
Make border-radius css small
2021-04-16 15:30:08 +02:00
Prayag
03e5d663ec Make border-radius css small 2021-04-15 13:04:39 +05:30
Daniel
03e6f99a00 Merge pull request #25 from prayag17/master
Add new features and Update JellySkin
2021-03-29 20:52:03 +02:00
Prayag
0dc14c2191 Add new images for JellySkin 2021-03-29 20:21:17 +05:30
Prayag
9ee68c38dd update 2021-03-26 13:12:23 +05:30
Prayag
55edfbdd77 Delete temp 2021-03-26 10:51:43 +05:30
Prayag
9b610b9c4f Add files via upload 2021-03-26 10:51:29 +05:30
Prayag
8efa7b80b8 Create temp 2021-03-26 10:51:10 +05:30
Prayag
5784ac08c1 Delete 1 2021-03-26 10:50:56 +05:30
Prayag
8159cdd763 Create 1 2021-03-26 10:50:46 +05:30
Prayag
c93dfa61a6 Add New Option to JellySkin 2021-03-26 10:45:30 +05:30
Prayag
5bee383228 Merge pull request #4 from danieladov/master
Fix blur slider data-css
2021-02-19 09:20:57 +05:30
Mister Rajoy
bd5a78b2f3 Fix blur slider data-css 2021-02-14 16:39:42 +01:00
Prayag
24971e9bc2 Merge pull request #3 from danieladov/master
Merge pull request #24 from prayag17/master
2021-02-13 09:39:37 +05:30
Daniel
7f6b80ce65 Merge pull request #24 from prayag17/master
Fix blur slider
2021-02-11 16:07:39 +01:00
Daniel
69f8d1004f Merge branch 'master' into master 2021-02-11 14:55:48 +01:00
Mister Rajoy
f546a35c80 Add Novachromic for older versions 2021-02-11 00:24:32 +01:00
Mister Rajoy
cc5ccb41a0 Change default color of Novachromic 2021-02-10 00:34:49 +01:00
Mister Rajoy
d1e0a7ab35 Add Novachromic skin 2021-02-10 00:29:30 +01:00
Prayag
2861554bb5 Add Novachromic 2021-02-09 08:53:06 +05:30
Mister Rajoy
0e8bf25559 Fix no cors error 2021-02-06 22:43:55 +01:00
Prayag
da4c2824d0 Fix blur slider 2021-02-06 11:49:23 +05:30
Prayag
85cb451ed5 Merge pull request #2 from danieladov/master
update
2021-02-05 08:25:10 +05:30
Mister Rajoy
69da666ceb Merge branch 'master' of https://github.com/danieladov/jellyfin-plugin-skin-manager 2021-02-04 17:54:33 +01:00
Mister Rajoy
4a57c46888 Add blurSliders 2021-02-04 17:54:27 +01:00
Daniel
2e7c07e820 Merge pull request #23 from prayag17/master
Add new CSS options
2021-02-04 16:44:13 +01:00
Daniel
39b9d4b5e5 Fix syntax erros 2021-02-04 16:43:52 +01:00
Prayag
41e1213b8e Merge pull request #1 from danieladov/master
Change to blurSlider
2021-02-04 21:05:24 +05:30
Prayag
0b361706ea Make font select look like default selector of JF 2021-02-04 20:56:02 +05:30
Mister Rajoy
556979db49 Change to blurSlider 2021-02-04 15:10:40 +01:00
Prayag
fd422ef9d6 Update about HTML and CSS 2021-02-03 22:57:07 +05:30
Prayag
9a093fb381 Add new css options 2021-02-03 13:29:34 +05:30
Mister Rajoy
f451411c88 Change Easter Eggs 2021-01-16 15:05:46 +01:00
Daniel
baab039506 Merge pull request #22 from prayag17/master
Font selector theme
2021-01-16 15:03:48 +01:00
Daniel
6ae2cefcf6 Merge branch 'master' into master 2021-01-16 15:03:38 +01:00
Mister Rajoy
577bed8f6b Fix logic 2021-01-16 14:50:17 +01:00
Daniel
60e5920372 Merge branch 'master' into master 2021-01-16 14:29:29 +01:00
Prayag
98c9f1a576 Update JSON 2021-01-16 11:19:48 +05:30
Prayag
2869f6bb00 Update my Repo 2021-01-16 11:11:15 +05:30
Prayag
fafbae507b Update skin-3.0.json 2021-01-14 17:57:17 +05:30
Prayag
7df79b6508 Add more options to Poster cards 2021-01-14 17:44:58 +05:30
Prayag
523097da02 Fix syntax error 2021-01-13 16:02:47 +05:30
Prayag
769ebaf694 Add poster hover effects 2021-01-13 16:02:20 +05:30
Mister Rajoy
a4859c24ca Add google font parser 2021-01-11 03:09:38 +01:00
Mister Rajoy
6132e8827a Update skins-3.0.json 2021-01-11 02:54:09 +01:00
Mister Rajoy
42fae9cffd Update skins-3.0.json 2021-01-11 02:50:18 +01:00
Mister Rajoy
90ac04ca02 Change font selector css 2021-01-11 01:32:12 +01:00
Prayag
db829681d1 Update skins-3.0.json 2021-01-10 21:18:28 +05:30
Prayag
568ff0e048 Make font selector as jellyfin default input 2021-01-10 21:17:37 +05:30
Prayag
07d38f0642 Merge pull request #7 from danieladov/master
Change google font selector
2021-01-10 21:05:05 +05:30
Mister Rajoy
5e3fd1e444 Change google font selector 2021-01-07 13:48:25 +01:00
Prayag
f5ce15889f Update skins-3.0.json 2021-01-07 14:59:28 +05:30
Prayag
ffd5161a00 Merge pull request #6 from danieladov/master
Fix google Fonts
2021-01-07 08:44:49 +05:30
Mister Rajoy
c510b13652 Fix google Fonts 2021-01-07 02:12:28 +01:00
Prayag
3c8c1acadb Update skins-3.0.json 2021-01-06 20:54:27 +05:30
Prayag
d8c66651f9 Merge pull request #5 from danieladov/master
Switch to google fonts api
2021-01-06 20:33:49 +05:30
Prayag
d44fb6e009 Update configurationpage.html 2021-01-06 20:33:37 +05:30
Mister Rajoy
6b6427dc34 Add Google Fonts 2021-01-06 12:42:04 +01:00
Mister Rajoy
09a0077a11 Update skins-3.0.json 2021-01-05 15:08:21 +01:00
Mister Rajoy
39f105953e Add google Fonts 2021-01-05 15:05:46 +01:00
Prayag
650a5ff32b Update configurationpage.html 2021-01-04 20:47:05 +05:30
Prayag
106655c5ff Merge pull request #4 from danieladov/master
Merge pull request #20 from prayag17/master
2020-12-30 14:20:47 +05:30
Daniel
3dd71d66e7 Merge pull request #20 from prayag17/master
Fix set skin for skin having options
2020-12-29 23:36:44 +01:00
Prayag
9a86e3c4ed Update help.html 2020-12-29 21:47:01 +05:30
Prayag
9c0429fceb Fix Syntax 2020-12-26 21:20:02 +05:30
Prayag
28f2244e97 Update skins-3.0.json 2020-12-26 21:16:27 +05:30
Prayag
c68e663b61 Change the selectors to Array like objects 2020-12-26 20:56:23 +05:30
Prayag
0c08d71061 Merge pull request #3 from danieladov/master
Fix toolTip
2020-12-26 09:32:01 +05:30
Mister Rajoy
a75a99d6b7 Fix toolTip 2020-12-25 17:57:59 +01:00
Prayag
383d8201ff Merge pull request #2 from danieladov/master
Fix HTML
2020-12-25 16:53:07 +05:30
Prayag
000e629378 change the info icon 2020-12-25 14:58:09 +05:30
Prayag
5b2fc436b3 add color selector css 2020-12-25 14:56:19 +05:30
Mister Rajoy
058f1ad43b Fix typos 2020-12-24 20:05:45 +01:00
Daniel
0781fdcb24 Merge pull request #19 from prayag17/master
Add help and about HTML
2020-12-24 19:30:34 +01:00
Prayag
10f48817ab Update about.html 2020-12-24 21:54:42 +05:30
Prayag
1b920fbf2b Fix help.html 2020-12-24 21:29:42 +05:30
Prayag
471e75484d add help html 2020-12-24 21:28:56 +05:30
Prayag
ffff83d5e5 Update about.html 2020-12-24 21:26:10 +05:30
Prayag
8e468d19be Update help.html 2020-12-24 21:25:20 +05:30
Prayag
0f6bfbfce8 Update help.html 2020-12-24 21:24:30 +05:30
Prayag
67dee46994 add HTML files 2020-12-24 21:21:21 +05:30
Prayag
4c9eafeae3 Merge pull request #1 from danieladov/master
Add tooltips
2020-12-24 21:17:39 +05:30
Mister Rajoy
e2a020fd2a Add tooltips 2020-12-24 13:19:11 +01:00
Mister Rajoy
80ae268a8d Change selector syntax 2020-12-23 12:45:56 +01:00
Mister Rajoy
87e1c6fcf5 Fix previews grouping with last categorie 2020-12-22 16:28:23 +01:00
Mister Rajoy
eb933dba57 Merge branch 'master' of https://github.com/danieladov/jellyfin-plugin-skin-manager 2020-12-22 16:23:26 +01:00
Mister Rajoy
50164fe5af Fix load and save config 2020-12-22 16:23:08 +01:00
Daniel
e2a94a1f4e Merge pull request #17 from prayag17/master
Categorize Options
2020-12-22 16:22:31 +01:00
Prayag
7d3911fb08 Fix JSON 2020-12-22 19:27:19 +05:30
Prayag
cdaca9d393 Merge pull request #4 from danieladov/master
Fieldsets and new JSON structure support
2020-12-21 19:49:17 +05:30
Mister Rajoy
addca19af3 Fieldsets and new JSON structure support 2020-12-21 11:18:00 +01:00
Prayag
6223cb6f18 Change JSON structure (again) 2020-12-21 14:22:21 +05:30
Prayag
5acc963a56 Revert Json Structure 2020-12-21 13:59:21 +05:30
Prayag
ab116bd4c7 Merge pull request #3 from danieladov/master
Add fieldsets
2020-12-21 13:57:05 +05:30
Mister Rajoy
80b9b3e651 Add fieldsets 2020-12-20 13:02:11 +01:00
Prayag
693438254d Change JSON structure to divide the custom option in categories 2020-12-18 10:00:27 +05:30
Prayag
dd75463857 Merge pull request #2 from danieladov/master
Save your current options
2020-12-16 08:45:29 +05:30
Mister Rajoy
0605248f2f Add save option 2020-12-15 16:28:53 +01:00
Mister Rajoy
aa2dfed793 Merge branch 'master' of https://github.com/danieladov/jellyfin-plugin-skin-manager 2020-12-15 15:58:18 +01:00
Mister Rajoy
bd4775cf8f Add comment to Custom 2020-12-15 15:58:06 +01:00
Daniel
8ff2b10aaf Merge pull request #15 from prayag17/master
Easy install batch file for windows
2020-12-15 15:53:39 +01:00
Prayag
d266fd109e Fix move 2020-12-15 20:21:32 +05:30
Prayag
8b8d948ba1 add very simple batch file for easy install 2020-12-14 13:55:41 +05:30
Prayag
d6e8ed3d43 Merge pull request #1 from danieladov/master
Preload images
2020-12-14 07:41:01 +05:30
Mister Rajoy
db40ecba08 Update configurationpage.html 2020-12-13 21:16:33 +01:00
Mister Rajoy
97da2905de Add name to colorpickers 2020-12-13 21:03:00 +01:00
Mister Rajoy
f71e386412 Add sections 2020-12-13 20:51:54 +01:00
Mister Rajoy
e1d361b544 Add image preload 2020-12-13 19:49:18 +01:00
Mister Rajoy
17382207de Update skins-3.0.json 2020-12-12 15:54:43 +01:00
Mister Rajoy
c8649eef6b Update config 2020-12-12 15:48:53 +01:00
Mister Rajoy
d8d343fe1a Update skins-3.0.json 2020-12-12 15:38:40 +01:00
Daniel
1450ce5974 Merge pull request #13 from prayag17/master
Fix Border radius for custom
2020-12-12 11:50:13 +01:00
Prayag
78aeadff4f Fix Border radius for custom 2020-12-12 11:50:50 +05:30
Mister Rajoy
48b9cd3e95 Update Jellyfin.Plugin.SkinManager.csproj 2020-12-11 22:05:45 +01:00
Mister Rajoy
c3566e30f7 Update skins-3.0.json 2020-12-11 21:59:45 +01:00
Mister Rajoy
1ef6cf899f Change images path 2020-12-11 17:58:12 +01:00
Mister Rajoy
c39f16e983 Move images 2020-12-11 17:55:10 +01:00
Daniel
9ef4b40110 Merge pull request #12 from danieladov/cssEditor
Add Css editor
2020-12-11 17:53:25 +01:00
Daniel
df8f15ad1c Merge branch 'master' into cssEditor 2020-12-11 17:53:03 +01:00
Daniel
23b12cc3ea Merge pull request #11 from prayag17/cssEditor
Theming Previews
2020-12-11 17:49:55 +01:00
Prayag
4ff7da8772 Beautify JSON 2020-12-11 21:27:42 +05:30
Prayag
b987503f86 Change font size of legend 2020-12-11 21:25:09 +05:30
Prayag
2162b79309 Themed Preview 2020-12-11 21:23:07 +05:30
Prayag
dce0da67ff Add more images 2020-12-11 21:19:23 +05:30
Mister Rajoy
9924e23b0d Add preview section title 2020-12-11 16:46:05 +01:00
Prayag
1269a4dec3 Add non present images 2020-12-11 21:14:38 +05:30
Prayag
3e465cf4c8 Merge pull request #8 from danieladov/cssEditor
Css editor
2020-12-11 21:13:59 +05:30
Prayag
b9511d2501 Fix code 2020-12-11 21:13:47 +05:30
Mister Rajoy
1cb7b215ab Bugs Fixed 2020-12-11 16:30:38 +01:00
Prayag
435c256ec3 Theme previews 2020-12-11 20:50:27 +05:30
Daniel
0d1b0ceb76 Merge pull request #10 from prayag17/cssEditor
Preview Images
2020-12-11 16:15:38 +01:00
Prayag
93b25fc4f1 Add names to previews and fix the size of images 2020-12-11 20:40:45 +05:30
Prayag
6f18c554f7 Merge pull request #7 from danieladov/cssEditor
Css editor
2020-12-11 19:04:51 +05:30
Prayag
5e8c3e00d6 Add image links 2020-12-11 19:04:17 +05:30
Mister Rajoy
468334bb0b Add preview support 2020-12-11 12:36:10 +01:00
Mister Rajoy
63d3de9bfa Fix Json 2020-12-11 12:12:14 +01:00
Mister Rajoy
2acab28803 Add previews to JSON 2020-12-11 12:05:13 +01:00
Prayag
1b19253875 Merge pull request #6 from danieladov/cssEditor
Fix color fallback
2020-12-10 13:41:57 +05:30
Mister Rajoy
4b40c1a784 Fix color fallback 2020-12-09 19:27:37 +01:00
Daniel
6b8e6738b4 Merge pull request #9 from nichobi/patch-1
Correct help link to point to the right plugin
2020-12-09 14:11:22 +01:00
Nicholas Boyd Isacsson
c9c890a7f0 Correct help link to point to the right plugin 2020-12-09 13:43:13 +01:00
Prayag
7900d7a0dc Merge pull request #5 from danieladov/patch-4
Fix syntax errors
2020-12-08 21:15:01 +05:30
Daniel
609763b281 Merge pull request #4 from CTalvio/master
Add a couple typical presets for add-ons
2020-11-09 23:31:48 +01:00
Casper Talvio
5357ab3c1c Update skins-2.0.json 2020-11-10 00:08:43 +02:00
Casper Talvio
a31f13816f Update skins-2.0.json 2020-11-10 00:07:35 +02:00
Casper Talvio
d1a3dbc74f Update skins-2.0.json 2020-11-10 00:03:51 +02:00
Casper Talvio
39c1d9d4ff Update skins-2.0.json 2020-11-09 23:21:20 +02:00
23 changed files with 12408 additions and 523 deletions

View File

@@ -1,14 +1,18 @@
using MediaBrowser.Model.Plugins; using MediaBrowser.Model.Plugins;
using System;
using System.Collections.Generic;
namespace Jellyfin.Plugin.SkinManager.Configuration namespace Jellyfin.Plugin.SkinManager.Configuration
{ {
public class PluginConfiguration : BasePluginConfiguration public class PluginConfiguration : BasePluginConfiguration
{ {
public string selectedCss { get; set; } public string selectedSkin { get; set; }
public string[] options { get; set; }
public PluginConfiguration() public PluginConfiguration()
{ {
selectedCss = ""; selectedSkin = "";
options = Array.Empty<String>();
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -3,8 +3,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<IsPackable>true</IsPackable> <IsPackable>true</IsPackable>
<AssemblyVersion>1.4.0</AssemblyVersion> <AssemblyVersion>2.0.1</AssemblyVersion>
<FileVersion>1.4.0</FileVersion> <FileVersion>2.0.1</FileVersion>
<Authors /> <Authors />
<Company /> <Company />
</PropertyGroup> </PropertyGroup>
@@ -16,6 +16,9 @@
<ItemGroup> <ItemGroup>
<None Remove="Configuration\configurationpage.html" /> <None Remove="Configuration\configurationpage.html" />
<EmbeddedResource Include="Configuration\configurationpage.html" /> <EmbeddedResource Include="Configuration\configurationpage.html" />
<None Remove="Configuration\fontpicker.js" />
<EmbeddedResource Include="Configuration\fontpicker.js" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -34,6 +34,16 @@ namespace Jellyfin.Plugin.SkinManager
{ {
Name = "SkinManager", Name = "SkinManager",
EmbeddedResourcePath = GetType().Namespace + ".Configuration.configurationpage.html" EmbeddedResourcePath = GetType().Namespace + ".Configuration.configurationpage.html"
},
new PluginPageInfo
{
Name = "fontpicker.js",
EmbeddedResourcePath = GetType().Namespace + ".Configuration.fontpicker.js"
},
new PluginPageInfo
{
Name = "fontpicker.css",
EmbeddedResourcePath = GetType().Namespace + ".Configuration.jquery.fontpicker.min.css"
} }
}; };
} }

View File

@@ -1,5 +1,5 @@
<h1 align="center">Jellyfin Skin Manager Plugin</h1> <h1 align="center">Jellyfin Skin Manager Plugin</h1>
<h3 align="center">Part of the <a href="https://jellyfin.media">Jellyfin Project</a></h3> <h3 align="center">Part of the <a href="https://jellyfin.org">Jellyfin Project</a></h3>
<p align="center"> <p align="center">
Jellyfin Skin Manager is a plugin that helps you to download and install skins; Jellyfin Skin Manager is a plugin that helps you to download and install skins;

10
install.bat Normal file
View File

@@ -0,0 +1,10 @@
@ECHO OFF
@echo This will not work if you have installed jellyfin to a custom location
set /p ask = Enter 'X' to continue or 'C' to cancel:
if "%ask%" neq "x" goto:eof
@echo starting install...
dotnet publish --configuration Release --output bin
move bin\Jellyfin.Plugin.SkinManager.dll C:\ProgramData\Jellyfin\Server\plugins\SkinManager

View File

@@ -5,7 +5,7 @@
"versions": [ "versions": [
{ {
"name": "Default", "name": "Default",
"description":"Default Skin", "description":"Default, stock, Jellyfin.",
"css": "" "css": ""
} }
] ]
@@ -16,7 +16,7 @@
"versions": [ "versions": [
{ {
"name": "Default", "name": "Default",
"description":"Default Skin", "description":"A theme that aims to replicate the red and black look of Netflix. Theme is by prayag17.",
"css": "@import url(https://prayag17.github.io/JellyFlix/default.css);" "css": "@import url(https://prayag17.github.io/JellyFlix/default.css);"
} }
] ]
@@ -27,33 +27,33 @@
"versions": [ "versions": [
{ {
"name": "Default", "name": "Default",
"description": "Default Skin", "description": "This theme aims to be minimalistic and somewhat muted in color. Add-ons and custom accent colors are possible, but not entirely supported by this plug-in. Visit the github of the theme for more information.",
"css": "@import url(https://ctalvio.github.io/Monochromic/default_style.css);" "css": "@import url(https://ctalvio.github.io/Monochromic/default_style.css); @import url('https://ctalvio.github.io/Monochromic/improve-performance_style.css');"
}, },
{ {
"name": "Improve performance", "name": "Sharp corners",
"description": "The theme uses mask-image to fade out items below the top bar as you scroll. This works well on most reasonable hardware but struggles on some phones and especially smart TVs. This switches to a method without using mask-image, but foregoes the fade-out effect. I may switch to this method being the default.", "description": "No rounded corners.",
"css": "@import url('https://ctalvio.github.io/Monochromic/improve-performance_style.css');" "css": "@import url(https://ctalvio.github.io/Monochromic/default_style.css); @import url('https://ctalvio.github.io/Monochromic/improve-performance_style.css'); :root {--rounding: 0px;}"
}, },
{ {
"name": "No rounded corners", "name": "Accent color - blue",
"description": "In fact, squares off every rounded corner JF ever had.", "description": "Uses the default blue color for accents.",
"css": "@import url('https://ctalvio.github.io/Monochromic/sharp_style.css');" "css": "@import url(https://ctalvio.github.io/Monochromic/default_style.css); @import url('https://ctalvio.github.io/Monochromic/improve-performance_style.css'); @import url('https://ctalvio.github.io/Monochromic/jfblue_style.css');"
}, },
{ {
"name": "Accent color preset - blue", "name": "Accent color - purple",
"description": "Restores some of the default Jellyfin blue accenting", "description": "Uses a purple shade, also suited for Jellyfin.",
"css": "@import url('https://ctalvio.github.io/Monochromic/jfblue_style.css');" "css": "@import url(https://ctalvio.github.io/Monochromic/default_style.css); @import url('https://ctalvio.github.io/Monochromic/improve-performance_style.css'); @import url('https://ctalvio.github.io/Monochromic/jfpurple_style.css');"
}, },
{ {
"name": "Accent color preset - purple", "name": "Accent color - blue - sharp",
"description": "Purple Accents", "description": "Uses the default blue color for accents. Sharp corners.",
"css": "@import url('https://ctalvio.github.io/Monochromic/jfpurple_style.css'); );" "css": "@import url(https://ctalvio.github.io/Monochromic/default_style.css); @import url('https://ctalvio.github.io/Monochromic/improve-performance_style.css'); @import url('https://ctalvio.github.io/Monochromic/jfblue_style.css'); :root {--rounding: 0px;}"
}, },
{ {
"name": "Restore bottom bar style episode progress", "name": "Accent color - purple - sharp",
"description": "Don't like my transparent view progress overlay? Use this to go back to the old style.", "description": "Uses a purple shade, also suited for Jellyfin. Sharp corners.",
"css": "@import url('https://ctalvio.github.io/Monochromic/bottom-progress_style.css');" "css": "@import url(https://ctalvio.github.io/Monochromic/default_style.css); @import url('https://ctalvio.github.io/Monochromic/improve-performance_style.css'); @import url('https://ctalvio.github.io/Monochromic/jfpurple_style.css'); :root {--rounding: 0px;}"
} }
] ]
}, },
@@ -63,20 +63,46 @@
"versions": [ "versions": [
{ {
"name": "Default", "name": "Default",
"description":"Default Skin", "description": "This theme aims to be more colorful and minimalistic. Add-ons and custom accent colors are possible, but not entirely supported by this plug-in. Visit the github of the theme for more information.",
"css": "@import url(https://ctalvio.github.io/Kaleidochromic/default_style.css);" "css": "@import url(https://ctalvio.github.io/Kaleidochromic/default_style.css); @import url('https://ctalvio.github.io/Monochromic/improve-performance_style.css');"
},
{
"name": "Sharp corners",
"description": "No rounded corners.",
"css": "@import url(https://ctalvio.github.io/Kaleidochromic/default_style.css); @import url('https://ctalvio.github.io/Monochromic/improve-performance_style.css'); :root {--rounding: 0px;}"
},
{
"name": "Accent color - blue",
"description": "Uses the default blue color for accents.",
"css": "@import url(https://ctalvio.github.io/Kaleidochromic/default_style.css); @import url('https://ctalvio.github.io/Monochromic/improve-performance_style.css'); @import url('https://ctalvio.github.io/Monochromic/jfblue_style.css');"
},
{
"name": "Accent color - blue - sharp",
"description": "Uses the default blue color for accents. Sharp corners.",
"css": "@import url(https://ctalvio.github.io/Kaleidochromic/default_style.css); @import url('https://ctalvio.github.io/Monochromic/improve-performance_style.css'); @import url('https://ctalvio.github.io/Monochromic/jfblue_style.css'); :root {--rounding: 0px;}"
} }
] ]
}, },
{
"name": "Novachromic",
"author": "EdgeMentality",
"versions":[
{
"name": "Default",
"description": "Novachromic is essentially Monochromic, but with another layer of overrides on top.",
"css" : "@import url('https://ctalvio.github.io/Novachromic/default_style.css');"
}
]
},
{ {
"name": "JellySkin", "name": "JellySkin",
"author": "prayagprajapati17", "author": "prayagprajapati17",
"versions": [ "versions": [
{ {
"name": "Default", "name": "Default",
"description":"Default Skin", "description":"A very bright and colorful look using lots of drop shadows. Theme is by prayag17.",
"css": "@import url('https://prayag17.github.io/JellySkin/default.css');" "css": "@import url('https://prayag17.github.io/JellySkin/default.css');"
} }
] ]
} }
] ]

File diff suppressed because it is too large Load Diff

68
src/html/about.html Normal file
View File

@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Skin Manager-About</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" href="https://jellyfin.org/favicon.ico">
</head>
<body>
<div class="header" align="center">
<div class="innerHeader nav">
<a href="https://github.com/danieladov/jellyfin-plugin-skin-manager" class="link text"><li>See on Github</li></a>
<a href="https://github.com/danieladov/jellyfin-plugin-skin-manager/issues" class="link text"><li>Request a skin</li></a>
<a href="https://prayag17.github.io/jellyfin-plugin-skin-manager/" class="link text"><li class="selected">About</li></a>
<a href="https://jellyfin.org" class="logo link"><li><img src="https://jellyfin.org/images/banner-dark.svg" style="size: 1em;height: 50px;max-width: 80%;float: right;z-index: 1;"></li></a>
</div>
</div>
<div class="body">
<div class="About">
<div class="inner">
<h1>About Skin Manager</h1>
<div class="description">
<p>
This plugin is used to create custom skins and also give you (the user) few great community Skins. You can add more skins by clicking on the "Request a Skin" button.
</p>
</div>
</div>
<div class="contributorsCont">
<fieldset>
<h3>Contributors</h3>
<p>The people who have helped in the development of this plugin are listed below</p>
<div class="cont">
<a href="https://github.com/danieladov" class="contributorsLink">
<div class="contibutorsNames" style="background:linear-gradient(180deg, #c4c4c4ab, #c4c4c4ab), url(https://avatars2.githubusercontent.com/u/29411250?s=400&v=4);">
<div class="top">
<h3>Daniel Álvarez</h3>
</div>@danieladov
<p class="description">
He is the creator of 3 Plugins for Jellyfin, namely- Merge Songs, Theme Music and Skin Manager
</p>
</div>
</a>
<a href="https://github.com/prayag17" class="contributorsLink">
<div class="contibutorsNames" style="margin-left: 3em;background:linear-gradient(180deg, #c4c4c4ab, #c4c4c4ab), url(https://avatars1.githubusercontent.com/u/55829513?s=460&u=3f232a3900ade07490ae8bdadd62ec5d0e9e4ecf&v=4);">
<div class="top">
<h3>Prayag Prajapati</h3>
</div>@prayag17
<p class="description">
He is the creator of 2 jellyfin Skins, namely- JellySkin and JellyFlix. He has helped in creating the "Custom" option in this plugin.
</p>
</div>
</a>
<a href="https://github.com/prayag17" class="contributorsLink">
<div class="contibutorsNames" style="margin-left: 3em;background:linear-gradient(180deg, #c4c4c4ab, #c4c4c4ab), url(https://avatars2.githubusercontent.com/u/4365015?s=400&v=4);">
<div class="top">
<h3>Casper Talvio</h3>
</div>@CTalvio
<p class="description">
He is the creator of 2 jellyfin Skins namely- Monochromic and Kaleidochromic.
</p>
</div>
</a>
</div>
</fieldset>
</div>
</div>
</body>
</html>

48
src/html/help.html Normal file
View File

@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Skin Manager-Help</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" href="https://jellyfin.org/favicon.ico">
</head>
<body>
<div class="header" align="center">
<div class="innerHeader nav">
<a href="https://github.com/danieladov/jellyfin-plugin-skin-manager" class="link text"><li>See on Github</li></a>
<a href="https://github.com/danieladov/jellyfin-plugin-skin-manager/issues" class="link text"><li>Request a skin</li></a>
<a href="https://prayag17.github.io/jellyfin-plugin-skin-manager/src/html/about.html#" class="link text"><li>About</li></a>
<a href="https://jellyfin.org" class="logo link"><li><img src="https://jellyfin.org/images/banner-dark.svg" style="size: 1em;height: 50px;max-width: 80%;float: right;z-index: 1;"></li></a>
</div>
</div>
<div class="body" style="color: #3a3a3a !important;">
<div class="skinRequest">
<fieldset>
<h1>How To request a new Skin</h1>
<div class="internal">
<h3>Steps</h3>
<br>
<ul>
<li>Open this<a href="https://github.com/danieladov/jellyfin-plugin-skin-manager/issues" class="link" style="color: #3a3a3a !important; text-decoration: underline;"> link </a>or click the "Request a Skin" option present in the header</li>
<li>Then Create a New Issue with title- <code>Skin Request:</code> Done!</li>
</ul>
</div>
</fieldset>
<fieldset>
<h1>How to enable bluring of background fo dialogs and episode previes for Firefox</h1>
<div class="internal">
<h3>Steps</h3>
<br>
<ul>
<li>go to <a href="about:config"> about:config </a>in firefox and click on "Accept the Risk and Continue".</li>
<li>Search for <code>layout.css.backdrop-filter.enabled</code> and change false to true.</li>
<li>Search for <code>gfx.webrender.all</code> and change it to true. Done!</li>
</ul>
</div>
</fieldset>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,30 @@
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.js" integrity="sha512-n/4gHW3atM3QqRcbCn6ewmpxcLAHGaDjpEBu4xZd47N0W2oQ+6q7oc3PXstrJYXcbNU1OHdQ1T7pAP+gi5Yu8g==" crossorigin="anonymous"></script>
<script src="../js/json__compile.js"></script>
</head>
<body>
<div>
<form>
<input type="text" id="name" name="name">
<input type="text" id="author" name="author">
<input type=" text " id="desc" name="desc">
<input type=" text " id="css" name="css">
<h2>Images</h2>
<input type=" text " id="login" name="login">
<input type=" text " id="home" name="home">
<input type=" text " id="lib" name="lib">
<input type=" text " id="title" name="title">
<h2>Categories</h2>
<input type="button" id="add" value="Add a foryour options categorie" onclick="add__option()">
<input type="button" id="no_op" value="Don't have any options/addons?" onclick="no__option()">
<div id="cat"></div>
<input type="hidden" value="1" id="total_chq">
<input type="button" onclick="createJSON()" value="save" />
</form>
</div>
</body>
</html>

107
src/html/style.css Normal file
View File

@@ -0,0 +1,107 @@
body{
margin: 0;
font-family: Arial;
}
.body {
margin: 2em;
}
.header {
height: 80px;
width: 100%;
background: #101010;
display: block;
top: 0;
position: sticky;
}
.innerHeader {
height: 100%;
margin: 0 1.5em;
display: block;
}
.nav a{
display: table;
height: 100%;
float: right;
padding: 0px 10px !important;
}
.nav a li {
vertical-align: middle;
display: table-cell;
}
fieldset {
border-radius: 15px;
background: #dadada;
border: none;
padding: 1em;
margin-top: 2em;
}
.link{
text-decoration: none;
color: white;
}
a.logo.link {
float: left;
}
.About {
margin: 2em;
}
.inner {
background: #c4c4c4;
padding: 1em;
border-radius: 15px;
color: #3a3a3a;
}
a {
text-decoration: none;
color: black;
}
.cont {
display: flex;
}
.contibutorsNames {
padding: 1em;
border-radius: 15px;
width: fit-content;
max-width: 10em;
min-width: 10em;
flex-wrap: wrap;
height: fit-content;
transition: all .2s;
max-height: 20em;
min-height: 15em;
background-size: cover !important;
}
.contibutorsNames:hover {
box-shadow: 0 3px 5px 0px #6e6e6e;
transform: translateY(-2px);
}
.contributorsLink {
color: #3a3a3a !important;
}
.text li {
color: #9a9a9a;
transition: color .25s, border .25s;
border-bottom: 5px solid rgba(0,0,0,0);
}
.text li:hover {
color: white !important;
border-bottom-color: #00a4dc !important;
}
.selected {
color: white !important;
border-bottom-color: #aa5cc3 !important;
}
img.userImg {
width: 50%;
border-radius: 15px;
}
code {
display: block !important;
width: fit-content;
background: #585858;
color: white;
padding: .5rem;
border-radius: 5.5px;
border: .5px solid #999999;
}

BIN
src/img/Default/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
src/img/Default/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
src/img/Default/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

BIN
src/img/Default/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
src/img/Monochromic/Lib.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
src/img/thumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

641
src/js/FontPicker.js Normal file
View File

@@ -0,0 +1,641 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.FontPicker = factory());
}(this, (function () { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
function styleInject(css, ref) {
if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt;
if (!css || typeof document === 'undefined') { return; }
var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
if (insertAt === 'top') {
if (head.firstChild) {
head.insertBefore(style, head.firstChild);
} else {
head.appendChild(style);
}
} else {
head.appendChild(style);
}
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
}
var css = "@charset \"UTF-8\";\ndiv[id^=font-picker] {\n position: relative;\n display: inline-block;\n width: 200px;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);\n}\ndiv[id^=font-picker] * {\n box-sizing: border-box;\n}\ndiv[id^=font-picker] p {\n margin: 0;\n padding: 0;\n}\ndiv[id^=font-picker] button {\n color: inherit;\n font-size: inherit;\n background: none;\n border: 0;\n outline: none;\n cursor: pointer;\n}\ndiv[id^=font-picker] .dropdown-button {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 35px;\n padding: 0 10px;\n background: #cbcbcb;\n}\ndiv[id^=font-picker] .dropdown-button:hover, div[id^=font-picker] .dropdown-button:focus {\n background: #bebebe;\n}\ndiv[id^=font-picker] .dropdown-button .dropdown-font-name {\n overflow: hidden;\n white-space: nowrap;\n}\ndiv[id^=font-picker] .dropdown-icon {\n margin-left: 10px;\n}\n@-webkit-keyframes spinner {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes spinner {\n to {\n transform: rotate(360deg);\n }\n}\ndiv[id^=font-picker] .dropdown-icon.loading::before {\n display: block;\n width: 10px;\n height: 10px;\n border: 2px solid #b2b2b2;\n border-top-color: #000000;\n border-radius: 50%;\n -webkit-animation: spinner 0.6s linear infinite;\n animation: spinner 0.6s linear infinite;\n content: \"\";\n}\ndiv[id^=font-picker] .dropdown-icon.finished::before {\n display: block;\n width: 0;\n height: 0;\n margin: 0 2px;\n border-top: 6px solid #000000;\n border-right: 5px solid transparent;\n border-left: 5px solid transparent;\n transition: transform 0.3s;\n content: \"\";\n}\ndiv[id^=font-picker] .dropdown-icon.error::before {\n content: \"⚠\";\n}\ndiv[id^=font-picker].expanded .dropdown-icon.finished::before {\n transform: rotate(-180deg);\n}\ndiv[id^=font-picker].expanded ul {\n max-height: 200px;\n}\ndiv[id^=font-picker] ul {\n position: absolute;\n z-index: 1;\n width: 100%;\n max-height: 0;\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n background: #eaeaea;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);\n transition: 0.3s;\n -webkit-overflow-scrolling: touch;\n}\ndiv[id^=font-picker] ul li {\n height: 35px;\n list-style: none;\n}\ndiv[id^=font-picker] ul li button {\n display: flex;\n align-items: center;\n width: 100%;\n height: 100%;\n padding: 0 10px;\n white-space: nowrap;\n}\ndiv[id^=font-picker] ul li button:hover, div[id^=font-picker] ul li button:focus {\n background: #dddddd;\n}\ndiv[id^=font-picker] ul li button.active-font {\n background: #d1d1d1;\n}";
styleInject(css);
function getFontId(fontFamily) {
return fontFamily.replace(/\s+/g, "-").toLowerCase();
}
function validatePickerId(pickerId) {
if (pickerId.match(/[^0-9a-z]/i)) {
throw Error("The `pickerId` parameter may only contain letters and digits");
}
}
function get(url) {
return new Promise(function (resolve, reject) {
var request = new XMLHttpRequest();
request.overrideMimeType("application/json");
request.open("GET", url, true);
request.onreadystatechange = function () {
if (request.readyState === 4) {
if (request.status !== 200) {
reject(new Error("Response has status code " + request.status));
}
else {
resolve(request.responseText);
}
}
};
request.send();
});
}
var LIST_BASE_URL = "https://www.googleapis.com/webfonts/v1/webfonts";
function getFontList(apiKey) {
return __awaiter(this, void 0, void 0, function () {
var url, response, json, fontsOriginal;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
url = new URL(LIST_BASE_URL);
url.searchParams.append("sort", "popularity");
url.searchParams.append("key", apiKey);
return [4, get(url.href)];
case 1:
response = _a.sent();
json = JSON.parse(response);
fontsOriginal = json.items;
return [2, fontsOriginal.map(function (fontOriginal) {
var family = fontOriginal.family, subsets = fontOriginal.subsets, others = __rest(fontOriginal, ["family", "subsets"]);
return __assign(__assign({}, others), { family: family, id: getFontId(family), scripts: subsets });
})];
}
});
});
}
var previewFontsStylesheet = document.createElement("style");
document.head.appendChild(previewFontsStylesheet);
function applyFontPreview(previewFont, selectorSuffix) {
var fontId = getFontId(previewFont.family);
var style = "\n\t\t\t#font-button-" + fontId + selectorSuffix + " {\n\t\t\t\tfont-family: \"" + previewFont.family + "\";\n\t\t\t}\n\t\t";
previewFontsStylesheet.appendChild(document.createTextNode(style));
}
function getActiveFontStylesheet(selectorSuffix) {
var stylesheetId = "active-font-" + selectorSuffix;
var activeFontStylesheet = document.getElementById(stylesheetId);
if (!activeFontStylesheet) {
activeFontStylesheet = document.createElement("style");
activeFontStylesheet.id = stylesheetId;
document.head.appendChild(activeFontStylesheet);
}
return activeFontStylesheet;
}
function applyActiveFont(activeFont, previousFontFamily, selectorSuffix) {
var style = "\n\t\t.apply-font" + selectorSuffix + " {\n\t\t\tfont-family: \"" + activeFont.family + "\"" + (previousFontFamily ? ", \"" + previousFontFamily + "\"" : "") + ";\n\t\t}\n\t";
var activeFontStylesheet = getActiveFontStylesheet(selectorSuffix);
activeFontStylesheet.innerHTML = style;
}
var PREVIEW_ATTRIBUTE_NAME = "data-is-preview";
function getStylesheetId(fontId) {
return "font-" + fontId;
}
function stylesheetExists(fontId, isPreview) {
var stylesheetNode = document.getElementById(getStylesheetId(fontId));
if (isPreview === null || isPreview === undefined) {
return stylesheetNode !== null;
}
return (stylesheetNode !== null &&
stylesheetNode.getAttribute(PREVIEW_ATTRIBUTE_NAME) === isPreview.toString());
}
function createStylesheet(fontId, isPreview) {
var stylesheetNode = document.createElement("style");
stylesheetNode.id = getStylesheetId(fontId);
stylesheetNode.setAttribute(PREVIEW_ATTRIBUTE_NAME, isPreview.toString());
document.head.appendChild(stylesheetNode);
}
function fillStylesheet(fontId, styles) {
var stylesheetId = getStylesheetId(fontId);
var stylesheetNode = document.getElementById(stylesheetId);
if (stylesheetNode) {
stylesheetNode.textContent = styles;
}
else {
console.error("Could not fill stylesheet: Stylesheet with ID \"" + stylesheetId + "\" not found");
}
}
function setStylesheetType(fontId, isPreview) {
var stylesheetId = getStylesheetId(fontId);
var stylesheetNode = document.getElementById(stylesheetId);
if (stylesheetNode) {
stylesheetNode.setAttribute(PREVIEW_ATTRIBUTE_NAME, isPreview.toString());
}
else {
console.error("Could not change stylesheet type: Stylesheet with ID \"" + stylesheetId + "\" not found");
}
}
function getMatches(regex, str) {
var matches = [];
var match;
do {
match = regex.exec(str);
if (match) {
matches.push(match[1]);
}
} while (match);
return matches;
}
var FONT_FACE_REGEX = /@font-face {([\s\S]*?)}/gm;
var FONT_FAMILY_REGEX = /font-family: ['"](.*?)['"]/gm;
function extractFontStyles(allFontStyles) {
var rules = getMatches(FONT_FACE_REGEX, allFontStyles);
var fontStyles = {};
rules.forEach(function (rule) {
var fontFamily = getMatches(FONT_FAMILY_REGEX, rule)[0];
var fontId = getFontId(fontFamily);
if (!(fontId in fontStyles)) {
fontStyles[fontId] = "";
}
fontStyles[fontId] += "@font-face {\n" + rule + "\n}\n\n";
});
return fontStyles;
}
var FONT_BASE_URL = "https://fonts.googleapis.com/css";
function getStylesheet(fonts, scripts, variants, previewsOnly) {
return __awaiter(this, void 0, void 0, function () {
var url, variantsStr, familiesStr, familyNamesConcat, downloadChars;
return __generator(this, function (_a) {
url = new URL(FONT_BASE_URL);
variantsStr = variants.join(",");
familiesStr = fonts.map(function (font) { return font.family + ":" + variantsStr; });
url.searchParams.append("family", familiesStr.join("|"));
url.searchParams.append("subset", scripts.join(","));
if (previewsOnly) {
familyNamesConcat = fonts.map(function (font) { return font.family; }).join("");
downloadChars = familyNamesConcat
.split("")
.filter(function (char, pos, self) { return self.indexOf(char) === pos; })
.join("");
url.searchParams.append("text", downloadChars);
}
url.searchParams.append("font-display", "swap");
return [2, get(url.href)];
});
});
}
function loadFontPreviews(fonts, scripts, variants, selectorSuffix) {
return __awaiter(this, void 0, void 0, function () {
var fontsArray, fontsToFetch, response, fontStyles;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
fontsArray = Array.from(fonts.values());
fontsToFetch = fontsArray
.map(function (font) { return font.id; })
.filter(function (fontId) { return !stylesheetExists(fontId); });
fontsToFetch.forEach(function (fontId) { return createStylesheet(fontId, true); });
return [4, getStylesheet(fontsArray, scripts, variants, true)];
case 1:
response = _a.sent();
fontStyles = extractFontStyles(response);
fontsArray.forEach(function (font) {
applyFontPreview(font, selectorSuffix);
if (fontsToFetch.includes(font.id)) {
if (!(font.id in fontStyles)) {
console.error("Missing styles for font \"" + font.family + "\" (fontId \"" + font.id + "\") in Google Fonts response");
return;
}
fillStylesheet(font.id, fontStyles[font.id]);
}
});
return [2];
}
});
});
}
function loadActiveFont(font, previousFontFamily, scripts, variants, selectorSuffix) {
return __awaiter(this, void 0, void 0, function () {
var fontStyle;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!stylesheetExists(font.id, false)) return [3, 1];
applyActiveFont(font, previousFontFamily, selectorSuffix);
return [3, 3];
case 1:
if (stylesheetExists(font.id, true)) {
setStylesheetType(font.id, false);
}
else {
createStylesheet(font.id, false);
}
return [4, getStylesheet([font], scripts, variants, false)];
case 2:
fontStyle = _a.sent();
applyActiveFont(font, previousFontFamily, selectorSuffix);
fillStylesheet(font.id, fontStyle);
_a.label = 3;
case 3: return [2];
}
});
});
}
var FONT_FAMILY_DEFAULT = "Open Sans";
var OPTIONS_DEFAULTS = {
pickerId: "",
families: [],
categories: [],
scripts: ["latin"],
variants: ["regular"],
filter: function () { return true; },
limit: 50,
sort: "alphabet",
};
var FontManager = (function () {
function FontManager(apiKey, defaultFamily, _a, onChange) {
if (defaultFamily === void 0) { defaultFamily = FONT_FAMILY_DEFAULT; }
var _b = _a.pickerId, pickerId = _b === void 0 ? OPTIONS_DEFAULTS.pickerId : _b, _c = _a.families, families = _c === void 0 ? OPTIONS_DEFAULTS.families : _c, _d = _a.categories, categories = _d === void 0 ? OPTIONS_DEFAULTS.categories : _d, _e = _a.scripts, scripts = _e === void 0 ? OPTIONS_DEFAULTS.scripts : _e, _f = _a.variants, variants = _f === void 0 ? OPTIONS_DEFAULTS.variants : _f, _g = _a.filter, filter = _g === void 0 ? OPTIONS_DEFAULTS.filter : _g, _h = _a.limit, limit = _h === void 0 ? OPTIONS_DEFAULTS.limit : _h, _j = _a.sort, sort = _j === void 0 ? OPTIONS_DEFAULTS.sort : _j;
if (onChange === void 0) { onChange = function () { }; }
this.fonts = new Map();
validatePickerId(pickerId);
this.selectorSuffix = pickerId ? "-" + pickerId : "";
this.apiKey = apiKey;
this.options = {
pickerId: pickerId,
families: families,
categories: categories,
scripts: scripts,
variants: variants,
filter: filter,
limit: limit,
sort: sort,
};
this.onChange = onChange;
this.addFont(defaultFamily, false);
this.setActiveFont(defaultFamily, false);
}
FontManager.prototype.init = function () {
return __awaiter(this, void 0, void 0, function () {
var fonts, _loop_1, this_1, i, state_1, fontsToLoad;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, getFontList(this.apiKey)];
case 1:
fonts = _a.sent();
_loop_1 = function (i) {
var font = fonts[i];
if (this_1.fonts.size >= this_1.options.limit) {
return "break";
}
if (!this_1.fonts.has(font.family) &&
(this_1.options.families.length === 0 || this_1.options.families.includes(font.family)) &&
(this_1.options.categories.length === 0 || this_1.options.categories.includes(font.category)) &&
this_1.options.scripts.every(function (script) { return font.scripts.includes(script); }) &&
this_1.options.variants.every(function (variant) { return font.variants.includes(variant); }) &&
this_1.options.filter(font) === true) {
this_1.fonts.set(font.family, font);
}
};
this_1 = this;
for (i = 0; i < fonts.length; i += 1) {
state_1 = _loop_1(i);
if (state_1 === "break")
break;
}
fontsToLoad = new Map(this.fonts);
fontsToLoad["delete"](this.activeFontFamily);
loadFontPreviews(fontsToLoad, this.options.scripts, this.options.variants, this.selectorSuffix);
return [2, this.fonts];
}
});
});
};
FontManager.prototype.getFonts = function () {
return this.fonts;
};
FontManager.prototype.addFont = function (fontFamily, downloadPreview) {
if (downloadPreview === void 0) { downloadPreview = true; }
var font = {
family: fontFamily,
id: getFontId(fontFamily),
};
this.fonts.set(fontFamily, font);
if (downloadPreview) {
var fontMap = new Map();
fontMap.set(fontFamily, font);
loadFontPreviews(fontMap, this.options.scripts, this.options.variants, this.selectorSuffix);
}
};
FontManager.prototype.removeFont = function (fontFamily) {
this.fonts["delete"](fontFamily);
};
FontManager.prototype.getActiveFont = function () {
var activeFont = this.fonts.get(this.activeFontFamily);
if (!activeFont) {
throw Error("Cannot get active font: \"" + this.activeFontFamily + "\" is not in the font list");
}
else {
return activeFont;
}
};
FontManager.prototype.setActiveFont = function (fontFamily, runOnChange) {
var _this = this;
if (runOnChange === void 0) { runOnChange = true; }
var previousFontFamily = this.activeFontFamily;
var activeFont = this.fonts.get(fontFamily);
if (!activeFont) {
throw Error("Cannot update active font: \"" + fontFamily + "\" is not in the font list");
}
this.activeFontFamily = fontFamily;
loadActiveFont(activeFont, previousFontFamily, this.options.scripts, this.options.variants, this.selectorSuffix).then(function () {
if (runOnChange) {
_this.onChange(activeFont);
}
});
};
FontManager.prototype.setOnChange = function (onChange) {
this.onChange = onChange;
};
return FontManager;
}());
var FontPicker = (function () {
function FontPicker(apiKey, defaultFamily, _a, onChange) {
if (defaultFamily === void 0) { defaultFamily = FONT_FAMILY_DEFAULT; }
var _b = _a.pickerId, pickerId = _b === void 0 ? OPTIONS_DEFAULTS.pickerId : _b, _c = _a.families, families = _c === void 0 ? OPTIONS_DEFAULTS.families : _c, _d = _a.categories, categories = _d === void 0 ? OPTIONS_DEFAULTS.categories : _d, _e = _a.scripts, scripts = _e === void 0 ? OPTIONS_DEFAULTS.scripts : _e, _f = _a.variants, variants = _f === void 0 ? OPTIONS_DEFAULTS.variants : _f, _g = _a.filter, filter = _g === void 0 ? OPTIONS_DEFAULTS.filter : _g, _h = _a.limit, limit = _h === void 0 ? OPTIONS_DEFAULTS.limit : _h, _j = _a.sort, sort = _j === void 0 ? OPTIONS_DEFAULTS.sort : _j;
if (onChange === void 0) { onChange = function () { }; }
this.expanded = false;
this.closeEventListener = this.closeEventListener.bind(this);
this.toggleExpanded = this.toggleExpanded.bind(this);
var options = {
pickerId: pickerId,
families: families,
categories: categories,
scripts: scripts,
variants: variants,
filter: filter,
limit: limit,
sort: sort,
};
this.fontManager = new FontManager(apiKey, defaultFamily, options, onChange);
this.generateUI(sort);
}
FontPicker.prototype.generateUI = function (sort) {
var _this = this;
var selectorSuffix = this.fontManager.selectorSuffix;
var pickerId = "font-picker" + selectorSuffix;
this.fontPickerDiv = document.getElementById(pickerId);
if (!this.fontPickerDiv) {
throw Error("Missing div with id=\"" + pickerId + "\"");
}
var dropdownButton = document.createElement("button");
dropdownButton.classList.add("dropdown-button");
dropdownButton.onclick = this.toggleExpanded;
dropdownButton.onkeypress = this.toggleExpanded;
dropdownButton.type = "button";
this.fontPickerDiv.appendChild(dropdownButton);
this.dropdownFamily = document.createElement("p");
this.dropdownFamily.textContent = this.fontManager.getActiveFont().family;
this.dropdownFamily.classList.add("dropdown-font-family");
dropdownButton.appendChild(this.dropdownFamily);
var dropdownIcon = document.createElement("p");
dropdownIcon.classList.add("dropdown-icon", "loading");
dropdownButton.appendChild(dropdownIcon);
this.fontManager
.init()
.then(function (fontMap) {
var fonts = Array.from(fontMap.values());
if (sort === "alphabet") {
fonts.sort(function (font1, font2) {
return font1.family.localeCompare(font2.family);
});
}
_this.generateFontList(fonts);
dropdownIcon.classList.replace("loading", "finished");
})["catch"](function (err) {
dropdownIcon.classList.replace("loading", "error");
console.error("Error trying to fetch the list of available fonts");
console.error(err);
});
};
FontPicker.prototype.generateFontList = function (fonts) {
var _this = this;
this.ul = document.createElement("ul");
this.ul.classList.add("font-list");
fonts.forEach(function (font) {
_this.addFontLi(font);
});
this.fontPickerDiv.appendChild(this.ul);
var activeFontFamily = this.fontManager.getActiveFont().family;
var activeFontId = getFontId(activeFontFamily);
var fontButtonId = "font-button-" + activeFontId + this.fontManager.selectorSuffix;
this.activeFontButton = document.getElementById(fontButtonId);
if (this.activeFontButton) {
this.activeFontButton.classList.add("active-font");
}
else {
console.error("Could not find font button with ID (" + fontButtonId + ")");
}
};
FontPicker.prototype.addFontLi = function (font, listIndex) {
var _this = this;
var fontId = getFontId(font.family);
var li = document.createElement("li");
li.classList.add("font-list-item");
var fontButton = document.createElement("button");
fontButton.type = "button";
fontButton.id = "font-button-" + fontId + this.fontManager.selectorSuffix;
fontButton.classList.add("font-button");
fontButton.textContent = font.family;
var onActivate = function () {
_this.toggleExpanded();
_this.setActiveFont(font.family);
};
fontButton.onclick = onActivate;
fontButton.onkeypress = onActivate;
li.appendChild(fontButton);
if (listIndex) {
this.ul.insertBefore(li, this.ul.children[listIndex]);
}
else {
this.ul.appendChild(li);
}
};
FontPicker.prototype.closeEventListener = function (e) {
var targetEl = e.target;
var fontPickerEl = document.getElementById("font-picker" + this.fontManager.selectorSuffix);
while (true) {
if (targetEl === fontPickerEl) {
return;
}
if (targetEl.parentNode) {
targetEl = targetEl.parentNode;
}
else {
this.toggleExpanded();
return;
}
}
};
FontPicker.prototype.toggleExpanded = function () {
if (this.expanded) {
this.expanded = false;
this.fontPickerDiv.classList.remove("expanded");
document.removeEventListener("click", this.closeEventListener);
}
else {
this.expanded = true;
this.fontPickerDiv.classList.add("expanded");
document.addEventListener("click", this.closeEventListener);
}
};
FontPicker.prototype.getFonts = function () {
return this.fontManager.getFonts();
};
FontPicker.prototype.addFont = function (fontFamily, index) {
if (Array.from(this.fontManager.getFonts().keys()).includes(fontFamily)) {
throw Error("Did not add font to font picker: Font family \"" + fontFamily + "\" is already in the list");
}
this.fontManager.addFont(fontFamily, true);
var font = this.fontManager.getFonts().get(fontFamily);
if (font) {
this.addFontLi(font, index);
}
else {
console.error("Font \"" + fontFamily + "\" is missing in font list");
}
};
FontPicker.prototype.removeFont = function (fontFamily) {
this.fontManager.removeFont(fontFamily);
var fontId = getFontId(fontFamily);
var fontButton = document.getElementById("font-button-" + fontId + this.fontManager.selectorSuffix);
if (fontButton) {
var fontLi = fontButton.parentElement;
fontButton.remove();
if (fontLi) {
fontLi.remove();
}
}
else {
throw Error("Could not remove font from font picker: Font family \"" + fontFamily + "\" is not in the list");
}
};
FontPicker.prototype.getActiveFont = function () {
return this.fontManager.getActiveFont();
};
FontPicker.prototype.setActiveFont = function (fontFamily) {
this.fontManager.setActiveFont(fontFamily);
var fontId = getFontId(fontFamily);
this.dropdownFamily.textContent = fontFamily;
if (this.activeFontButton) {
this.activeFontButton.classList.remove("active-font");
this.activeFontButton = document.getElementById("font-button-" + fontId + this.fontManager.selectorSuffix);
this.activeFontButton.classList.add("active-font");
}
else {
console.error("`activeFontButton` is undefined");
}
};
FontPicker.prototype.setOnChange = function (onChange) {
this.fontManager.setOnChange(onChange);
};
return FontPicker;
}());
return FontPicker;
})));

88
src/js/json__compile.js Normal file
View File

@@ -0,0 +1,88 @@
function add__option() {
window.new_chq_no = parseInt($('#total_chq').val()) + 1;
window.new_input = "<h3>Categorie Name</h3><input type='text' id='cat_name'><div id='op_cont'><div class='inner'><h4>option name</h4><input type='text' id='op_name'><h4>option type</h4><input type='text' id='op_type'><h4>option description</h4><input type='text' id='op_desc'><h4>option css</h4><input type='text' id='op_css'></div><input type='button' value='Add a new option'></div>";
$('#cat').append(new_input);
$('#total_chq').val(new_chq_no);
}
function create_option_json() {
var option__name = document.querySelectorAll('#op_name');
option__name.forEach(option__name => function() {
var json__options = {
"categories": [{
"name": "Default",
"options": [{
"name": name
}]
}]
}
})
var categories = {}
}
function no__option() {
$('#no_op').on('click', function() {
var json__options = {
"categories": [{
"name": "Default",
"options": []
}]
}
})
}
function createJSON() {
var name = document.getElementById("name").value;
var author = document.getElementById("author").value;
var desc = document.getElementById("desc").value;
var CSS = document.getElementById("css").value;
var login = document.getElementById("login").value;
var home = document.getElementById("home").value;
var lib = document.getElementById("lib").value;
var title = document.getElementById("title").value;
var json__compiled = {
"name ": name,
"author ": author,
"description ": desc,
"defaultCss ": CSS,
"previews ": [{
"name ": "Login Page ",
"url ": login
},
{
"name ": "Home/Index Page ",
"url ": home
},
{
"name ": "Library Page ",
"url ": lib
},
{
"name ": "Title page ",
"url ": title
}
]
}
var json = JSON.stringify(json__compiled, null, 4);
json = [json];
var json__blob = new Blob(json, { type: "text/plain;charset=utf-8" });
var isIE = false || !!document.documentMode;
if (isIE) {
window.navigator.msSaveBlob(json__blob, name + ".json");
} else {
var url = window.URL || window.webkitURL;
link = url.createObjectURL(json__blob);
var a = document.createElement("a");
a.download = name + ".json";
a.href = link;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}
}