diff --git a/.eleventy.js b/.eleventy.js
index 673656e..48791f7 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -35,7 +35,8 @@ export default async function (eleventyConfig) {
name: 'Vorname Nachname',
address: 'Straße Nr., PLZ Ort',
phone: '+49 (0)101 1337 48',
- mail: 'name@domain.tld'
+ mail: 'name@domain.tld',
+ domain: 'https://domain.tld'
},
debugMode: true,
legacyMode: false
@@ -46,7 +47,7 @@ export default async function (eleventyConfig) {
});
eleventyConfig.addShortcode('link', function (target, text, attrId, attrClass) {
- if (text === '') {
+ if (!text || text === '') {
text = target;
}
diff --git a/source/code/hippie/app.js b/source/code/hippie/app.js
index f0028a5..50efe38 100644
--- a/source/code/hippie/app.js
+++ b/source/code/hippie/app.js
@@ -341,6 +341,7 @@ class DateDisplay {
}
}
+// TODO: Kompatibilität für Zeiger
function checkButtonAndTarget(event, element, button = 0) {
return (
event.button === button &&
diff --git a/source/code/windows.js b/source/code/windows.js
index 8a115a9..01a3c7d 100644
--- a/source/code/windows.js
+++ b/source/code/windows.js
@@ -21,9 +21,9 @@ class HippieTaskBar {
// TODO: Ereignisse besser delegieren
init() {
- this.element.addEventListener('mousedown', this.onMouseDown.bind(this));
- document.addEventListener('mousemove', this.onMouseMove.bind(this));
- document.addEventListener('mouseup', this.onMouseUp.bind(this));
+ this.element.addEventListener('pointerdown', this.onDown.bind(this));
+ document.addEventListener('pointermove', this.onMove.bind(this));
+ document.addEventListener('pointerup', this.onUp.bind(this));
const dateElement = document.createElement('span');
@@ -34,7 +34,7 @@ class HippieTaskBar {
this.setOptions(this.options.position);
}
- onMouseDown(event) {
+ onDown(event) {
if (checkButtonAndTarget(event, this.element, 0)) {
console.debug('Drag mode enabled');
@@ -48,7 +48,7 @@ class HippieTaskBar {
event.preventDefault();
}
- onMouseMove(event) {
+ onMove(event) {
if (this.isDragging) {
this.options.position = getClosestEdgeToMouse(event);
const borderRadius = '4px';
@@ -116,7 +116,7 @@ class HippieTaskBar {
}
}
- onMouseUp() {
+ onUp() {
if (event.target === this.placeholder) {
console.debug('Drag mode disabled');
diff --git a/source/screens/demo/basics.liquid b/source/screens/demo/basics.liquid
index a300a21..d3c7a08 100644
--- a/source/screens/demo/basics.liquid
+++ b/source/screens/demo/basics.liquid
@@ -2,6 +2,7 @@
title: Basics
tags:
- demoIndex
+order: 2
---
{% layout 'hippie/page.liquid' %}
diff --git a/source/screens/demo/components.liquid b/source/screens/demo/components.liquid
index 7070190..ca72d3f 100644
--- a/source/screens/demo/components.liquid
+++ b/source/screens/demo/components.liquid
@@ -2,6 +2,7 @@
title: Components
tags:
- demoIndex
+order: 3
---
{% layout 'hippie/page.liquid' %}
@@ -306,7 +307,7 @@ tags:
Shift is pressed.
-
+
CapsLock is on.
diff --git a/source/screens/demo/examples/blog.liquid b/source/screens/demo/examples/blog.liquid
new file mode 100644
index 0000000..59b9752
--- /dev/null
+++ b/source/screens/demo/examples/blog.liquid
@@ -0,0 +1,32 @@
+---
+title: Blog
+tags:
+- demoExample
+---
+{% layout 'hippie/simple.liquid' %}
+
+{% block body %}
+
+
+
+
+ {%- for post in collections.article -%}
+
+ {{ post.content }}
+
+ {%- endfor -%}
+
+
{% text hippie.placeholders.name %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/source/screens/demo/examples/blog.njk b/source/screens/demo/examples/blog.njk
deleted file mode 100644
index 9573419..0000000
--- a/source/screens/demo/examples/blog.njk
+++ /dev/null
@@ -1,51 +0,0 @@
----
-title: Blog
-tags:
- - demoExample
----
-{% set pageBase = "../" %}
-{% set pageId = page.fileSlug %}
-
-{% extends "demo/_default.njk" %}
-{% import "hippie/macros/_placeholder.njk" as ph %}
-{% import "hippie/macros/_song.njk" as song %}
-
-{% block title %}{{ title }}
-{% endblock %}
-
-{% block head %}
- {{ super() }}
-{% endblock %}
-
-{% block body %}
-
-
-
-
-
Vorwort
-
Liederbuch für
- Name.
-
Gibt es gebunden und hier
- {{ ph.link() }}.
- Bestellungen bitte an
- {{ ph.name() }}
- richten.
-
- {%- for post in collections.article -%}
- {{ post.content }}
- {%- endfor -%}
-
-
{{ ph.name() }}
-
-{% endblock %}
\ No newline at end of file
diff --git a/source/screens/demo/examples/blog/article.md b/source/screens/demo/examples/blog/article.md
index 0200c08..99b92e2 100644
--- a/source/screens/demo/examples/blog/article.md
+++ b/source/screens/demo/examples/blog/article.md
@@ -3,7 +3,7 @@ tags:
- blog
- article
title: "Artikel"
-releaseDate: JJJJ
+publishDate: JJJJ
description: Text
---
# Titel
diff --git a/source/screens/demo/examples/card.liquid b/source/screens/demo/examples/card.liquid
new file mode 100644
index 0000000..dbe560b
--- /dev/null
+++ b/source/screens/demo/examples/card.liquid
@@ -0,0 +1,69 @@
+---
+title: Card
+tags:
+- demoExample
+---
+{% assign pageClass = "html_card" %}
+{% layout 'hippie/simple.liquid' %}
+
+{% block body %}
+
+
+ {% render 'hippie/partials/placeholder-flag.liquid', type: '', id: 'flag' %}
+ {% comment %}

{% endcomment %}
+
+
+
+ Titel
und Beschreibung
+ {% text hippie.placeholders.name %}
+
+ {% link hippie.placeholders.mail, '', '', 'card_address' %}
+ {% link hippie.placeholders.domain, 'site.tld', '', 'decent' %}
+ ·
+ {% text hippie.placeholders.address, '', 'decent' %}
+
+
+{% endblock %}
+
+{% block script %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/source/screens/demo/examples/card.njk b/source/screens/demo/examples/card.njk
deleted file mode 100644
index e05818d..0000000
--- a/source/screens/demo/examples/card.njk
+++ /dev/null
@@ -1,83 +0,0 @@
----
-title: Card
-tags:
- - demoExample
----
-{% set pageId = page.fileSlug %}
-{% set pageClass = "html_card" %}
-
-{% extends "demo/_default.njk" %}
-{% import "hippie/macros/_placeholder.njk" as ph %}
-
-{% block title %}{{ title }}
-{% endblock %}
-
-{% block head %}
- {{ super() }}
-{% endblock %}
-
-{% block body %}
-
-
-
-
- {{ ph.flag('svg', '', 'flag', '') }}
- {#

#}
-
-
-
-
Titel
und Beschreibung
-
{{ ph.name() }}
-
- {{ ph.email('card_address') }}
- {{ ph.link('decent', 'site.tld') }}
- ·
- {{ ph.address('decent') }}
-
-
-{% endblock %}
-
-{% block script %}
-
-{% endblock %}
\ No newline at end of file
diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid
index c55f9a9..b77d12b 100644
--- a/source/screens/demo/examples/clock.liquid
+++ b/source/screens/demo/examples/clock.liquid
@@ -17,11 +17,13 @@ tags:
{% endblock %}
-{% block script %}
+{% block assets %}
+{% endblock %}
+{% block script %}
+{% endblock %}
+
+{%- block script %}
+{{ block.super -}}
+{% block assets %}
+{{ block.super -}}
+{% endblock %}
+
+{%- block script %}
+{% endblock %}
+
{%- block script %}
{{ block.super -}}
-
-
{% endblock %}
\ No newline at end of file
diff --git a/source/screens/demo/layouts.liquid b/source/screens/demo/layouts.liquid
index 6a41fe5..37da17e 100644
--- a/source/screens/demo/layouts.liquid
+++ b/source/screens/demo/layouts.liquid
@@ -2,6 +2,7 @@
title: Layouts
tags:
- demoIndex
+order: 4
---
{% layout 'hippie/page.liquid' %}
@@ -298,14 +299,13 @@ tags:
{% endblock %}
+{% block assets %}
+{{ block.super -}}
+
+{% endblock %}
{% block script %}
{{ block.super -}}
-
+{% endblock %}
+{% block script %}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/source/templates/hippie/default.liquid b/source/templates/hippie/default.liquid
index b8cdbfd..0d6c050 100644
--- a/source/templates/hippie/default.liquid
+++ b/source/templates/hippie/default.liquid
@@ -28,6 +28,7 @@
{%- block body %}{% endblock -%}
+{%- block assets %}{% endblock -%}
diff --git a/source/templates/hippie/full.liquid b/source/templates/hippie/full.liquid
index d445469..dbbe4ae 100644
--- a/source/templates/hippie/full.liquid
+++ b/source/templates/hippie/full.liquid
@@ -36,12 +36,13 @@
{% render 'hippie/partials/log-log' with 'BODY start' as msg -%}
{%- block body %}{% endblock -%}
{% render 'hippie/partials/log-log' with 'BODY :: Loading script assets...' as msg -%}
+{%- block assets %}{% endblock -%}
+{% render 'hippie/partials/log-assets', state: true -%}
+{% render 'hippie/partials/log-log', msg: 'BODY :: Assets loaded, running page specific script...', arg: true -%}
{%- block script %}{% endblock -%}
-{% render 'hippie/partials/log-assets', state: true -%}
-{% render 'hippie/partials/log-log', msg: 'BODY :: Assets loaded, running page specific script...', arg: true -%}
{% render 'hippie/partials/log-log' with 'BODY end :: Page script might still be loading.' as msg -%}
{% render 'hippie/partials/log-log' with 'Application ready... or is it?' as msg -%}
diff --git a/source/templates/hippie/page.liquid b/source/templates/hippie/page.liquid
index dd6e6ed..5c8881f 100644
--- a/source/templates/hippie/page.liquid
+++ b/source/templates/hippie/page.liquid
@@ -34,11 +34,13 @@
{% endblock %}
-{% block script %}
+{% block assets %}
+{% endblock %}
+{% block script %}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/source/templates/hippie/partials/placeholder-flag.liquid b/source/templates/hippie/partials/placeholder-flag.liquid
index 280a48c..6b6b048 100644
--- a/source/templates/hippie/partials/placeholder-flag.liquid
+++ b/source/templates/hippie/partials/placeholder-flag.liquid
@@ -14,7 +14,7 @@
{% endcomment %}
- {% if desc != '' %}
+ {% if desc %}
{{ desc }}
{% endif %}
diff --git a/source/templates/hippie/partials/song.liquid b/source/templates/hippie/partials/song.liquid
new file mode 100644
index 0000000..534da59
--- /dev/null
+++ b/source/templates/hippie/partials/song.liquid
@@ -0,0 +1,10 @@
+
+
+ {{ data.title }}
+ {{ data.releaseDate }}
+ {{ data.description }}
+
+ {% comment %}{{ content }}
{% endcomment %}
+ {{ content }}
+
+
\ No newline at end of file