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:
commit
9d65a561a2
3 changed files with 18 additions and 6 deletions
|
@ -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": [],
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue