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> | <!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() %} | {% macro unhide_func() %} | ||||||
| <script> | <script> | ||||||
|   function unhide(seed, arr) { |   function unhide(seed, arr) { | ||||||
|  | @ -83,7 +76,7 @@ | ||||||
| <html> | <html> | ||||||
|   <head> |   <head> | ||||||
|     {% if dev %} |     {% if dev %} | ||||||
|     {{ autoreload() }} |     {% include "autoreload.html" %} | ||||||
|     {% endif %} |     {% endif %} | ||||||
| 
 | 
 | ||||||
|     <title>{{ name }}</title> |     <title>{{ name }}</title> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 leafee98
						leafee98