update footer scripts to try to fix bug; related to #33
This commit is contained in:
parent
7ba793f2db
commit
9197b79d9d
@ -1,21 +1,32 @@
|
|||||||
<!-- TODO hardcode the required JS because on 2016-02-01 GitHub pages migrated to jekyll 3 and broke this template -->
|
<!-- everything has to be repeated twice because on 2016-02-01 GitHub pages migrated to jekyll 3; see bug https://github.com/jekyll/jekyll/issues/4439 -->
|
||||||
<script src="/js/jquery-1.11.2.min.js"></script>
|
|
||||||
<script src="/js/bootstrap.min.js"></script>
|
|
||||||
<script src="/js/main.js"></script>
|
|
||||||
<!-- end TODO -->
|
|
||||||
|
|
||||||
|
{% if page.common-ext-js %}
|
||||||
|
{% for js in page.common-ext-js %}
|
||||||
|
<script src="{{ js }}"></script>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% if layout.common-ext-js %}
|
{% if layout.common-ext-js %}
|
||||||
{% for js in layout.common-ext-js %}
|
{% for js in layout.common-ext-js %}
|
||||||
<script src="{{ js }}"></script>
|
<script src="{{ js }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if page.ext-js %}
|
||||||
|
{% for js in page.ext-js %}
|
||||||
|
<script src="{{ js }}"></script>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% if layout.ext-js %}
|
{% if layout.ext-js %}
|
||||||
{% for js in layout.ext-js %}
|
{% for js in layout.ext-js %}
|
||||||
<script src="{{ js }}"></script>
|
<script src="{{ js }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if page.js %}
|
||||||
|
{% for js in page.js %}
|
||||||
|
<script src="{{ js | prepend: site.baseurl | replace: '//', '/' }}"></script>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% if layout.js %}
|
{% if layout.js %}
|
||||||
{% for js in layout.js %}
|
{% for js in layout.js %}
|
||||||
<script src="{{ js | prepend: site.baseurl | replace: '//', '/' }}"></script>
|
<script src="{{ js | prepend: site.baseurl | replace: '//', '/' }}"></script>
|
||||||
@ -36,5 +47,19 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if page.common-js %}
|
||||||
|
{% for js in page.common-js %}
|
||||||
|
<!-- doing something a bit funky here because I want to be careful not to include JQuery twice! -->
|
||||||
|
{% if js contains 'jquery' %}
|
||||||
|
<script>
|
||||||
|
if (typeof jQuery == 'undefined') {
|
||||||
|
document.write('<script src="{{ js | prepend: site.baseurl | replace: "//", "/" }}"></scr' + 'ipt>');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% else %}
|
||||||
|
<script src="{{ js | prepend: site.baseurl | replace: '//', '/' }}"></script>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include google_analytics.html %}
|
{% include google_analytics.html %}
|
||||||
|
Loading…
Reference in New Issue
Block a user