diff --git a/.eleventy.js b/.eleventy.js index 490cc66..ccca65a 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -12,7 +12,8 @@ module.exports = function (eleventyConfig) { pageBase: './', brand: 'hippie', titlePrefix: '', - titlePostfix: ' - HIPPIE' + titlePostfix: ' - HIPPIE', + debugMode: true }); eleventyConfig.addPassthroughCopy({"source/art/images": "art"}); diff --git a/source/screens/basics.njk b/source/screens/basics.njk index 21f455f..f31fedb 100644 --- a/source/screens/basics.njk +++ b/source/screens/basics.njk @@ -1,8 +1,8 @@ - + {% set pageBase = "../" %} {% set pageId = "basics" %} -{% extends "demo/_extended.njk" %} +{% extends "demo/_docs.njk" %} {% block title %}Grundlagen{% endblock %} {% block head %} @@ -959,12 +959,11 @@ - {% endblock %} \ No newline at end of file diff --git a/source/screens/components.njk b/source/screens/components.njk index e1c2ab1..7b00a16 100644 --- a/source/screens/components.njk +++ b/source/screens/components.njk @@ -2,7 +2,7 @@ {% set pageBase = "../" %} {% set pageId = "components" %} -{% extends "demo/_extended.njk" %} +{% extends "demo/_docs.njk" %} {% block title %}Komponenten{% endblock %} {% block head %} @@ -69,7 +69,8 @@ - + {{ log.asset(true) }} + {{ log.log('Assets loaded.', assetsLoaded) }} - - {% endblock %} \ No newline at end of file diff --git a/source/screens/introduction.njk b/source/screens/introduction.njk index d35bec6..aeea393 100644 --- a/source/screens/introduction.njk +++ b/source/screens/introduction.njk @@ -1,8 +1,8 @@ - + {% set pageBase = "../" %} {% set pageId = "intro" %} -{% extends "demo/_extended.njk" %} +{% extends "demo/_docs.njk" %} {% block title %}Einführung{% endblock %} {% block head %} @@ -23,8 +23,6 @@

- - {% endblock %} {% block script %} @@ -34,12 +32,11 @@ - {% endblock %} \ No newline at end of file diff --git a/source/screens/layouts.njk b/source/screens/layouts.njk index 253f66e..4bd7966 100644 --- a/source/screens/layouts.njk +++ b/source/screens/layouts.njk @@ -2,7 +2,7 @@ {% set pageBase = "../" %} {% set pageId = "layouts" %} -{% extends "demo/_extended.njk" %} +{% extends "demo/_docs.njk" %} {% block title %}Gestaltungen{% endblock %} {% block head %} @@ -322,7 +322,8 @@ - + {{ log.asset(true) }} + {{ log.log('Assets loaded.', assetsLoaded) }} - - {% include "hippie/partials/_head_links.njk" %} - {% block links %} - {# #} - {# #} - - {% endblock %} - - {% endblock %} - - - - - {% block body %}{% endblock %} - - {% block script %} - - - {% endblock %} - - - \ No newline at end of file diff --git a/source/templates/demo/_demo.njk b/source/templates/demo/_demo.njk new file mode 100644 index 0000000..afc2aae --- /dev/null +++ b/source/templates/demo/_demo.njk @@ -0,0 +1,18 @@ + +{% extends "hippie/_default.njk" %} + +{% block meta %} + {% include "demo/partials/_meta.njk" %} + {# #} +{% endblock %} + +{% block links %} + {{ super() }} + {# #} + {# #} +{% endblock %} + +{% block script %} + {{ super() }} + +{% endblock %} \ No newline at end of file diff --git a/source/templates/demo/_docs.njk b/source/templates/demo/_docs.njk new file mode 100644 index 0000000..97f765d --- /dev/null +++ b/source/templates/demo/_docs.njk @@ -0,0 +1,23 @@ + +{% extends "hippie/_main.njk" %} + +{% block meta %} + {% include "demo/partials/_meta.njk" %} + {# #} +{% endblock %} + +{% block links %} + {{ super() }} + + + + + + + +{% endblock %} + +{% block script %} + {{ super() }} + +{% endblock %} diff --git a/source/templates/demo/_extended.njk b/source/templates/demo/_extended.njk deleted file mode 100644 index 17aa1b0..0000000 --- a/source/templates/demo/_extended.njk +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - {% block head %} - - {% block title %}{% endblock %} - - HIPPIE - - {% include "demo/partials/_meta.njk" %} - {% block meta %}{% endblock %} - - {% include "hippie/partials/_head_script.njk" %} - - - {% include "hippie/partials/_head_links.njk" %} - {% block links %} - - - - - - - - - {% endblock %} - - {% endblock %} - - - - - {% include "hippie/partials/_body_hover.njk" %} -
- {% include "hippie/partials/_header.njk" %} - -
- {% block main %}{% endblock %} -
- - {% include "hippie/partials/_footer.njk" %} -
- - {% block script %} - - - {# #} - {% endblock %} - - - \ No newline at end of file diff --git a/source/templates/demo/partials/_meta.njk b/source/templates/demo/partials/_meta.njk index dd00970..1253aaa 100644 --- a/source/templates/demo/partials/_meta.njk +++ b/source/templates/demo/partials/_meta.njk @@ -1,6 +1,6 @@ - + diff --git a/source/templates/hippie/_default.njk b/source/templates/hippie/_default.njk new file mode 100644 index 0000000..bdaf5ed --- /dev/null +++ b/source/templates/hippie/_default.njk @@ -0,0 +1,41 @@ + +{% import "hippie/macros/_log.njk" as log %} + + + + + + + {% block head %} + + {{ hippie.titlePrefix }} + {% block title %}{% endblock %}{{ hippie.titlePostfix }} + + {% block meta %} + {% include "hippie/partials/_head_meta.njk" %} + {% endblock %} + + {% include "hippie/partials/_head_script.njk" %} + {# {{ log.debug(true) }} #} + {{ log.start() }} + + {% block links %} + {% include "hippie/partials/_head_links.njk" %} + + {% endblock %} + + {{ log.log('HEAD end :: Links parsed, starting to load.') }} + {% endblock %} + + + + {{ log.log('BODY start') }} + {% block body %}{% endblock %} + + {% block script %} + {{ log.log('BODY :: Loading script assets...') }} + {% endblock %} + + {{ log.log('BODY end :: Page script might still be loading.') }} + + \ No newline at end of file diff --git a/source/templates/hippie/_main.njk b/source/templates/hippie/_main.njk new file mode 100644 index 0000000..20ccda5 --- /dev/null +++ b/source/templates/hippie/_main.njk @@ -0,0 +1,50 @@ + +{% import "hippie/macros/_log.njk" as log %} + + + + + + + {% block head %} + + {{ hippie.titlePrefix }} + {% block title %}{% endblock %}{{ hippie.titlePostfix }} + + {% block meta %} + {% include "hippie/partials/_head_meta.njk" %} + {% endblock %} + + {% include "hippie/partials/_head_script.njk" %} + {{ log.debug(hippie.debugMode, true) }} + {{ log.start() }} + + {% block links %} + {% include "hippie/partials/_head_links.njk" %} + + {% endblock %} + + {{ log.log('HEAD end :: Links parsed, starting to load.') }} + {% endblock %} + + + + {{ log.log('BODY start') }} + {% include "hippie/partials/_body_hover.njk" %} +
+ {% include "hippie/partials/_header.njk" %} + +
+ {% block main %}{% endblock %} +
+ + {% include "hippie/partials/_footer.njk" %} +
+ + {% block script %} + {{ log.log('BODY :: Loading script assets...') }} + {% endblock %} + + {{ log.log('BODY end :: Page script might still be loading.') }} + + \ No newline at end of file diff --git a/source/templates/hippie/macros/_log.njk b/source/templates/hippie/macros/_log.njk new file mode 100644 index 0000000..98ceaa3 --- /dev/null +++ b/source/templates/hippie/macros/_log.njk @@ -0,0 +1,24 @@ +{% macro start() %} + +{% endmacro %} +{% macro log(msg, arg = '') %} + +{% endmacro %} +{% macro debug(state = false, display = false, assets = false) %} + {# {{ set hippie.debugMode = state }} #} + +{% endmacro %} +{% macro asset(state = false) %} + +{% endmacro %} \ No newline at end of file diff --git a/source/templates/hippie/partials/_head_links.njk b/source/templates/hippie/partials/_head_links.njk index c95a39b..b7afb2d 100644 --- a/source/templates/hippie/partials/_head_links.njk +++ b/source/templates/hippie/partials/_head_links.njk @@ -1,4 +1,4 @@ - + {# #} diff --git a/source/templates/hippie/partials/_head_meta.njk b/source/templates/hippie/partials/_head_meta.njk index 22c28a5..38c3b82 100644 --- a/source/templates/hippie/partials/_head_meta.njk +++ b/source/templates/hippie/partials/_head_meta.njk @@ -1,4 +1,4 @@ - + diff --git a/source/templates/hippie/partials/_head_script.njk b/source/templates/hippie/partials/_head_script.njk index e00bacc..ccb6ddc 100644 --- a/source/templates/hippie/partials/_head_script.njk +++ b/source/templates/hippie/partials/_head_script.njk @@ -1,8 +1,8 @@ \ No newline at end of file