skins: finalize support for multiple skins

The old "static/custom" directory is replaced by "static/skins/<skinName>",
where <skinName> is taken from settings.json.
When no value is found, a default of "no-skin" is assumed, so that backward
compatibility is maintained.

The most evident security concerns have been addressed.

Closes #3471.
This commit is contained in:
muxator 2018-08-26 03:43:53 +02:00 committed by muxator
parent e34c74b24d
commit 9c990ab08a
5 changed files with 14 additions and 14 deletions

View file

@ -156,7 +156,7 @@
}
}
</style>
<link href="static/custom/index.css" rel="stylesheet">
<link href="static/skins/<%=encodeURI(settings.skinName)%>/index.css" rel="stylesheet">
<div id="wrapper">
<% e.begin_block("indexWrapper"); %>
@ -171,7 +171,7 @@
<% e.end_block(); %>
</div>
<script src="static/custom/index.js"></script>
<script src="static/skins/<%=encodeURI(settings.skinName)%>/index.js"></script>
<script>
// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt
function go2Name()