feat: change log output and template structure
- new global variable debugMode - demo templates are now based on hippie defaults joined with template inheritance - add log macros - new function logAdd() - log uses global state
This commit is contained in:
parent
c55c1c9b66
commit
be425e8be5
20 changed files with 206 additions and 155 deletions
|
|
@ -1,52 +0,0 @@
|
|||
<!-- default.template -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" class="{{ pageClass }}" id="{{ pageId }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
{% block head %}
|
||||
<title>
|
||||
{% block title %}{% endblock %}{{ hippie.titlePostfix }}</title>
|
||||
|
||||
{% include "demo/partials/_meta.njk" %}
|
||||
{# <base href="/"> #}
|
||||
{% block meta %}{% endblock %}
|
||||
|
||||
{% include "hippie/partials/_head_script.njk" %}
|
||||
<script>
|
||||
debugOn = true;
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
logPerf('EVENT :: Document \'DOMContentLoaded\' event fired.');
|
||||
});
|
||||
logPerf('HEAD start :: Debugging performance...', debugOn);
|
||||
</script>
|
||||
|
||||
{% include "hippie/partials/_head_links.njk" %}
|
||||
{% block links %}
|
||||
{# <link rel="stylesheet" type="text/css" media="all" href="css/demo.css"/> #}
|
||||
{# <link rel="stylesheet" type="text/css" media="all" href="{{ pageBase | subdir(2) }}css/demo.css"/> #}
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{{ pageBase }}css/demo.css"/>
|
||||
{% endblock %}
|
||||
<script>
|
||||
logPerf('HEAD end :: Links loaded.');
|
||||
</script>
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
<body class="{{ bodyClass }}">
|
||||
<script>
|
||||
logPerf('BODY start');
|
||||
</script>
|
||||
{% block body %}{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script>
|
||||
logPerf('BODY :: Loading script assets...');
|
||||
</script>
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
{% endblock %}
|
||||
<script>
|
||||
logPerf('BODY end :: Page script might still be loading.');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue