diff --git a/.eleventy.js b/.eleventy.js index 74e76be..48791f7 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -14,10 +14,20 @@ export default async function (eleventyConfig) { // trimTagRight : true, }); + eleventyConfig.setNunjucksEnvironmentOptions({ + // throwOnUndefined: true, + trimBlocks: true + }); + eleventyConfig.addGlobalData('permalink', () => { return (data) => `${data.page.filePathStem}.${data.page.outputFileExtension}`; }); + + let demoMode = false; + let pageBase = demoMode ? './demo/' : './'; + eleventyConfig.addGlobalData('hippie', { + pageBase: pageBase, brand: 'hippie', titlePrefix: '', titlePostfix: ' - HIPPIE', @@ -48,7 +58,7 @@ export default async function (eleventyConfig) { return `${text}`; }); - eleventyConfig.addPairedShortcode('brand', function (content, attrClass = 'brand', direction = 'first') { + eleventyConfig.addPairedShortcode("brand", function (content, attrClass = 'brand', direction = 'first') { const logo = ` - {% render 'hippie/partials/gate-list', - name: 'Tor mit Symbol und Liste', - url: '../demo', - image: image, - links: links - %} - {% render 'hippie/partials/gate-simple', name: 'Tor', url: '../demo' %} - -{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/portal.njk b/source/screens/demo/examples/portal.njk new file mode 100644 index 0000000..68268c7 --- /dev/null +++ b/source/screens/demo/examples/portal.njk @@ -0,0 +1,41 @@ +--- +title: Portal +tags: + - demoExample +--- +{% set pageId = page.fileSlug %} +{% set bodyClass = "body_portal" %} + +{% extends "demo/_default.njk" %} +{% import "hippie/macros/_gate.njk" as gate %} + +{% block title %}{{ title }} +{% endblock %} + +{% block head %} + {{ super() }} +{% endblock %} + +{% block body %} + +
+ {{ gate.list( + 'Tor mit Symbol und Liste', + '../demo', { + src: '/art/flag_websafe_128x80.gif', + alt: 'Flag of Interaktionsweise' + }, [ + { + name: '1', + href: 'http://domain.tld', + img: '../art/bullet.gif' + }, { + name: 'Zwei', + href: 'http://domain.tld', + img: '../art/bullet.gif' + } + ] + ) }} + {{ gate.simple('Tor', '../demo') }} +
+{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/layouts.liquid b/source/screens/demo/layouts.liquid index 958c545..37da17e 100644 --- a/source/screens/demo/layouts.liquid +++ b/source/screens/demo/layouts.liquid @@ -15,7 +15,7 @@ order: 4

Die Elemente werden fortlaufend komplexer

-

Bereiche (sections)

+

Bereiche (sections)

section

section.overflow>div.float_space_left>img^p+p>br+a.lineLink
@@ -169,9 +169,46 @@ order: 4 -
-
-

Gruppierung (grouping)

+ +

Interaktiv (interactive)

+

input

+
+ + + + + +
+

form

+
+

Show me a + + Sorted by + + + + Matching + + +

+
+ +

Gruppierung (grouping)

p

p.txt_right+p.txt_center+p.txt_left

Rechts

@@ -211,15 +248,8 @@ order: 4

Eingerückter Inhalt


-
-
-

Eingebettet

-
- {% render 'hippie/partials/placeholder-flag.liquid', type: '', width: '128', desc: 'Fahne von Interaktionsweise' %} -
-
-
-

Tabellen (tabular data)

+ +

Tabellen

table.link>thead>tr>th{ }+th{ab / zy}+th{neu / alt}^^(tbody>tr>td.icon[rowspan="2"]>img[width=16 height=16]^+td.link>span{name}+a[target=_blank]{url}^+td[rowspan="2"]{yyy-mm-dd}^tr>td.text>div.shorten{beschreibung})*2
@@ -260,57 +290,12 @@ order: 4 -
-
-

Formulare (forms)

-

form

-
-

Show me a - - Sorted by - - - - Matching - - -

-
- -
-
-

Anmeldung

- - -
-
-

input

-
- - - - - + +

Eingebettet

+
+ {% render 'hippie/partials/placeholder-flag.liquid', type: '', width: '128', desc: 'Fahne von Interaktionsweise' %}
-
-

Interaktiv (interactive)

-
{% endblock %} diff --git a/source/style/demo.scss b/source/style/demo.scss index 85090ad..43d9cbd 100644 --- a/source/style/demo.scss +++ b/source/style/demo.scss @@ -16,5 +16,4 @@ @use "modules/start"; @use "modules/clock"; @use "modules/game"; -@use "modules/login"; // @use "modules/YOUR-MODULE/YOUR-FILES"; diff --git a/source/style/modules/_login.scss b/source/style/modules/_login.scss deleted file mode 100644 index 3382d86..0000000 --- a/source/style/modules/_login.scss +++ /dev/null @@ -1,28 +0,0 @@ -@use "sass:color"; -@use "../hippie-style/hippie"; - -form[name="login"] { - display: flex; - align-items: center; - justify-content: center; - - & > div { - padding: hippie.$space_double; - background-color: color.adjust(hippie.basic_color(echo), $alpha: -0.4); - - p { - margin-top: 0; - color: hippie.$color_brightest; - } - - & > input { - display: block; - width: 100%; - margin-inline: 0; - } - - input:first-of-type { - margin-bottom: hippie.$space_basic; - } - } -} \ No newline at end of file diff --git a/source/templates/demo/_default.njk b/source/templates/demo/_default.njk new file mode 100644 index 0000000..e9b46de --- /dev/null +++ b/source/templates/demo/_default.njk @@ -0,0 +1,19 @@ + +{% 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/_main.njk b/source/templates/demo/_main.njk new file mode 100644 index 0000000..c2797e8 --- /dev/null +++ b/source/templates/demo/_main.njk @@ -0,0 +1,21 @@ + +{% extends "hippie/_main.njk" %} + +{% block meta %} + {% include "demo/partials/_meta.njk" %} + +{% endblock %} + +{% block links %} + {{ super() }} + {% if hippie.legacyMode %} + + + + + {% endif %} + + + + +{% endblock %} \ No newline at end of file diff --git a/source/templates/demo/partials/_meta.njk b/source/templates/demo/partials/_meta.njk new file mode 100644 index 0000000..1253aaa --- /dev/null +++ b/source/templates/demo/partials/_meta.njk @@ -0,0 +1,9 @@ + + + + + + + +{# #} +{# #} diff --git a/source/templates/demo/partials/exp-colors.njk b/source/templates/demo/partials/exp-colors.njk new file mode 100644 index 0000000..286b30f --- /dev/null +++ b/source/templates/demo/partials/exp-colors.njk @@ -0,0 +1,7 @@ + +{# var colors = [{name: "alpha", class: "alpha_color"}] #} + +{% set cls = cycler("odd", "even") %} +{% for row in rows %} +
{{ row.name }}
+{% endfor %} diff --git a/source/templates/hippie/_app.njk b/source/templates/hippie/_app.njk new file mode 100755 index 0000000..f0703d2 --- /dev/null +++ b/source/templates/hippie/_app.njk @@ -0,0 +1,52 @@ + + + + + + + {% block head %} + {{ hippie.titlePrefix }} + {%- block title %}{% endblock %}{{ hippie.titlePostfix }} + + {% block meta %} + {% include "hippie/partials/_head_meta.njk" %} + + {% endblock %} + + {% block links %}{% endblock %} + + {% endblock %} + + + + {% block body %}{% endblock %} + + {% block script %} + + + + + + + {% endblock %} + + \ No newline at end of file diff --git a/source/templates/hippie/_app_frame.njk b/source/templates/hippie/_app_frame.njk new file mode 100755 index 0000000..35ddd64 --- /dev/null +++ b/source/templates/hippie/_app_frame.njk @@ -0,0 +1,19 @@ + +{% extends "hippie/_app.njk" %} +{% import "hippie/macros/_io.njk" as io %} + +{% block head %} + {{ super() }} +{% endblock %} + +{% block title %}{{ title }}{% endblock %} + +{% block links %} + {{ super() }} + + +{% endblock %} + +{% block script %} + {{ super() }} +{% endblock %} \ No newline at end of file diff --git a/source/templates/hippie/_default.njk b/source/templates/hippie/_default.njk new file mode 100644 index 0000000..8756e7f --- /dev/null +++ b/source/templates/hippie/_default.njk @@ -0,0 +1,41 @@ + +{# {% if hippie.debugMode %} #} + {% import "hippie/macros/_log.njk" as log %} +{# {% endif %} #} + + + + + + + {% 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..3934cc1 --- /dev/null +++ b/source/templates/hippie/_main.njk @@ -0,0 +1,73 @@ + +{% 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_nav.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/_footer.njk b/source/templates/hippie/macros/_footer.njk new file mode 100644 index 0000000..4b27499 --- /dev/null +++ b/source/templates/hippie/macros/_footer.njk @@ -0,0 +1,23 @@ +{% macro status(email = 'admin@domain.tld', app = 'Application', version = 'ver.s.ion', system = 'System Name', domain = 'domain.tld:port') %} + +{% endmacro %} + +{% macro pinned(pos = 'bottom') %} + +{% endmacro %} + +{% macro main() %} + +{% endmacro %} \ No newline at end of file diff --git a/source/templates/hippie/macros/_gate.njk b/source/templates/hippie/macros/_gate.njk new file mode 100644 index 0000000..3ae1247 --- /dev/null +++ b/source/templates/hippie/macros/_gate.njk @@ -0,0 +1,30 @@ +{% macro list(name, url, image, links) %} +
+
+

+ {{ name }} +

+ + {{ image.alt }} + + {% if links %} + + {% endif %} +
+
+{% endmacro %} +{% macro simple(name, url) %} +
+
+

+ {{ name }} +

+
+
+{% endmacro %} \ No newline at end of file diff --git a/source/templates/hippie/macros/_header.njk b/source/templates/hippie/macros/_header.njk new file mode 100644 index 0000000..e074db7 --- /dev/null +++ b/source/templates/hippie/macros/_header.njk @@ -0,0 +1,30 @@ +{% macro main() %} +
+
+
+{% endmacro %} + +{% macro status(hippie, page) %} + {% import "hippie/macros/_state.njk" as state %} +
+

+ {{ hippie.brand | upper }} +

+ +
+

{{ state.coord("log")}} + / + {{ state.date("date")}} + / + {{ state.time("time")}}

+
+
+{% endmacro %} \ No newline at end of file diff --git a/source/templates/hippie/macros/_io.njk b/source/templates/hippie/macros/_io.njk new file mode 100644 index 0000000..f9a7300 --- /dev/null +++ b/source/templates/hippie/macros/_io.njk @@ -0,0 +1,49 @@ +{% macro frameHeader(title) %} +
+ + +
+{% endmacro %} + +{% macro frameFooter(title) %} + +{% endmacro %} + +{% macro statusBar(title) %} + +{% endmacro %} \ 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..e469527 --- /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 new file mode 100644 index 0000000..4fc5d93 --- /dev/null +++ b/source/templates/hippie/macros/_nav.njk @@ -0,0 +1,13 @@ +{% 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..f3c2fa1 --- /dev/null +++ b/source/templates/hippie/macros/_placeholder.njk @@ -0,0 +1,100 @@ +{% macro email(class = '', text = '', address = 'name@domain.tld') %} + {% if text === '' %} + {% set text = address %} + {% endif %} + + {{ text }} + {# {{ 'name@domain.tld' | urlize | safe }} #} +{% endmacro %} + +{% macro link(class = '', text = 'domain.tld', href = 'http://domain.internal') %} + {{ text }} +{% endmacro %} + +{% macro name(class = '', text = 'Vorname Nachname') %} + {{ text }} +{% endmacro %} + +{% macro address(class = '', text = 'Straße Nr., PLZ Ort') %} + {{ text }} +{% endmacro %} + +{% macro phone(class = '', text = '+49 (0)101 1337 48') %} + {{ text }} +{% endmacro %} + +{% macro brand(class = '', name = 'Marke') %} +
+ {# Brand logo #} + + + + + + + +

{{ name }}

+
+{% endmacro %} + +{% macro flag(type = '', src = '', id = '', desc = 'Fahne von Interaktionsweise', width = '128') %} + {% set height = width / 1.6 %} + {% if type === 'svg' or type === '' %} + + {# + + + + + + + + + + + #} + {% if desc !== '' %} + {{ desc }} + {% endif %} + + + + + + + + + + + {% elif type === 'img' %} + {% if src === 'file' %} + + + {{ desc }} + + {% else %} + {{ desc }} + {% endif %} + {% endif %} +{% endmacro %} \ No newline at end of file diff --git a/source/templates/hippie/macros/_song.njk b/source/templates/hippie/macros/_song.njk new file mode 100644 index 0000000..28c83d4 --- /dev/null +++ b/source/templates/hippie/macros/_song.njk @@ -0,0 +1,12 @@ +{% macro simple(index, data, content) %} +
+
+

{{ data.title }}

+
{{ data.releaseDate }}
+

{{ data.description }}

+
+ {#
{{ content }}
#} + {{ content | safe }} + +
+{% endmacro %} \ No newline at end of file diff --git a/source/templates/hippie/macros/_state.njk b/source/templates/hippie/macros/_state.njk new file mode 100644 index 0000000..ef1f34d --- /dev/null +++ b/source/templates/hippie/macros/_state.njk @@ -0,0 +1,16 @@ +{% macro coord(id, text = 'X: #, Y: ##') %} + {{ text }} +{% endmacro %} + +{% macro time(id, text = '00:00:00', postfix = ' Uhr') %} + {{ text }}{{ postfix }} +{% endmacro %} + +{% macro date(id) %} + + Wochentag, + ##. + Monat + #### + +{% endmacro %} \ No newline at end of file diff --git a/source/templates/hippie/macros/top-macro.njk b/source/templates/hippie/macros/top-macro.njk new file mode 100644 index 0000000..3b681c0 --- /dev/null +++ b/source/templates/hippie/macros/top-macro.njk @@ -0,0 +1,5 @@ +{% macro field(name, value='', type='text') %} +
+ +
+{% endmacro %} diff --git a/source/templates/hippie/partials/_body_nav.njk b/source/templates/hippie/partials/_body_nav.njk new file mode 100644 index 0000000..870d2a6 --- /dev/null +++ b/source/templates/hippie/partials/_body_nav.njk @@ -0,0 +1,34 @@ + +
+ +
+{#
+? +
#} \ No newline at end of file diff --git a/source/templates/hippie/partials/_footer.njk b/source/templates/hippie/partials/_footer.njk new file mode 100644 index 0000000..3b56531 --- /dev/null +++ b/source/templates/hippie/partials/_footer.njk @@ -0,0 +1,3 @@ + +{% import "hippie/macros/_footer.njk" as footer %} +{{ footer.main() }} \ No newline at end of file diff --git a/source/templates/hippie/partials/_head_links.njk b/source/templates/hippie/partials/_head_links.njk new file mode 100644 index 0000000..c95a39b --- /dev/null +++ b/source/templates/hippie/partials/_head_links.njk @@ -0,0 +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..a21d094 --- /dev/null +++ b/source/templates/hippie/partials/_head_meta.njk @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/source/templates/hippie/partials/_head_script.njk b/source/templates/hippie/partials/_head_script.njk new file mode 100644 index 0000000..7002ee5 --- /dev/null +++ b/source/templates/hippie/partials/_head_script.njk @@ -0,0 +1,114 @@ + + \ No newline at end of file diff --git a/source/templates/hippie/partials/_header.njk b/source/templates/hippie/partials/_header.njk new file mode 100644 index 0000000..2531200 --- /dev/null +++ b/source/templates/hippie/partials/_header.njk @@ -0,0 +1,3 @@ + +{% import "hippie/macros/_header.njk" as header %} +{{ header.main() }} \ No newline at end of file diff --git a/source/templates/hippie/partials/gate-list.liquid b/source/templates/hippie/partials/gate-list.liquid deleted file mode 100644 index 8c5fdea..0000000 --- a/source/templates/hippie/partials/gate-list.liquid +++ /dev/null @@ -1,19 +0,0 @@ -
-
-

- {{ name }} -

- - {{ image.alt }} - - {% if links %} - - {% endif %} -
-
diff --git a/source/templates/hippie/partials/gate-simple.liquid b/source/templates/hippie/partials/gate-simple.liquid deleted file mode 100644 index 9d0b54e..0000000 --- a/source/templates/hippie/partials/gate-simple.liquid +++ /dev/null @@ -1,7 +0,0 @@ -
-
-

- {{ name }} -

-
-
\ No newline at end of file