Skip to content

Commit

Permalink
Don't hardcode location of static theme files, rather use THEME_STATI…
Browse files Browse the repository at this point in the history
…C_DIR.

Fixes issues with the i18n_subsites plugins.
  • Loading branch information
svillemot committed Mar 15, 2015
1 parent 0d47386 commit 581351b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion templates/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ <h1>
{% endif %}
{% if SHARIFF|default(false) %}
<!-- add shariff support -->
<script src="{{ SITEURL }}/theme/js/shariff.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/shariff.min.js"></script>
{% endif %}
{% endblock %}
26 changes: 13 additions & 13 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,28 @@

<!-- Bootstrap -->
{% if BOOTSTRAP_THEME %}
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/bootstrap.{{ BOOTSTRAP_THEME }}.min.css" type="text/css"/>
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/bootstrap.{{ BOOTSTRAP_THEME }}.min.css" type="text/css"/>
{% else %}
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/bootstrap.min.css" type="text/css"/>
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/bootstrap.min.css" type="text/css"/>
{% endif %}
<link href="{{ SITEURL }}/theme/css/font-awesome.min.css" rel="stylesheet">
<link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/font-awesome.min.css" rel="stylesheet">

<link href="{{ SITEURL }}/theme/css/pygments/{{ PYGMENTS_STYLE|default('native') }}.css" rel="stylesheet">
<link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/pygments/{{ PYGMENTS_STYLE|default('native') }}.css" rel="stylesheet">
{% if 'tipue_search' in PLUGINS %}
<link href="{{ SITEURL}}/theme/tipuesearch/tipuesearch.css" rel="stylesheet">
<link href="{{ SITEURL}}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.css" rel="stylesheet">
{% endif %}
{% if DOCUTIL_CSS %}
<link href="{{ SITEURL }}/theme/css/html4css1.css" rel="stylesheet">
<link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/html4css1.css" rel="stylesheet">
{% endif %}
{% if TYPOGRIFY %}
<link href="{{ SITEURL }}/theme/css/typogrify.css" rel="stylesheet">
<link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/typogrify.css" rel="stylesheet">
{% endif %}
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/style.css" type="text/css"/>
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/style.css" type="text/css"/>
{% if CUSTOM_CSS %}
<link href="{{ SITEURL }}/{{ CUSTOM_CSS }}" rel="stylesheet">
{% endif %}
{% if SHARIFF %}
<link href="{{ SITEURL }}/theme/css/shariff/shariff.min.css" rel="stylesheet">
<link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/shariff/shariff.min.css" rel="stylesheet">
{% endif %}

{% if FEED_ALL_ATOM %}
Expand Down Expand Up @@ -178,16 +178,16 @@
</div>
{% include 'includes/footer.html' %}

<script src="{{ SITEURL }}/theme/js/jquery.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/jquery.min.js"></script>

<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="{{ SITEURL }}/theme/js/bootstrap.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/bootstrap.min.js"></script>

<!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
<script src="{{ SITEURL }}/theme/js/respond.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/respond.min.js"></script>

{% if BANNER %}
<script src="{{ SITEURL }}/theme/js/bodypadding.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/bodypadding.js"></script>
{% endif %}
{% include 'includes/github-js.html' %}
{% include 'includes/disqus_script.html' %}
Expand Down
6 changes: 3 additions & 3 deletions templates/includes/github-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
if (!window.jXHR) {
var jxhr = document.createElement('script');
jxhr.type = 'text/javascript';
jxhr.src = '{{ SITEURL }}/theme/js/jXHR.js';
jxhr.src = '{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/jXHR.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(jxhr, s);
}
Expand All @@ -30,6 +30,6 @@
});
});
</script>
<script src="{{ SITEURL }}/theme/js/github.js" type="text/javascript"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/github.js" type="text/javascript"></script>
<!-- End GitHub JS Code -->
{% endif %}
{% endif %}
6 changes: 3 additions & 3 deletions templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
{% if 'assets' in PLUGINS %}
{% include '_includes/minify_tipuesearch.html' with context %}
{% else %}
<link href="{{ SITEURL }}/theme/tipuesearch/tipuesearch.css" rel="stylesheet">
<script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch_set.js"></script>
<script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch.min.js"></script>
<link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.css" rel="stylesheet">
<script type="text/javascript" src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch_set.js"></script>
<script type="text/javascript" src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.js"></script>
{% endif %}
<script>
$(document).ready(function() {
Expand Down

0 comments on commit 581351b

Please sign in to comment.