refactor: Move script parts around
- Run setup function in global script - Move common script assets to hippie main template - Remove unused scrcipt from components page
This commit is contained in:
parent
6cfe5b21e1
commit
8942dc3632
10 changed files with 17 additions and 52 deletions
|
|
@ -8,19 +8,14 @@
|
|||
|
||||
{% block links %}
|
||||
{{ super() }}
|
||||
{% if hippie.legacyMode %}
|
||||
<!--[if lte IE 9]> <script src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv.min.js"></script> <![endif]-->
|
||||
<!--[if lte IE 9]> <script src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> <![endif]-->
|
||||
<!--Local alternative: <script src="./code/html5shiv.min.js"></script>-->
|
||||
<!--Only use one of the above!-->
|
||||
{% endif %}
|
||||
{% if hippie.legacyMode %}
|
||||
<!--[if lte IE 9]> <script src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv.min.js"></script> <![endif]-->
|
||||
<!--[if lte IE 9]> <script src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> <![endif]-->
|
||||
<!--Local alternative: <script src="./code/html5shiv.min.js"></script>-->
|
||||
<!--Only use one of the above!-->
|
||||
{% endif %}
|
||||
|
||||
<!-- <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,400italic,500,500italic,700' rel='stylesheet' type='text/css'> -->
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{{ pageBase }}css/demo.css"/>
|
||||
<!-- <link rel="stylesheet" type="text/css" media="print" href="{{ pageBase }}css/print.css"/> -->
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
{{ super() }}
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<!-- default.template -->
|
||||
{% import "hippie/macros/_log.njk" as log %}
|
||||
{# {% if hippie.debugMode %} #}
|
||||
{% import "hippie/macros/_log.njk" as log %}
|
||||
{# {% endif %} #}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" class="{{ pageClass }}" id="{{ pageId }}">
|
||||
|
|
|
|||
|
|
@ -41,6 +41,13 @@
|
|||
|
||||
{% block script %}
|
||||
{{ log.log('BODY :: Loading script assets...') }}
|
||||
{# <script src="{{ pageBase }}js/{{hippie.jsFile}}.min.js" type="text/javascript"></script> #}
|
||||
<!-- build:js js/main.concat.min.js -->
|
||||
{# // TODO: Remove dependecy to jQuery; at least maek it optional #}
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script src="{{ pageBase }}js/variables.js"></script>
|
||||
<script src="{{ pageBase }}js/functions.js"></script>
|
||||
<script src="{{ pageBase }}js/global.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{{ log.log('BODY end :: Page script might still be loading.') }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue