forked from GithubBackups/vichan
Applies the theme to all board pages and catalog.
This commit is contained in:
parent
4238249af6
commit
94f2fae196
@ -54,7 +54,12 @@ function changeStyle(styleName, link) {
|
|||||||
x.appendChild(s);
|
x.appendChild(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('stylesheet').href = styles[styleName];
|
{% endraw %}
|
||||||
|
var root = "{{ config.root }}";
|
||||||
|
{% raw %}
|
||||||
|
root = root.replace(/\/$/, "");
|
||||||
|
|
||||||
|
document.getElementById('stylesheet').href = root + styles[styleName];
|
||||||
selectedstyle = styleName;
|
selectedstyle = styleName;
|
||||||
|
|
||||||
if (document.getElementsByClassName('styles').length != 0) {
|
if (document.getElementsByClassName('styles').length != 0) {
|
||||||
@ -76,7 +81,7 @@ function changeStyle(styleName, link) {
|
|||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
function init_stylechooser() {
|
function init_stylechooser() {
|
||||||
var matches = document.URL.match(/\/(\w+)\/($|{{ config.dir.res|replace({'/': '\\/'}) }}{{ config.file_page|replace({'%d': '\\d+', '.': '\\.'}) }}|{{ config.file_index|replace({'.': '\\.'}) }}|{{ config.dir.res|replace({'/': '\\/'}) }}{{ config.file_page50|replace({'+': '\\+', '%d': '\\d+', '.': '\\.'}) }})/);
|
var matches = document.URL.match(/\/(\w+)\/($|{{ config.dir.res|replace({'/': '\\/'}) }}{{ config.file_page|replace({'%d': '\\d+', '.': '\\.'}) }}|{{ config.file_index|replace({'.': '\\.'}) }}|{{ config.dir.res|replace({'/': '\\/'}) }}{{ config.file_page50|replace({'+': '\\+', '%d': '\\d+', '.': '\\.'}) }}|{{ config.file_page|replace({'%d': '\\d+', '.': '\\.'}) }}|{{ config.catalog_link|replace({'.': '\\.'}) }})/);
|
||||||
var newElement = document.createElement('div');
|
var newElement = document.createElement('div');
|
||||||
newElement.className = 'styles';
|
newElement.className = 'styles';
|
||||||
|
|
||||||
|
@ -83,9 +83,17 @@
|
|||||||
<br><a href="http://tinyboard.org/">Tinyboard</a> Copyright © 2010-2014 Tinyboard Development Group
|
<br><a href="http://tinyboard.org/">Tinyboard</a> Copyright © 2010-2014 Tinyboard Development Group
|
||||||
<br><a href="https://int.vichan.net/devel/">vichan</a> Copyright © 2012-2014 vichan-devel</p>
|
<br><a href="https://int.vichan.net/devel/">vichan</a> Copyright © 2012-2014 vichan-devel</p>
|
||||||
</footer>
|
</footer>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">{% raw %}
|
||||||
|
var styles = {
|
||||||
|
{% endraw %}
|
||||||
|
{% for name, uri in config.stylesheets %}{% raw %}'{% endraw %}{{ name|addslashes }}{% raw %}' : '{% endraw %}/stylesheets/{{ uri|addslashes }}{% raw %}',
|
||||||
|
{% endraw %}{% endfor %}{% raw %}
|
||||||
|
}; onready(init);
|
||||||
|
{% endraw %}</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">{% raw %}
|
||||||
ready();
|
ready();
|
||||||
</script>
|
{% endraw %}</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
{% endfilter %}
|
{% endfilter %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user