transform autoreload from macro to included html
This commit is contained in:
parent
c566536dfd
commit
eb13d4f4a0
4
template/autoreload.html
Normal file
4
template/autoreload.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<script>
|
||||
document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] +
|
||||
':35729/livereload.js?snipver=1"></' + 'script>')
|
||||
</script>
|
|
@ -1,12 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
{% macro autoreload() %}
|
||||
<script>
|
||||
document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] +
|
||||
':35729/livereload.js?snipver=1"></' + 'script>')
|
||||
</script>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro unhide_func() %}
|
||||
<script>
|
||||
function unhide(seed, arr) {
|
||||
|
@ -83,7 +76,7 @@
|
|||
<html>
|
||||
<head>
|
||||
{% if dev %}
|
||||
{{ autoreload() }}
|
||||
{% include "autoreload.html" %}
|
||||
{% endif %}
|
||||
|
||||
<title>{{ name }}</title>
|
||||
|
|
Loading…
Reference in a new issue