diff --git a/.eleventy.js b/.eleventy.js index ce05d34..ccca65a 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -9,9 +9,11 @@ module.exports = function (eleventyConfig) { }); eleventyConfig.addGlobalData("hippie", { + pageBase: './', brand: 'hippie', - titlePrefix: ' - HIPPIE', - pageBase: './' + titlePrefix: '', + titlePostfix: ' - HIPPIE', + debugMode: true }); eleventyConfig.addPassthroughCopy({"source/art/images": "art"}); @@ -35,6 +37,6 @@ module.exports = function (eleventyConfig) { }, markdownTemplateEngine: "njk", htmlTemplateEngine: "njk", - templateFormats: ["html", "njk"] + templateFormats: ["html", "njk", "md"] } }; diff --git a/gulp/config.js b/gulp/config.js index 257f453..7a03f07 100644 --- a/gulp/config.js +++ b/gulp/config.js @@ -17,7 +17,7 @@ const config = { hippie: { brand: 'hippie', - titlePrefix: ' - HIPPIE', + titlePostfix: ' - HIPPIE', pageBase: './' } }; 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 ec61f91..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 %} @@ -39,7 +39,7 @@

Übersicht aller Elemente

Es werden alle grundlegenden Elemente sowie ihre gestalteten Varianten angegeben. Die Elemente sind in Gruppen eingeteilt, die auch das W3Consortium (www.w3.org/TR/2017/REC-html52-20171214/index.html#contents) verwendet.

-

Zu jedem Element werden alle Attribute aufgelistet und die Umsetzung im HTML Dokument als Emmet Syntax dargestellt.

+

Zu jedem Element werden alle Attribute aufgelistet und die Umsetzung im HTML-Dokument als Emmet-Syntax dargestellt.

Bereiche

@@ -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 "demo/partials/_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 39fdcb4..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 "demo/partials/_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/demo/_maintenance.njk b/source/templates/hippie/_maintenance.njk similarity index 91% rename from source/templates/demo/_maintenance.njk rename to source/templates/hippie/_maintenance.njk index af00cb7..0635f17 100644 --- a/source/templates/demo/_maintenance.njk +++ b/source/templates/hippie/_maintenance.njk @@ -6,10 +6,9 @@ {% block head %} - {% block title %}{% endblock %} - - HIPPIE + {% block title %}{% endblock %}{{ hippie.titlePostfix }} - {% include "demo/partials/_meta.njk" %} + {% include "hippie/partials/_head_meta.njk" %} {% block meta %}{% endblock %} {% block links %} 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/macros/_nav.njk b/source/templates/hippie/macros/_nav.njk index 0178835..4f04ad4 100644 --- a/source/templates/hippie/macros/_nav.njk +++ b/source/templates/hippie/macros/_nav.njk @@ -1,10 +1,13 @@ - -{% macro main(data, active='') %} - -{% endmacro %} +{% macro main(data, active = '') %} + +{% endmacro %} \ No newline at end of file diff --git a/source/templates/hippie/macros/_placeholder.njk b/source/templates/hippie/macros/_placeholder.njk new file mode 100644 index 0000000..d82e4ff --- /dev/null +++ b/source/templates/hippie/macros/_placeholder.njk @@ -0,0 +1,13 @@ +{% macro email(class='', text='name@domain.tld') %} +{{ text }} +{# {{ 'name@domain.tld' | urlize | safe }} #} +{% endmacro %} +{% macro link(class='', text='domain.tld', href='http://domain.internal') %} +{{ text }} +{% endmacro %} +{% macro name(class='', text='Prename Surname') %} +{{ text }} +{% endmacro %} +{% macro address(class='', text='Street No., Postcode City') %} +{{ text }} +{% endmacro %} diff --git a/source/templates/hippie/macros/footer-status.njk b/source/templates/hippie/macros/footer-status.njk index 3f2e790..6668607 100644 --- a/source/templates/hippie/macros/footer-status.njk +++ b/source/templates/hippie/macros/footer-status.njk @@ -1,13 +1,17 @@ - -{% macro footer(email='admin@domain.tld', app='Application', version='ver.s.ion', system='System Name', domain='domain.tld:port', type) %} +{% macro footer(email = 'admin@domain.tld', app = 'Application', version = 'ver.s.ion', system = 'System Name', domain = 'domain.tld:port', type) %} -{% if not type or type == 'status' %} - -{% else %} - -{% endif %} -{% endmacro %} + {% if not type or type == 'status' %} + + {% else %} + + {% endif %} +{% endmacro %} \ No newline at end of file diff --git a/source/templates/demo/partials/_links.njk b/source/templates/hippie/partials/_head_links.njk similarity index 98% rename from source/templates/demo/partials/_links.njk rename to source/templates/hippie/partials/_head_links.njk index c95a39b..b7afb2d 100644 --- a/source/templates/demo/partials/_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 new file mode 100644 index 0000000..38c3b82 --- /dev/null +++ b/source/templates/hippie/partials/_head_meta.njk @@ -0,0 +1,7 @@ + + + + + + + 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