1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #3002 from thornbill/theme-colors

Add theme color support
This commit is contained in:
Bill Thornton 2021-09-27 01:03:24 -04:00 committed by GitHub
commit 9d65a561a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 6 deletions

View file

@ -4,23 +4,29 @@
"themes": [
{
"name": "Apple TV",
"id": "appletv"
"id": "appletv",
"color": "#bcbcbc"
}, {
"name": "Blue Radiance",
"id": "blueradiance"
"id": "blueradiance",
"color": "#011432"
}, {
"name": "Dark",
"id": "dark",
"color": "#202020",
"default": true
}, {
"name": "Light",
"id": "light"
"id": "light",
"color": "#303030"
}, {
"name": "Purple Haze",
"id": "purplehaze"
"id": "purplehaze",
"color": "#000420"
}, {
"name": "WMC",
"id": "wmc"
"id": "wmc",
"color": "#0c2450"
}
],
"menuLinks": [],

View file

@ -17,6 +17,9 @@
<meta property="og:url" content="http://jellyfin.org">
<meta property="og:description" content="The Free Software Media System">
<meta property="og:type" content="article">
<meta id="themeColor" name="theme-color" content="#202020">
<link rel="apple-touch-icon" sizes="180x180" href="touchicon.png">
<!-- iPhone 5 -->

View file

@ -31,7 +31,8 @@ function getThemeStylesheetInfo(id) {
return {
stylesheetPath: 'themes/' + theme.id + '/theme.css',
themeId: theme.id
themeId: theme.id,
color: theme.color
};
});
}
@ -74,6 +75,8 @@ function setTheme(id) {
link.setAttribute('href', linkUrl);
themeStyleElement = link;
currentThemeId = info.themeId;
document.getElementById('themeColor').content = info.color;
});
});
}