mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-25 07:50:23 +01:00
Make it so you can have different stylesheets per board
This commit is contained in:
parent
6f0dc29d03
commit
ef83cb2dea
@ -1413,16 +1413,8 @@ function buildIndex() {
|
||||
function buildJavascript() {
|
||||
global $config;
|
||||
|
||||
$stylesheets = array();
|
||||
foreach ($config['stylesheets'] as $name => $uri) {
|
||||
$stylesheets[] = array(
|
||||
'name' => addslashes($name),
|
||||
'uri' => addslashes((!empty($uri) ? $config['uri_stylesheets'] : '') . $uri));
|
||||
}
|
||||
|
||||
$script = Element('main.js', array(
|
||||
'config' => $config,
|
||||
'stylesheets' => $stylesheets
|
||||
));
|
||||
|
||||
// Check if we have translation for the javascripts; if yes, we add it to additional javascripts
|
||||
|
@ -59,6 +59,14 @@
|
||||
<p class="unimportant" style="margin-top:20px;text-align:center;">Powered by <a href="http://tinyboard.org/">Tinyboard</a> {{ config.version }} | <a href="http://tinyboard.org/">Tinyboard</a> Copyright © 2010-2013 Tinyboard Development Group</p>
|
||||
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
|
||||
</footer>
|
||||
<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 %}
|
||||
};
|
||||
{% endraw %}</script>
|
||||
|
||||
<script type="text/javascript">{% raw %}
|
||||
ready();
|
||||
{% endraw %}</script>
|
||||
|
@ -26,11 +26,11 @@ var saved = {};
|
||||
|
||||
|
||||
var selectedstyle = '{% endraw %}{{ config.default_stylesheet.0|addslashes }}{% raw %}';
|
||||
var styles = {
|
||||
/*var styles = {
|
||||
{% endraw %}
|
||||
{% for stylesheet in stylesheets %}{% raw %}'{% endraw %}{{ stylesheet.name|addslashes }}{% raw %}' : '{% endraw %}{{ stylesheet.uri|addslashes }}{% raw %}',
|
||||
{% endraw %}{% endfor %}{% raw %}
|
||||
};
|
||||
};*/
|
||||
var board_name = false;
|
||||
|
||||
function changeStyle(styleName, link) {
|
||||
|
@ -42,6 +42,14 @@
|
||||
<p class="unimportant" style="margin-top:20px;text-align:center;">Powered by <a href="http://tinyboard.org/">Tinyboard</a> {{ config.version }} | <a href="http://tinyboard.org/">Tinyboard</a> Copyright © 2010-2013 Tinyboard Development Group</p>
|
||||
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
|
||||
</footer>
|
||||
<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 %}
|
||||
};
|
||||
{% endraw %}</script>
|
||||
|
||||
<script type="text/javascript">{% raw %}
|
||||
ready();
|
||||
{% endraw %}</script>
|
||||
|
Loading…
Reference in New Issue
Block a user