diff --git a/.eleventy.js b/.eleventy.js index 48791f7..673656e 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -35,8 +35,7 @@ export default async function (eleventyConfig) { name: 'Vorname Nachname', address: 'Straße Nr., PLZ Ort', phone: '+49 (0)101 1337 48', - mail: 'name@domain.tld', - domain: 'https://domain.tld' + mail: 'name@domain.tld' }, debugMode: true, legacyMode: false @@ -47,7 +46,7 @@ export default async function (eleventyConfig) { }); eleventyConfig.addShortcode('link', function (target, text, attrId, attrClass) { - if (!text || text === '') { + if (text === '') { text = target; } diff --git a/source/code/hippie/app.js b/source/code/hippie/app.js index 50efe38..f0028a5 100644 --- a/source/code/hippie/app.js +++ b/source/code/hippie/app.js @@ -341,7 +341,6 @@ 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 01a3c7d..8a115a9 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('pointerdown', this.onDown.bind(this)); - document.addEventListener('pointermove', this.onMove.bind(this)); - document.addEventListener('pointerup', this.onUp.bind(this)); + this.element.addEventListener('mousedown', this.onMouseDown.bind(this)); + document.addEventListener('mousemove', this.onMouseMove.bind(this)); + document.addEventListener('mouseup', this.onMouseUp.bind(this)); const dateElement = document.createElement('span'); @@ -34,7 +34,7 @@ class HippieTaskBar { this.setOptions(this.options.position); } - onDown(event) { + onMouseDown(event) { if (checkButtonAndTarget(event, this.element, 0)) { console.debug('Drag mode enabled'); @@ -48,7 +48,7 @@ class HippieTaskBar { event.preventDefault(); } - onMove(event) { + onMouseMove(event) { if (this.isDragging) { this.options.position = getClosestEdgeToMouse(event); const borderRadius = '4px'; @@ -116,7 +116,7 @@ class HippieTaskBar { } } - onUp() { + onMouseUp() { 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 d3c7a08..a300a21 100644 --- a/source/screens/demo/basics.liquid +++ b/source/screens/demo/basics.liquid @@ -2,7 +2,6 @@ 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 ca72d3f..7070190 100644 --- a/source/screens/demo/components.liquid +++ b/source/screens/demo/components.liquid @@ -2,7 +2,6 @@ title: Components tags: - demoIndex -order: 3 --- {% layout 'hippie/page.liquid' %} @@ -307,7 +306,7 @@ order: 3
- + CapsLock is on. diff --git a/source/screens/demo/examples/blog.liquid b/source/screens/demo/examples/blog.liquid deleted file mode 100644 index 59b9752..0000000 --- a/source/screens/demo/examples/blog.liquid +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Blog -tags: -- demoExample ---- -{% layout 'hippie/simple.liquid' %} - -{% block body %} -
-
-

Blog

-
- -
- {%- 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 new file mode 100644 index 0000000..9573419 --- /dev/null +++ b/source/screens/demo/examples/blog.njk @@ -0,0 +1,51 @@ +--- +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 %} + +
+
+

Blog

+
+ +

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 99b92e2..0200c08 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" -publishDate: JJJJ +releaseDate: JJJJ description: Text --- # Titel diff --git a/source/screens/demo/examples/card.liquid b/source/screens/demo/examples/card.liquid deleted file mode 100644 index dbe560b..0000000 --- a/source/screens/demo/examples/card.liquid +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Card -tags: -- demoExample ---- -{% assign pageClass = "html_card" %} -{% layout 'hippie/simple.liquid' %} - -{% block body %} -
-
- {% render 'hippie/partials/placeholder-flag.liquid', type: '', id: 'flag' %} - {% comment %}Background flag dithered{% 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 new file mode 100644 index 0000000..e05818d --- /dev/null +++ b/source/screens/demo/examples/card.njk @@ -0,0 +1,83 @@ +--- +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', '') }} + {# Background flag dithered #} +
+
+
+

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 b77d12b..c55f9a9 100644 --- a/source/screens/demo/examples/clock.liquid +++ b/source/screens/demo/examples/clock.liquid @@ -17,13 +17,11 @@ tags:
{% endblock %} -{% block assets %} +{% block script %} -{% endblock %} -{% block script %} -{% endblock %} - {%- block script %} {{ 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 37da17e..6a41fe5 100644 --- a/source/screens/demo/layouts.liquid +++ b/source/screens/demo/layouts.liquid @@ -2,7 +2,6 @@ title: Layouts tags: - demoIndex -order: 4 --- {% layout 'hippie/page.liquid' %} @@ -299,13 +298,14 @@ order: 4 {% endblock %} -{% block assets %} -{{ block.super -}} - -{% endblock %} {% block script %} {{ block.super -}} + -{% endblock %} -{% block script %} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/source/templates/hippie/default.liquid b/source/templates/hippie/default.liquid index 0d6c050..b8cdbfd 100644 --- a/source/templates/hippie/default.liquid +++ b/source/templates/hippie/default.liquid @@ -28,7 +28,6 @@ {%- block body %}{% endblock -%} -{%- block assets %}{% endblock -%} diff --git a/source/templates/hippie/full.liquid b/source/templates/hippie/full.liquid index dbbe4ae..d445469 100644 --- a/source/templates/hippie/full.liquid +++ b/source/templates/hippie/full.liquid @@ -36,13 +36,12 @@ {% 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 5c8881f..dd6e6ed 100644 --- a/source/templates/hippie/page.liquid +++ b/source/templates/hippie/page.liquid @@ -34,13 +34,11 @@ {% endblock %} -{% block assets %} +{% block script %} -{% endblock %} -{% block script %} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/source/templates/hippie/partials/placeholder-flag.liquid b/source/templates/hippie/partials/placeholder-flag.liquid index 6b6b048..280a48c 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 deleted file mode 100644 index 534da59..0000000 --- a/source/templates/hippie/partials/song.liquid +++ /dev/null @@ -1,10 +0,0 @@ -
-
-

{{ data.title }}

-
{{ data.releaseDate }}
-

{{ data.description }}

-
- {% comment %}
{{ content }}
{% endcomment %} - {{ content }} - -
\ No newline at end of file