From 778d7d14d5e8d4dbcce2f9cb996afbc4d7accf27 Mon Sep 17 00:00:00 2001 From: Stephan Hagedorn Date: Sun, 9 Oct 2022 22:57:30 +0200 Subject: [PATCH 001/296] logPerf without JQuery (cherry picked from commit cf3fde601eae944582d4da70bfc76943675143b8) --- .../hippie/partials/_head_script.njk | 54 +++++++++++++++---- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/source/templates/hippie/partials/_head_script.njk b/source/templates/hippie/partials/_head_script.njk index 76743d9..e00bacc 100644 --- a/source/templates/hippie/partials/_head_script.njk +++ b/source/templates/hippie/partials/_head_script.njk @@ -1,9 +1,9 @@ #} + + + + + + +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples.njk b/source/screens/layouts.njk similarity index 99% rename from source/screens/demo/examples.njk rename to source/screens/layouts.njk index b598d75..253f66e 100644 --- a/source/screens/demo/examples.njk +++ b/source/screens/layouts.njk @@ -1,10 +1,10 @@ - + {% set pageBase = "../" %} -{% set pageId = "examples" %} +{% set pageId = "layouts" %} {% extends "demo/_extended.njk" %} -{% block title %}Examples{% endblock %} +{% block title %}Gestaltungen{% endblock %} {% block head %} {{ super() }} {% endblock %} diff --git a/source/screens/demo/blank.njk b/source/screens/pages/blank.njk similarity index 100% rename from source/screens/demo/blank.njk rename to source/screens/pages/blank.njk diff --git a/source/screens/demo/card.njk b/source/screens/pages/card.njk similarity index 100% rename from source/screens/demo/card.njk rename to source/screens/pages/card.njk diff --git a/source/screens/demo/error/304.njk b/source/screens/pages/error/304.njk similarity index 100% rename from source/screens/demo/error/304.njk rename to source/screens/pages/error/304.njk diff --git a/source/screens/demo/error/400.njk b/source/screens/pages/error/400.njk similarity index 100% rename from source/screens/demo/error/400.njk rename to source/screens/pages/error/400.njk diff --git a/source/screens/demo/error/401.njk b/source/screens/pages/error/401.njk similarity index 100% rename from source/screens/demo/error/401.njk rename to source/screens/pages/error/401.njk diff --git a/source/screens/demo/error/403.njk b/source/screens/pages/error/403.njk similarity index 100% rename from source/screens/demo/error/403.njk rename to source/screens/pages/error/403.njk diff --git a/source/screens/demo/error/404.njk b/source/screens/pages/error/404.njk similarity index 100% rename from source/screens/demo/error/404.njk rename to source/screens/pages/error/404.njk diff --git a/source/screens/demo/error/408.njk b/source/screens/pages/error/408.njk similarity index 100% rename from source/screens/demo/error/408.njk rename to source/screens/pages/error/408.njk diff --git a/source/screens/demo/error/500.njk b/source/screens/pages/error/500.njk similarity index 100% rename from source/screens/demo/error/500.njk rename to source/screens/pages/error/500.njk diff --git a/source/screens/demo/error/503.njk b/source/screens/pages/error/503.njk similarity index 100% rename from source/screens/demo/error/503.njk rename to source/screens/pages/error/503.njk diff --git a/source/screens/demo/maintenance.njk b/source/screens/pages/maintenance.njk similarity index 100% rename from source/screens/demo/maintenance.njk rename to source/screens/pages/maintenance.njk diff --git a/source/screens/demo/portal.njk b/source/screens/pages/portal.njk similarity index 100% rename from source/screens/demo/portal.njk rename to source/screens/pages/portal.njk From 8eb377717a30c9866c5e45d9390a7efc2c9374d1 Mon Sep 17 00:00:00 2001 From: sthag Date: Thu, 8 Aug 2024 20:35:08 +0200 Subject: [PATCH 018/296] fix: variable naming --- .eleventy.js | 5 +++-- gulp/config.js | 2 +- source/templates/demo/_default.njk | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index ce05d34..da25e16 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -9,9 +9,10 @@ module.exports = function (eleventyConfig) { }); eleventyConfig.addGlobalData("hippie", { + pageBase: './', brand: 'hippie', - titlePrefix: ' - HIPPIE', - pageBase: './' + titlePrefix: '', + titlePostfix: ' - HIPPIE' }); eleventyConfig.addPassthroughCopy({"source/art/images": "art"}); 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/templates/demo/_default.njk b/source/templates/demo/_default.njk index 902d5fb..1f67848 100644 --- a/source/templates/demo/_default.njk +++ b/source/templates/demo/_default.njk @@ -6,7 +6,7 @@ {% block head %} - {% block title %}{% endblock %}{{ hippie.titlePrefix }} + {% block title %}{% endblock %}{{ hippie.titlePostfix }} {% include "demo/partials/_meta.njk" %} {# #} From b17e16abd99ecdb1b65f3f1b392223cfa7bfc8f4 Mon Sep 17 00:00:00 2001 From: sthag Date: Thu, 8 Aug 2024 20:42:28 +0200 Subject: [PATCH 019/296] feat: add placeholder and rearrange files --- source/screens/{pages => demo}/card.njk | 9 +++--- source/screens/{pages => demo}/portal.njk | 0 source/screens/index.json | 22 +++++++++------ source/screens/index.njk | 10 +++++-- source/screens/pages/blank.njk | 2 +- source/screens/pages/error/304.njk | 2 +- source/screens/pages/error/400.njk | 2 +- source/screens/pages/error/401.njk | 2 +- source/screens/pages/error/403.njk | 2 +- source/screens/pages/error/404.njk | 2 +- source/screens/pages/error/408.njk | 2 +- source/screens/pages/error/500.njk | 2 +- source/screens/pages/error/503.njk | 2 +- source/screens/pages/maintenance.njk | 2 +- source/templates/demo/_default.njk | 2 +- source/templates/demo/_extended.njk | 2 +- .../{demo => hippie}/_maintenance.njk | 5 ++-- source/templates/hippie/macros/_nav.njk | 23 ++++++++------- .../templates/hippie/macros/_placeholder.njk | 13 +++++++++ .../templates/hippie/macros/footer-status.njk | 28 +++++++++++-------- .../partials/_head_links.njk} | 0 .../templates/hippie/partials/_head_meta.njk | 7 +++++ 22 files changed, 90 insertions(+), 51 deletions(-) rename source/screens/{pages => demo}/card.njk (93%) rename source/screens/{pages => demo}/portal.njk (100%) rename source/templates/{demo => hippie}/_maintenance.njk (91%) create mode 100644 source/templates/hippie/macros/_placeholder.njk rename source/templates/{demo/partials/_links.njk => hippie/partials/_head_links.njk} (100%) create mode 100644 source/templates/hippie/partials/_head_meta.njk diff --git a/source/screens/pages/card.njk b/source/screens/demo/card.njk similarity index 93% rename from source/screens/pages/card.njk rename to source/screens/demo/card.njk index 28ca934..9e8f93c 100644 --- a/source/screens/pages/card.njk +++ b/source/screens/demo/card.njk @@ -4,6 +4,7 @@ {% set pageClass = "html_card" %} {% extends "demo/_default.njk" %} +{% import "hippie/macros/_placeholder.njk" as ph %} {% block title %}Karte{% endblock %} @@ -42,12 +43,12 @@

Titel
and description

-

Prename Surname

+

{{ ph.name() }}

- name@domain.tld
- site.tld + {{ ph.email('card_address') }}
+ {{ ph.link('decent', 'site.tld') }} · - Street No., Postcode City

+ {{ ph.address('decent') }}

{% endblock %} diff --git a/source/screens/pages/portal.njk b/source/screens/demo/portal.njk similarity index 100% rename from source/screens/pages/portal.njk rename to source/screens/demo/portal.njk diff --git a/source/screens/index.json b/source/screens/index.json index e953b60..958c539 100644 --- a/source/screens/index.json +++ b/source/screens/index.json @@ -26,14 +26,6 @@ "href": "pages/blank.html", "text": "Blank" }, - { - "href": "pages/card.html", - "text": "Card" - }, - { - "href": "pages/portal.html", - "text": "Portal" - }, { "href": "pages/maintenance.html", "text": "Maintenance" @@ -66,5 +58,19 @@ "href": "pages/error/500.html", "text": "500" } + ], + "demo": [ + { + "href": "demo/card.html", + "text": "Card" + }, + { + "href": "demo/portal.html", + "text": "Portal" + }, + { + "href": "demo/songbook.html", + "text": "Songbook" + } ] } \ No newline at end of file diff --git a/source/screens/index.njk b/source/screens/index.njk index 4938f81..14a3f31 100644 --- a/source/screens/index.njk +++ b/source/screens/index.njk @@ -37,7 +37,6 @@

Pages

+

Demo

+ {% endblock %} diff --git a/source/screens/pages/blank.njk b/source/screens/pages/blank.njk index b68613e..5495640 100644 --- a/source/screens/pages/blank.njk +++ b/source/screens/pages/blank.njk @@ -3,7 +3,7 @@ {% set pageId = "blank" %} {% set pageClass = "h_full_view" %} -{% extends "demo/_default.njk" %} +{% extends "hippie/_default.njk" %} {% block title %}Blank{% endblock %} diff --git a/source/screens/pages/error/304.njk b/source/screens/pages/error/304.njk index 9b504b6..f452801 100644 --- a/source/screens/pages/error/304.njk +++ b/source/screens/pages/error/304.njk @@ -3,7 +3,7 @@ {% set pageId = "304" %} {% set bodyClass = "body_status" %} -{% extends "demo/_maintenance.njk" %} +{% extends "hippie/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} diff --git a/source/screens/pages/error/400.njk b/source/screens/pages/error/400.njk index d0032c1..aa13f9f 100644 --- a/source/screens/pages/error/400.njk +++ b/source/screens/pages/error/400.njk @@ -3,7 +3,7 @@ {% set pageId = "400" %} {% set bodyClass = "body_status" %} -{% extends "demo/_maintenance.njk" %} +{% extends "hippie/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} diff --git a/source/screens/pages/error/401.njk b/source/screens/pages/error/401.njk index 6a18d75..7eb424e 100644 --- a/source/screens/pages/error/401.njk +++ b/source/screens/pages/error/401.njk @@ -3,7 +3,7 @@ {% set pageId = "401" %} {% set bodyClass = "body_status" %} -{% extends "demo/_maintenance.njk" %} +{% extends "hippie/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} diff --git a/source/screens/pages/error/403.njk b/source/screens/pages/error/403.njk index c3dccc2..5223278 100644 --- a/source/screens/pages/error/403.njk +++ b/source/screens/pages/error/403.njk @@ -3,7 +3,7 @@ {% set pageId = "403" %} {% set bodyClass = "body_status" %} -{% extends "demo/_maintenance.njk" %} +{% extends "hippie/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} diff --git a/source/screens/pages/error/404.njk b/source/screens/pages/error/404.njk index 95b6beb..ff03c43 100644 --- a/source/screens/pages/error/404.njk +++ b/source/screens/pages/error/404.njk @@ -3,7 +3,7 @@ {% set pageId = "404" %} {% set bodyClass = "body_status" %} -{% extends "demo/_maintenance.njk" %} +{% extends "hippie/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} diff --git a/source/screens/pages/error/408.njk b/source/screens/pages/error/408.njk index 40275ff..5845223 100644 --- a/source/screens/pages/error/408.njk +++ b/source/screens/pages/error/408.njk @@ -3,7 +3,7 @@ {% set pageId = "408" %} {% set bodyClass = "body_status" %} -{% extends "demo/_maintenance.njk" %} +{% extends "hippie/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} diff --git a/source/screens/pages/error/500.njk b/source/screens/pages/error/500.njk index 7c94558..9ea0863 100644 --- a/source/screens/pages/error/500.njk +++ b/source/screens/pages/error/500.njk @@ -3,7 +3,7 @@ {% set pageId = "500" %} {% set bodyClass = "body_status" %} -{% extends "demo/_maintenance.njk" %} +{% extends "hippie/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} diff --git a/source/screens/pages/error/503.njk b/source/screens/pages/error/503.njk index a036838..a4c021f 100644 --- a/source/screens/pages/error/503.njk +++ b/source/screens/pages/error/503.njk @@ -3,7 +3,7 @@ {% set pageId = "503" %} {% set bodyClass = "body_status" %} -{% extends "demo/_maintenance.njk" %} +{% extends "hippie/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} diff --git a/source/screens/pages/maintenance.njk b/source/screens/pages/maintenance.njk index d5914ed..5bdae82 100644 --- a/source/screens/pages/maintenance.njk +++ b/source/screens/pages/maintenance.njk @@ -3,7 +3,7 @@ {% set pageId = "blank" %} {% set pageClass = "h_full_view" %} -{% extends "demo/_maintenance.njk" %} +{% extends "hippie/_maintenance.njk" %} {% block title %}Maintenance{% endblock %} diff --git a/source/templates/demo/_default.njk b/source/templates/demo/_default.njk index 1f67848..aac357f 100644 --- a/source/templates/demo/_default.njk +++ b/source/templates/demo/_default.njk @@ -21,7 +21,7 @@ logPerf('HEAD start :: Debugging performance...', debugOn); - {% include "demo/partials/_links.njk" %} + {% include "hippie/partials/_head_links.njk" %} {% block links %} {# #} {# #} diff --git a/source/templates/demo/_extended.njk b/source/templates/demo/_extended.njk index 39fdcb4..17aa1b0 100644 --- a/source/templates/demo/_extended.njk +++ b/source/templates/demo/_extended.njk @@ -21,7 +21,7 @@ logPerf('HEAD start :: Debugging performance...', debugOn); - {% include "demo/partials/_links.njk" %} + {% include "hippie/partials/_head_links.njk" %} {% block links %} 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/_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' %} -
-
Kontakt: {{ email }} * Server: {{ app }}/{{ version }} ({{ system }}) * Domain: {{ domain }}
-
-{% else %} -
-

Platzhalter unten fixiert

-
-{% endif %} -{% endmacro %} + {% if not type or type == 'status' %} +
+
Kontakt: + {{ email }} + * Server: + {{ app }}/{{ version }} + ({{ system }}) * Domain: + {{ domain }}
+
+ {% else %} +
+

Platzhalter unten fixiert

+
+ {% 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 100% rename from source/templates/demo/partials/_links.njk rename to source/templates/hippie/partials/_head_links.njk diff --git a/source/templates/hippie/partials/_head_meta.njk b/source/templates/hippie/partials/_head_meta.njk new file mode 100644 index 0000000..22c28a5 --- /dev/null +++ b/source/templates/hippie/partials/_head_meta.njk @@ -0,0 +1,7 @@ + + + + + + + From a5f07468e79a4b27eb72c94b8412a7dfe4fdba6e Mon Sep 17 00:00:00 2001 From: sthag Date: Fri, 9 Aug 2024 20:03:07 +0200 Subject: [PATCH 020/296] feat: enable markdown template format --- .eleventy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eleventy.js b/.eleventy.js index da25e16..490cc66 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -36,6 +36,6 @@ module.exports = function (eleventyConfig) { }, markdownTemplateEngine: "njk", htmlTemplateEngine: "njk", - templateFormats: ["html", "njk"] + templateFormats: ["html", "njk", "md"] } }; From c55c1c9b66e58f64b489d889829196a4c8124392 Mon Sep 17 00:00:00 2001 From: sthag Date: Fri, 9 Aug 2024 20:06:00 +0200 Subject: [PATCH 021/296] style: typos --- source/screens/components.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/screens/components.njk b/source/screens/components.njk index ec61f91..e1c2ab1 100644 --- a/source/screens/components.njk +++ b/source/screens/components.njk @@ -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

From be425e8be5723da9b5ee2081beacb040b1132e46 Mon Sep 17 00:00:00 2001 From: sthag Date: Sat, 10 Aug 2024 15:25:41 +0200 Subject: [PATCH 022/296] feat: change log output and template structure - new global variable debugMode - demo templates are now based on hippie defaults joined with template inheritance - add log macros - new function logAdd() - log uses global state --- .eleventy.js | 3 +- source/screens/basics.njk | 11 ++- source/screens/components.njk | 5 +- source/screens/demo/card.njk | 3 +- source/screens/demo/portal.njk | 2 +- source/screens/index.njk | 9 ++- source/screens/introduction.njk | 13 ++-- source/screens/layouts.njk | 5 +- source/screens/pages/blank.njk | 4 ++ source/templates/demo/_default.njk | 52 -------------- source/templates/demo/_demo.njk | 18 +++++ source/templates/demo/_docs.njk | 23 +++++++ source/templates/demo/_extended.njk | 67 ------------------- source/templates/demo/partials/_meta.njk | 2 +- source/templates/hippie/_default.njk | 41 ++++++++++++ source/templates/hippie/_main.njk | 50 ++++++++++++++ source/templates/hippie/macros/_log.njk | 24 +++++++ .../templates/hippie/partials/_head_links.njk | 2 +- .../templates/hippie/partials/_head_meta.njk | 2 +- .../hippie/partials/_head_script.njk | 25 +++++-- 20 files changed, 206 insertions(+), 155 deletions(-) delete mode 100644 source/templates/demo/_default.njk create mode 100644 source/templates/demo/_demo.njk create mode 100644 source/templates/demo/_docs.njk delete mode 100644 source/templates/demo/_extended.njk create mode 100644 source/templates/hippie/_default.njk create mode 100644 source/templates/hippie/_main.njk create mode 100644 source/templates/hippie/macros/_log.njk 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 From 4710f41f5a1cf2d6adb5ceaa3cecd449ef8e8def Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 11 Aug 2024 00:52:06 +0200 Subject: [PATCH 023/296] refactor: remove gulp leftovers --- .gitignore | 2 - gulp/config.js | 25 ---- gulp/modules/plumber.js | 25 ---- gulp/tasks/clean.js | 9 -- gulp/tasks/hello.js | 6 - gulp/tasks/sync.js | 26 ---- gulp/tasks/validate.js | 13 -- gulpfile.js | 305 ---------------------------------------- 8 files changed, 411 deletions(-) delete mode 100644 gulp/config.js delete mode 100644 gulp/modules/plumber.js delete mode 100644 gulp/tasks/clean.js delete mode 100644 gulp/tasks/hello.js delete mode 100644 gulp/tasks/sync.js delete mode 100644 gulp/tasks/validate.js delete mode 100644 gulpfile.js diff --git a/.gitignore b/.gitignore index 598f5d3..82b17e2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,7 @@ reports/** source/art/*.* source/art/images/** source/art/sprites/** -source/style/hippie-style/mixins/_sprite.scss !source/art/**/demo/ -source/templates/data.json source/data/** !source/data/**/demo.json diff --git a/gulp/config.js b/gulp/config.js deleted file mode 100644 index 7a03f07..0000000 --- a/gulp/config.js +++ /dev/null @@ -1,25 +0,0 @@ -const src = 'source/'; -const dev = 'build/'; -const dpl = 'deploy/'; -const rep = 'reports/'; - -const config = { - src: src, - dev: dev, - dpl: dpl, - rep: rep, - - demo: true, - //these are not used while demo: true is set - index: 'index.html', - templateData: src + 'templates/data.json', - frontendData: src + 'data/**/*.json', - - hippie: { - brand: 'hippie', - titlePostfix: ' - HIPPIE', - pageBase: './' - } -}; - -module.exports = config; \ No newline at end of file diff --git a/gulp/modules/plumber.js b/gulp/modules/plumber.js deleted file mode 100644 index cbb5dc9..0000000 --- a/gulp/modules/plumber.js +++ /dev/null @@ -1,25 +0,0 @@ -const plumber = require('gulp-plumber'); -// const notify = require('gulp-notify'); - -// function catchErrors(errTitle) { -// return plumber({ -// errorHandler: notify.onError({ -// // Customizing error title -// title: errTitle || "GULP GENERAL PROBLEM", -// message: "<%= error.message %>" -// }) -// }); -// } - -function catchErrors() { - return plumber({ - errorHandler: function (err) { - // Logs error in console - console.log(err.message); - // Ends the current pipe, so Gulp watch doesn't break - this.emit('end'); - } - }); -} - -module.exports = catchErrors; \ No newline at end of file diff --git a/gulp/tasks/clean.js b/gulp/tasks/clean.js deleted file mode 100644 index 667f6a3..0000000 --- a/gulp/tasks/clean.js +++ /dev/null @@ -1,9 +0,0 @@ -const config = require('../config'); -const del = require('del'); - -// Clean output folders -function clean() { - return del([config.dev + '**', config.rep + '**', config.dpl + '**']); -} - -module.exports = clean; \ No newline at end of file diff --git a/gulp/tasks/hello.js b/gulp/tasks/hello.js deleted file mode 100644 index bf1ef7e..0000000 --- a/gulp/tasks/hello.js +++ /dev/null @@ -1,6 +0,0 @@ -function hello (cb) { - console.log('He Stephan', cb); - cb(); -} - -module.exports = hello; \ No newline at end of file diff --git a/gulp/tasks/sync.js b/gulp/tasks/sync.js deleted file mode 100644 index 5f65a4f..0000000 --- a/gulp/tasks/sync.js +++ /dev/null @@ -1,26 +0,0 @@ -const config = require('../config'); -// const browserSync = require('browser-sync'), server = browserSync.create(); -const server = require('browser-sync').create(); - -// Automagically reload browsers -function reload(done) { - server.reload; - - done(); -} - -// Serve files to the browser -function serve(done) { - server.init({ - index: config.index, - open: false, - server: config.dev - }); - - done(); -} - -module.exports = { - serve: serve, - reload: reload -}; \ No newline at end of file diff --git a/gulp/tasks/validate.js b/gulp/tasks/validate.js deleted file mode 100644 index 0293245..0000000 --- a/gulp/tasks/validate.js +++ /dev/null @@ -1,13 +0,0 @@ -const { src } = require('gulp'); -const config = require('../config'); -const plumber = require('../modules/plumber'); -const htmlValidator = require('gulp-w3c-html-validator'); - -function validate() { - return src(config.dev + '**/*.html') - .pipe(plumber()) - .pipe(htmlValidator()) - .pipe(htmlValidator.reporter()); -} - -module.exports = validate; \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index f6cbecd..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,305 +0,0 @@ -// Use hippie -// const hippie = require('hippie/hippie'); - -// Setup project -const config = require('./gulp/config'); - -const hello = require('./gulp/tasks/hello'); -const plumber = require('./gulp/modules/plumber'); -const { serve, reload } = require('./gulp/tasks/sync'); -const clean = require('./gulp/tasks/clean'); -// const validate = require("./gulp/tasks/validate"); - -// Gulp requirements -const { watch, series, parallel } = require('gulp'); -const { src, dest } = require('gulp'); - -const fs = require('fs'); - -const nunjucksRender = require('gulp-nunjucks-render'); -// const nunjucks = require('gulp-nunjucks'); -const data = require('gulp-data'); -const jsonConcat = require('gulp-json-concat'); -const sass = require('gulp-sass')(require('sass')); -const autoprefixer = require('gulp-autoprefixer'); -const sassLint = require('gulp-sass-lint'); -const rename = require('gulp-rename'); -const cleanCss = require('gulp-clean-css'); -const pump = require('pump'); -const cached = require('gulp-cached'); -// const remember = require('gulp-remember'); -// const concat = require('gulp-concat'); -const uglify = require('gulp-uglify'); -const jshint = require('gulp-jshint'); -const gulpIf = require('gulp-if'); -const changed = require('gulp-changed'); -const merge = require('merge-stream'); -const spritesmith = require('gulp.spritesmith'); -// const babel = require('gulp-babel'); -// const buffer = require('vinyl-buffer'); -// const imagemin = require('gulp-imagemin'); -const useref = require('gulp-useref'); - -// Data variables -const input = { - screens: config.src + 'screens/**/*.+(njk|html)', - templates: config.src + 'templates/', - data: config.src + 'data/**/*.json', - style: config.src + 'style/**/*.s+(a|c)ss', - code: [ - // config.src + 'code/hippie/config.js', - // config.src + 'code/hippie/main.js', - config.src + 'code/hippie/variables.js', - config.src + 'code/hippie/functions.js', - config.src + 'code/hippie/global.js', - // config.src + 'code/**/*.js', - '!' + config.src + 'vendor/**/*' - ], - fonts: 'node_modules/@fortawesome/fontawesome-free/webfonts/**/*', - art: { - favicons: config.src + 'art/favicons/**/*.+(ico|png)', - sprites: config.src + 'art/sprites/**/*.png', - images: config.src + 'art/images/**/*.+(png|gif|jpg|svg|webp)' - }, - vendor: 'vendor/**/*' -}; - -const output = { - data: config.dev + 'json', - style: config.dev + 'css', - code: config.dev + 'js', - fonts: config.dev + 'fonts', - art: config.dev + 'art', - vendor: config.dev + 'vendor' -}; - -// Show demo content if configured -if (config.demo === true) { - config.index = 'demo.html'; - config.templateData = config.src + 'templates/demo/data.json'; -} else { - config.frontendData = [config.src + 'data/**/*.json', '!' + config.src + 'data/demo.json']; -} - -// Create tasks - -// Concatenate JSON files -function json() { - return src(config.frontendData) - .pipe(plumber()) - .pipe(jsonConcat('db.json', function (data) { - return new Buffer.from(JSON.stringify(data)); - })) - .pipe(dest(output.data)); -} - -function manageEnvironment(environment) { - environment.addFilter('slug', function (str) { - return str && str.replace(/\s/g, '-', str).toLowerCase(); - }); - - environment.addGlobal('hippie', config.hippie); -} - -// function getDataForTemplates (file) { -// const template = JSON.parse(fs.readFileSync(config.templateData)); -// const hippie = config.hippie; -// // console.log(file.relative); -// return { hippie, template }; -// } -function getDataForTemplates() { - const data = JSON.parse(fs.readFileSync(config.templateData)); - return { data }; -} - -// Transpile HTML -function nunjucks() { - return src(input.screens) - .pipe(plumber()) - // TODO only add data to pipe for necessary files - .pipe(data(getDataForTemplates)) - .pipe(nunjucksRender({ - path: input.templates, - envOptions: { - trimBlocks: true - }, - manageEnv: manageEnvironment - })) - .pipe(dest(config.dev)); -} - -// This is for the looks -function style() { - return src(input.style) - .pipe(plumber()) - // .pipe(sass.sync({ - .pipe(sass({ - includePaths: [input.vendor + '/**/*.s+(a|c)ss'] - }).on('error', sass.logError)) - .pipe(autoprefixer(['>= 4%', 'last 2 version'])) - .pipe(dest(output.style)) - .pipe(cleanCss()) - .pipe(rename({ - suffix: '.min' - })) - .pipe(dest(output.style)); -} -// Linting -function styleLint() { - const dir = config.rep; - if (!fs.existsSync(dir)) { - fs.mkdirSync(dir); - } - let file = fs.createWriteStream(config.rep + 'sass-lint.html'); - let stream = src(input.style) - .pipe(plumber()) - .pipe(sassLint({ - configFile: '.sasslintrc', - files: { - ignore: input.vendor + '/**/*.s+(a|c)ss' - } - })) - .pipe(sassLint.format(file)); - - stream.on('finish', function () { - file.end(); - }); - - return stream; -} - -// Javascript for the win -function code(cb) { - pump([ - src(input.code, { - sourcemaps: true, - allowEmpty: true - }), - plumber(), - // cache('code'), - // babel({ presets: ['@babel/env'] }), - // concat(config.hippie.jsFile + 'main.js'), - dest(output.code), - uglify(), - // remember('code'), - rename({ - suffix: '.min' - }), - dest(output.code, { sourcemaps: '.' }) - ], cb); -} - -// Linting -function codeLint() { - return src(input.code, { allowEmpty: true }) - .pipe(plumber()) - .pipe(jshint()) - .pipe(jshint.reporter('jshint-stylish')) - .pipe(jshint.reporter('fail', { - ignoreWarning: true, - ignoreInfo: true - })); -} - -// Fonts -function fonts() { - return src(input.fonts) - .pipe(plumber()) - .pipe(dest(output.fonts)); -} - -// Add art -function art() { - // Move favicons to the root folder - let favicons = src(input.art.favicons) - .pipe(plumber()) - .pipe(changed(output.art)) - .pipe(dest(config.dev)); - - // Move images to the root folder - let images = src(input.art.images) - .pipe(plumber()) - .pipe(changed(output.art)) - .pipe(dest(output.art)); - - return merge(favicons, images); -} -// function art() { -// // Move favicons and images to the root folder -// return src(input.art.favicons) -// .pipe(plumber()) -// .pipe(changed(config.dev)) -// .pipe(dest(config.dev)) -// .pipe(src(input.art.images)) -// .pipe(changed(output.art)) -// .pipe(dest(output.art)); -// } - - -function sprites() { - // Assemble sprites - let sprites = src(input.art.sprites) - .pipe(plumber()) - .pipe(changed(output.art)) - .pipe(spritesmith({ - imgName: 'sprite.png', - imgPath: '../art/sprite.png', - cssName: '_sprite.scss' - })); - - const imgStream = sprites.img - // DEV: We must buffer our stream into a Buffer for `imagemin` - // .pipe(buffer()) - // .pipe(imagemin()) - .pipe(dest(output.art)); - - const cssStream = sprites.css - .pipe(dest(config.src + 'style/hippie-style/mixins/')); - - return merge(imgStream, cssStream); -} - -// Gather dependencies for tools -function vendor() { - return src(input.vendor) - .pipe(plumber()) - .pipe(dest(output.vendor)); -} - -// TODO for distribution -function code2() { - return src(config.dev + '**/*.html') - .pipe(useref()) - .pipe(cached('useref')) - .pipe(gulpIf('*.js', uglify())) - .pipe(dest('dist')); -} - - - -function overview() { - watch([input.templates, input.screens, config.frontendData + 'data/**/*.json'], series(nunjucks, reload)); - // watch(input.style, series(styleLint, style, reload)); - watch(input.style, series(style, reload)); - // watch(input.code, series(codeLint, code, reload)); - watch(input.code, series(code, reload)); - watch(input.fonts, series(fonts, reload)); - watch(input.art.sprites, series(sprites, style, reload)); - watch([input.art.favicons, input.art.images], series(art, reload)); - watch(config.frontendData, series(json, reload)); -} - -const assets = parallel(fonts, art, sprites, json, vendor); -const build = series(clean, assets, parallel(nunjucks, style, code)); -// const dev = series(clean, assets, parallel(nunjucks, series(styleLint, style), series(codeLint, code))); -const dev = series(clean, assets, parallel(nunjucks, style, code)); - -exports.lint = parallel(series(style, styleLint), series(code, codeLint)); -// exports.validate = series(nunjucks, validate); -exports.assets = assets; -exports.build = build; -exports.dev = dev; -exports.dist = series(clean, assets, parallel(nunjucks, style), code2); -exports.default = series(dev, serve, overview); - -exports.hello = hello; From c18ed30b74ad05e5cad180ffbe041d3ad5232b53 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 11 Aug 2024 12:05:18 +0200 Subject: [PATCH 024/296] feat!: move every layout to demo folder - source/screens is now free for user files - rename demo templates to their equivalent sources - add demo maintenance template - demo templates use html base element --- .eleventy.js | 10 ++++-- source/screens/{ => demo}/basics.njk | 2 +- source/screens/{ => demo}/components.njk | 2 +- source/screens/demo/{ => examples}/card.njk | 2 +- source/screens/demo/{ => examples}/portal.njk | 2 +- source/screens/{ => demo}/index.json | 6 ++-- source/screens/{ => demo}/index.njk | 11 +++--- source/screens/{ => demo}/introduction.njk | 2 +- source/screens/{ => demo}/layouts.njk | 2 +- source/screens/{ => demo}/pages/blank.njk | 2 +- source/screens/{ => demo}/pages/error/304.njk | 4 +-- source/screens/{ => demo}/pages/error/400.njk | 4 +-- source/screens/{ => demo}/pages/error/401.njk | 4 +-- source/screens/{ => demo}/pages/error/403.njk | 4 +-- source/screens/{ => demo}/pages/error/404.njk | 4 +-- source/screens/{ => demo}/pages/error/408.njk | 4 +-- source/screens/{ => demo}/pages/error/500.njk | 4 +-- source/screens/{ => demo}/pages/error/503.njk | 4 +-- .../screens/{ => demo}/pages/maintenance.njk | 36 +++++++++---------- .../demo/{_demo.njk => _default.njk} | 4 +-- .../templates/demo/{_docs.njk => _main.njk} | 4 +-- source/templates/demo/_maintenance.njk | 13 +++++++ source/templates/hippie/_maintenance.njk | 12 +++---- 23 files changed, 82 insertions(+), 60 deletions(-) rename source/screens/{ => demo}/basics.njk (99%) rename source/screens/{ => demo}/components.njk (98%) rename source/screens/demo/{ => examples}/card.njk (98%) rename source/screens/demo/{ => examples}/portal.njk (93%) rename source/screens/{ => demo}/index.json (90%) rename source/screens/{ => demo}/index.njk (90%) rename source/screens/{ => demo}/introduction.njk (97%) rename source/screens/{ => demo}/layouts.njk (99%) rename source/screens/{ => demo}/pages/blank.njk (83%) rename source/screens/{ => demo}/pages/error/304.njk (94%) rename source/screens/{ => demo}/pages/error/400.njk (92%) rename source/screens/{ => demo}/pages/error/401.njk (93%) rename source/screens/{ => demo}/pages/error/403.njk (93%) rename source/screens/{ => demo}/pages/error/404.njk (93%) rename source/screens/{ => demo}/pages/error/408.njk (92%) rename source/screens/{ => demo}/pages/error/500.njk (92%) rename source/screens/{ => demo}/pages/error/503.njk (94%) rename source/screens/{ => demo}/pages/maintenance.njk (81%) rename source/templates/demo/{_demo.njk => _default.njk} (89%) rename source/templates/demo/{_docs.njk => _main.njk} (95%) create mode 100644 source/templates/demo/_maintenance.njk diff --git a/.eleventy.js b/.eleventy.js index ccca65a..5218bd8 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,4 +1,6 @@ module.exports = function (eleventyConfig) { + // eleventyConfig.addPlugin(EleventyHtmlBasePlugin); + eleventyConfig.setNunjucksEnvironmentOptions({ // throwOnUndefined: true, trimBlocks: true @@ -8,8 +10,11 @@ module.exports = function (eleventyConfig) { return (data) => `${data.page.filePathStem}.${data.page.outputFileExtension}`; }); + let demoMode = false; + let pageBase = demoMode ? './demo/' : './'; + eleventyConfig.addGlobalData("hippie", { - pageBase: './', + pageBase: pageBase, brand: 'hippie', titlePrefix: '', titlePostfix: ' - HIPPIE', @@ -37,6 +42,7 @@ module.exports = function (eleventyConfig) { }, markdownTemplateEngine: "njk", htmlTemplateEngine: "njk", - templateFormats: ["html", "njk", "md"] + templateFormats: ["html", "njk", "md"], + // pathPrefix: './demo/' } }; diff --git a/source/screens/basics.njk b/source/screens/demo/basics.njk similarity index 99% rename from source/screens/basics.njk rename to source/screens/demo/basics.njk index f31fedb..252baf3 100644 --- a/source/screens/basics.njk +++ b/source/screens/demo/basics.njk @@ -2,7 +2,7 @@ {% set pageBase = "../" %} {% set pageId = "basics" %} -{% extends "demo/_docs.njk" %} +{% extends "demo/_main.njk" %} {% block title %}Grundlagen{% endblock %} {% block head %} diff --git a/source/screens/components.njk b/source/screens/demo/components.njk similarity index 98% rename from source/screens/components.njk rename to source/screens/demo/components.njk index 7b00a16..6a62414 100644 --- a/source/screens/components.njk +++ b/source/screens/demo/components.njk @@ -2,7 +2,7 @@ {% set pageBase = "../" %} {% set pageId = "components" %} -{% extends "demo/_docs.njk" %} +{% extends "demo/_main.njk" %} {% block title %}Komponenten{% endblock %} {% block head %} diff --git a/source/screens/demo/card.njk b/source/screens/demo/examples/card.njk similarity index 98% rename from source/screens/demo/card.njk rename to source/screens/demo/examples/card.njk index 3a76b3f..4a38369 100644 --- a/source/screens/demo/card.njk +++ b/source/screens/demo/examples/card.njk @@ -3,7 +3,7 @@ {% set pageId = "card" %} {% set pageClass = "html_card" %} -{% extends "demo/_demo.njk" %} +{% extends "demo/_default.njk" %} {% import "hippie/macros/_placeholder.njk" as ph %} {% block title %}Karte{% endblock %} diff --git a/source/screens/demo/portal.njk b/source/screens/demo/examples/portal.njk similarity index 93% rename from source/screens/demo/portal.njk rename to source/screens/demo/examples/portal.njk index b301203..c6e7b45 100644 --- a/source/screens/demo/portal.njk +++ b/source/screens/demo/examples/portal.njk @@ -3,7 +3,7 @@ {% set pageId = "index" %} {% set bodyClass = "body_portal" %} -{% extends "demo/_demo.njk" %} +{% extends "demo/_default.njk" %} {% import "demo/macros/_gates.njk" as gate %} diff --git a/source/screens/index.json b/source/screens/demo/index.json similarity index 90% rename from source/screens/index.json rename to source/screens/demo/index.json index 958c539..9469dfc 100644 --- a/source/screens/index.json +++ b/source/screens/demo/index.json @@ -61,15 +61,15 @@ ], "demo": [ { - "href": "demo/card.html", + "href": "examples/card.html", "text": "Card" }, { - "href": "demo/portal.html", + "href": "examples/portal.html", "text": "Portal" }, { - "href": "demo/songbook.html", + "href": "examples/songbook.html", "text": "Songbook" } ] diff --git a/source/screens/index.njk b/source/screens/demo/index.njk similarity index 90% rename from source/screens/index.njk rename to source/screens/demo/index.njk index 1724c5c..8468e88 100644 --- a/source/screens/index.njk +++ b/source/screens/demo/index.njk @@ -1,9 +1,12 @@ +--- +permalink: "/" +--- {% set pageBase = hippie.pageBase %} {% set pageId = "index" %} {% set pageClass = "h_full_view" %} -{% extends "demo/_demo.njk" %} +{% extends "demo/_default.njk" %} {% block title %}Index{% endblock %} {% block head %} @@ -39,7 +42,7 @@ @@ -48,7 +51,7 @@ @@ -56,7 +59,7 @@ diff --git a/source/screens/introduction.njk b/source/screens/demo/introduction.njk similarity index 97% rename from source/screens/introduction.njk rename to source/screens/demo/introduction.njk index aeea393..a4580ca 100644 --- a/source/screens/introduction.njk +++ b/source/screens/demo/introduction.njk @@ -2,7 +2,7 @@ {% set pageBase = "../" %} {% set pageId = "intro" %} -{% extends "demo/_docs.njk" %} +{% extends "demo/_main.njk" %} {% block title %}Einführung{% endblock %} {% block head %} diff --git a/source/screens/layouts.njk b/source/screens/demo/layouts.njk similarity index 99% rename from source/screens/layouts.njk rename to source/screens/demo/layouts.njk index 4bd7966..dce2d98 100644 --- a/source/screens/layouts.njk +++ b/source/screens/demo/layouts.njk @@ -2,7 +2,7 @@ {% set pageBase = "../" %} {% set pageId = "layouts" %} -{% extends "demo/_docs.njk" %} +{% extends "demo/_main.njk" %} {% block title %}Gestaltungen{% endblock %} {% block head %} diff --git a/source/screens/pages/blank.njk b/source/screens/demo/pages/blank.njk similarity index 83% rename from source/screens/pages/blank.njk rename to source/screens/demo/pages/blank.njk index 1d23c3f..de1faef 100644 --- a/source/screens/pages/blank.njk +++ b/source/screens/demo/pages/blank.njk @@ -3,7 +3,7 @@ {% set pageId = "blank" %} {% set pageClass = "h_full_view" %} -{% extends "hippie/_default.njk" %} +{% extends "demo/_default.njk" %} {% block title %}Blank{% endblock %} diff --git a/source/screens/pages/error/304.njk b/source/screens/demo/pages/error/304.njk similarity index 94% rename from source/screens/pages/error/304.njk rename to source/screens/demo/pages/error/304.njk index f452801..20db3e7 100644 --- a/source/screens/pages/error/304.njk +++ b/source/screens/demo/pages/error/304.njk @@ -3,14 +3,14 @@ {% set pageId = "304" %} {% set bodyClass = "body_status" %} -{% extends "hippie/_maintenance.njk" %} +{% extends "demo/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} {{ super() }} {% endblock %} -{% block main %} +{% block body %}

{{ pageId }}

Umleitung

diff --git a/source/screens/pages/error/400.njk b/source/screens/demo/pages/error/400.njk similarity index 92% rename from source/screens/pages/error/400.njk rename to source/screens/demo/pages/error/400.njk index aa13f9f..1122396 100644 --- a/source/screens/pages/error/400.njk +++ b/source/screens/demo/pages/error/400.njk @@ -3,14 +3,14 @@ {% set pageId = "400" %} {% set bodyClass = "body_status" %} -{% extends "hippie/_maintenance.njk" %} +{% extends "demo/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} {{ super() }} {% endblock %} -{% block main %} +{% block body %}

{{ pageId }}

Client-Fehler

diff --git a/source/screens/pages/error/401.njk b/source/screens/demo/pages/error/401.njk similarity index 93% rename from source/screens/pages/error/401.njk rename to source/screens/demo/pages/error/401.njk index 7eb424e..7e7108c 100644 --- a/source/screens/pages/error/401.njk +++ b/source/screens/demo/pages/error/401.njk @@ -3,14 +3,14 @@ {% set pageId = "401" %} {% set bodyClass = "body_status" %} -{% extends "hippie/_maintenance.njk" %} +{% extends "demo/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} {{ super() }} {% endblock %} -{% block main %} +{% block body %}

{{ pageId }}

Client-Fehler

diff --git a/source/screens/pages/error/403.njk b/source/screens/demo/pages/error/403.njk similarity index 93% rename from source/screens/pages/error/403.njk rename to source/screens/demo/pages/error/403.njk index 5223278..3fc9b1d 100644 --- a/source/screens/pages/error/403.njk +++ b/source/screens/demo/pages/error/403.njk @@ -3,14 +3,14 @@ {% set pageId = "403" %} {% set bodyClass = "body_status" %} -{% extends "hippie/_maintenance.njk" %} +{% extends "demo/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} {{ super() }} {% endblock %} -{% block main %} +{% block body %}

{{ pageId }}

Client-Fehler

diff --git a/source/screens/pages/error/404.njk b/source/screens/demo/pages/error/404.njk similarity index 93% rename from source/screens/pages/error/404.njk rename to source/screens/demo/pages/error/404.njk index ff03c43..ba9e0cd 100644 --- a/source/screens/pages/error/404.njk +++ b/source/screens/demo/pages/error/404.njk @@ -3,14 +3,14 @@ {% set pageId = "404" %} {% set bodyClass = "body_status" %} -{% extends "hippie/_maintenance.njk" %} +{% extends "demo/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} {{ super() }} {% endblock %} -{% block main %} +{% block body %}

{{ pageId }}

Client-Fehler

diff --git a/source/screens/pages/error/408.njk b/source/screens/demo/pages/error/408.njk similarity index 92% rename from source/screens/pages/error/408.njk rename to source/screens/demo/pages/error/408.njk index 5845223..6c679ab 100644 --- a/source/screens/pages/error/408.njk +++ b/source/screens/demo/pages/error/408.njk @@ -3,14 +3,14 @@ {% set pageId = "408" %} {% set bodyClass = "body_status" %} -{% extends "hippie/_maintenance.njk" %} +{% extends "demo/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} {{ super() }} {% endblock %} -{% block main %} +{% block body %}

{{ pageId }}

Client-Fehler

diff --git a/source/screens/pages/error/500.njk b/source/screens/demo/pages/error/500.njk similarity index 92% rename from source/screens/pages/error/500.njk rename to source/screens/demo/pages/error/500.njk index 9ea0863..001c27a 100644 --- a/source/screens/pages/error/500.njk +++ b/source/screens/demo/pages/error/500.njk @@ -3,14 +3,14 @@ {% set pageId = "500" %} {% set bodyClass = "body_status" %} -{% extends "hippie/_maintenance.njk" %} +{% extends "demo/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} {{ super() }} {% endblock %} -{% block main %} +{% block body %}

{{ pageId }}

Server-Fehler

diff --git a/source/screens/pages/error/503.njk b/source/screens/demo/pages/error/503.njk similarity index 94% rename from source/screens/pages/error/503.njk rename to source/screens/demo/pages/error/503.njk index a4c021f..4ca521d 100644 --- a/source/screens/pages/error/503.njk +++ b/source/screens/demo/pages/error/503.njk @@ -3,14 +3,14 @@ {% set pageId = "503" %} {% set bodyClass = "body_status" %} -{% extends "hippie/_maintenance.njk" %} +{% extends "demo/_maintenance.njk" %} {% block title %}{{ pageId }}{% endblock %} {% block head %} {{ super() }} {% endblock %} -{% block main %} +{% block body %}

{{ pageId }}

Server-Fehler

diff --git a/source/screens/pages/maintenance.njk b/source/screens/demo/pages/maintenance.njk similarity index 81% rename from source/screens/pages/maintenance.njk rename to source/screens/demo/pages/maintenance.njk index 5bdae82..03faa16 100644 --- a/source/screens/pages/maintenance.njk +++ b/source/screens/demo/pages/maintenance.njk @@ -1,18 +1,18 @@ - -{% set pageBase = "../" %} -{% set pageId = "blank" %} -{% set pageClass = "h_full_view" %} - -{% extends "hippie/_maintenance.njk" %} - -{% block title %}Maintenance{% endblock %} - -{% block head %} -{{ super() }} -{% endblock %} - -{% block main %} -
-

HIPPIE

-
-{% endblock %} + +{% set pageBase = "../" %} +{% set pageId = "blank" %} +{% set pageClass = "h_full_view" %} + +{% extends "demo/_maintenance.njk" %} + +{% block title %}Maintenance{% endblock %} + +{% block head %} +{{ super() }} +{% endblock %} + +{% block body %} +
+

HIPPIE

+
+{% endblock %} diff --git a/source/templates/demo/_demo.njk b/source/templates/demo/_default.njk similarity index 89% rename from source/templates/demo/_demo.njk rename to source/templates/demo/_default.njk index afc2aae..19f5c0b 100644 --- a/source/templates/demo/_demo.njk +++ b/source/templates/demo/_default.njk @@ -1,9 +1,9 @@ - + {% extends "hippie/_default.njk" %} {% block meta %} {% include "demo/partials/_meta.njk" %} - {# #} + {% endblock %} {% block links %} diff --git a/source/templates/demo/_docs.njk b/source/templates/demo/_main.njk similarity index 95% rename from source/templates/demo/_docs.njk rename to source/templates/demo/_main.njk index 97f765d..c80afc1 100644 --- a/source/templates/demo/_docs.njk +++ b/source/templates/demo/_main.njk @@ -1,9 +1,9 @@ - + {% extends "hippie/_main.njk" %} {% block meta %} {% include "demo/partials/_meta.njk" %} - {# #} + {% endblock %} {% block links %} diff --git a/source/templates/demo/_maintenance.njk b/source/templates/demo/_maintenance.njk new file mode 100644 index 0000000..0fe1365 --- /dev/null +++ b/source/templates/demo/_maintenance.njk @@ -0,0 +1,13 @@ + +{% extends "hippie/_maintenance.njk" %} + +{% block meta %} + {% include "demo/partials/_meta.njk" %} + +{% endblock %} + +{% block links %} + {{ super() }} + {# #} + {# #} +{% endblock %} diff --git a/source/templates/hippie/_maintenance.njk b/source/templates/hippie/_maintenance.njk index 0635f17..540b310 100644 --- a/source/templates/hippie/_maintenance.njk +++ b/source/templates/hippie/_maintenance.njk @@ -1,4 +1,5 @@ +{% import "hippie/macros/footer-status.njk" as status %} @@ -6,23 +7,22 @@ {% block head %} + {{ hippie.titlePrefix }} {% block title %}{% endblock %}{{ hippie.titlePostfix }} - {% include "hippie/partials/_head_meta.njk" %} - {% block meta %}{% endblock %} + {% block meta %} + {% include "hippie/partials/_head_meta.njk" %} + {% endblock %} {% block links %} - {% endblock %} {% endblock %} - {% block main %} - - {% import "hippie/macros/footer-status.njk" as status %} + {% block body %} {{ status.footer() }} {% endblock %} From da86b19aba5b186a230a6f3cdc5ade7ca453b493 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 11 Aug 2024 15:15:07 +0200 Subject: [PATCH 025/296] feat: use collections and add frontmatter --- source/screens/demo/basics.njk | 9 ++- source/screens/demo/components.njk | 9 ++- source/screens/demo/examples/card.njk | 9 ++- source/screens/demo/examples/portal.njk | 9 ++- source/screens/demo/index.json | 76 ----------------------- source/screens/demo/index.njk | 23 ++++--- source/screens/demo/introduction.njk | 7 ++- source/screens/demo/layouts.njk | 9 ++- source/screens/demo/pages/blank.njk | 10 +-- source/screens/demo/pages/error/304.njk | 10 +-- source/screens/demo/pages/error/400.njk | 10 +-- source/screens/demo/pages/error/401.njk | 10 +-- source/screens/demo/pages/error/403.njk | 10 +-- source/screens/demo/pages/error/404.njk | 10 +-- source/screens/demo/pages/error/408.njk | 10 +-- source/screens/demo/pages/error/500.njk | 10 +-- source/screens/demo/pages/error/503.njk | 10 +-- source/screens/demo/pages/maintenance.njk | 9 ++- source/screens/demo/pages/pages.json | 3 + 19 files changed, 117 insertions(+), 136 deletions(-) delete mode 100644 source/screens/demo/index.json create mode 100644 source/screens/demo/pages/pages.json diff --git a/source/screens/demo/basics.njk b/source/screens/demo/basics.njk index 252baf3..80c456f 100644 --- a/source/screens/demo/basics.njk +++ b/source/screens/demo/basics.njk @@ -1,6 +1,10 @@ - +--- +title: Basics +tags: + - index +--- {% set pageBase = "../" %} -{% set pageId = "basics" %} +{% set pageId = page.fileSlug %} {% extends "demo/_main.njk" %} @@ -10,6 +14,7 @@ {% endblock %} {% block main %} + {% include "hippie/partials/_body_nav.njk" %}
diff --git a/source/screens/demo/components.njk b/source/screens/demo/components.njk index 6a62414..eb07822 100644 --- a/source/screens/demo/components.njk +++ b/source/screens/demo/components.njk @@ -1,6 +1,10 @@ - +--- +title: Components +tags: + - index +--- {% set pageBase = "../" %} -{% set pageId = "components" %} +{% set pageId = page.fileSlug %} {% extends "demo/_main.njk" %} @@ -10,6 +14,7 @@ {% endblock %} {% block main %} +
{% include "hippie/partials/_body_nav.njk" %} diff --git a/source/screens/demo/examples/card.njk b/source/screens/demo/examples/card.njk index 4a38369..e917881 100644 --- a/source/screens/demo/examples/card.njk +++ b/source/screens/demo/examples/card.njk @@ -1,6 +1,10 @@ - +--- +title: Card +tags: + - example +--- {% set pageBase = "../" %} -{% set pageId = "card" %} +{% set pageId = page.fileSlug %} {% set pageClass = "html_card" %} {% extends "demo/_default.njk" %} @@ -13,6 +17,7 @@ {% endblock %} {% block body %} +
diff --git a/source/screens/demo/examples/portal.njk b/source/screens/demo/examples/portal.njk index c6e7b45..981602a 100644 --- a/source/screens/demo/examples/portal.njk +++ b/source/screens/demo/examples/portal.njk @@ -1,6 +1,10 @@ - +--- +title: Portal +tags: + - example +--- {% set pageBase = "../" %} -{% set pageId = "index" %} +{% set pageId = page.fileSlug %} {% set bodyClass = "body_portal" %} {% extends "demo/_default.njk" %} @@ -14,6 +18,7 @@ {% endblock %} {% block body %} +
{{ gate.list( 'Tor mit Symbol und Liste', diff --git a/source/screens/demo/index.json b/source/screens/demo/index.json deleted file mode 100644 index 9469dfc..0000000 --- a/source/screens/demo/index.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "index": [ - { - "href": "index.html", - "text": "Index" - }, - { - "href": "introduction.html", - "text": "Introduction" - }, - { - "href": "basics.html", - "text": "Basics" - }, - { - "href": "components.html", - "text": "Components" - }, - { - "href": "layouts.html", - "text": "Layouts" - } - ], - "pages": [ - { - "href": "pages/blank.html", - "text": "Blank" - }, - { - "href": "pages/maintenance.html", - "text": "Maintenance" - }, - { - "href": "pages/error/304.html", - "text": "304" - }, - { - "href": "pages/error/400.html", - "text": "400" - }, - { - "href": "pages/error/401.html", - "text": "401" - }, - { - "href": "pages/error/403.html", - "text": "403" - }, - { - "href": "pages/error/404.html", - "text": "404" - }, - { - "href": "pages/error/408.html", - "text": "408" - }, - { - "href": "pages/error/500.html", - "text": "500" - } - ], - "demo": [ - { - "href": "examples/card.html", - "text": "Card" - }, - { - "href": "examples/portal.html", - "text": "Portal" - }, - { - "href": "examples/songbook.html", - "text": "Songbook" - } - ] -} \ No newline at end of file diff --git a/source/screens/demo/index.njk b/source/screens/demo/index.njk index 8468e88..47f1c1e 100644 --- a/source/screens/demo/index.njk +++ b/source/screens/demo/index.njk @@ -1,9 +1,11 @@ --- permalink: "/" +title: Index +tags: + - index --- - {% set pageBase = hippie.pageBase %} -{% set pageId = "index" %} +{% set pageId = page.fileSlug %} {% set pageClass = "h_full_view" %} {% extends "demo/_default.njk" %} @@ -14,6 +16,7 @@ permalink: "/" {% endblock %} {% block body %} +

This is @@ -40,26 +43,26 @@ permalink: "/"

-

Pages

+

Page

-

Demo

+

Example

diff --git a/source/screens/demo/introduction.njk b/source/screens/demo/introduction.njk index a4580ca..d25b1ad 100644 --- a/source/screens/demo/introduction.njk +++ b/source/screens/demo/introduction.njk @@ -1,4 +1,8 @@ - +--- +title: Introduction +tags: + - index +--- {% set pageBase = "../" %} {% set pageId = "intro" %} @@ -10,6 +14,7 @@ {% endblock %} {% block main %} + {% include "hippie/partials/_body_nav.njk" %}
diff --git a/source/screens/demo/layouts.njk b/source/screens/demo/layouts.njk index dce2d98..e06b384 100644 --- a/source/screens/demo/layouts.njk +++ b/source/screens/demo/layouts.njk @@ -1,6 +1,10 @@ - +--- +title: Layouts +tags: + - index +--- {% set pageBase = "../" %} -{% set pageId = "layouts" %} +{% set pageId = page.fileSlug %} {% extends "demo/_main.njk" %} @@ -10,6 +14,7 @@ {% endblock %} {% block main %} +
{% include "hippie/partials/_body_nav.njk" %} diff --git a/source/screens/demo/pages/blank.njk b/source/screens/demo/pages/blank.njk index de1faef..3ff646f 100644 --- a/source/screens/demo/pages/blank.njk +++ b/source/screens/demo/pages/blank.njk @@ -1,18 +1,20 @@ - +--- +title: Blank +--- {% set pageBase = "../" %} -{% set pageId = "blank" %} +{% set pageId = page.fileSlug %} {% set pageClass = "h_full_view" %} {% extends "demo/_default.njk" %} -{% block title %}Blank{% endblock %} +{% block title %}{{ title }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block body %} - + {% endblock %} {% block script %} diff --git a/source/screens/demo/pages/error/304.njk b/source/screens/demo/pages/error/304.njk index 20db3e7..1d47451 100644 --- a/source/screens/demo/pages/error/304.njk +++ b/source/screens/demo/pages/error/304.njk @@ -1,18 +1,20 @@ - +--- +title: 304 +--- {% set pageBase = "../../" %} -{% set pageId = "304" %} +{% set pageId = page.fileSlug %} {% set bodyClass = "body_status" %} {% extends "demo/_maintenance.njk" %} -{% block title %}{{ pageId }}{% endblock %} +{% block title %}{{ title }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block body %}
-

{{ pageId }}

+

{{ title }}

Umleitung

Unverändert Not Modified

diff --git a/source/screens/demo/pages/error/400.njk b/source/screens/demo/pages/error/400.njk index 1122396..087b9a8 100644 --- a/source/screens/demo/pages/error/400.njk +++ b/source/screens/demo/pages/error/400.njk @@ -1,18 +1,20 @@ - +--- +title: 400 +--- {% set pageBase = "../../" %} -{% set pageId = "400" %} +{% set pageId = page.fileSlug %} {% set bodyClass = "body_status" %} {% extends "demo/_maintenance.njk" %} -{% block title %}{{ pageId }}{% endblock %} +{% block title %}{{ title }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block body %}
-

{{ pageId }}

+

{{ title }}

Client-Fehler

Fehlerhafte Anfrage! Bad Request

diff --git a/source/screens/demo/pages/error/401.njk b/source/screens/demo/pages/error/401.njk index 7e7108c..f38c3f9 100644 --- a/source/screens/demo/pages/error/401.njk +++ b/source/screens/demo/pages/error/401.njk @@ -1,18 +1,20 @@ - +--- +title: 401 +--- {% set pageBase = "../../" %} -{% set pageId = "401" %} +{% set pageId = page.fileSlug %} {% set bodyClass = "body_status" %} {% extends "demo/_maintenance.njk" %} -{% block title %}{{ pageId }}{% endblock %} +{% block title %}{{ title }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block body %}
-

{{ pageId }}

+

{{ title }}

Client-Fehler

Nicht autorisiert! Unauthorized

diff --git a/source/screens/demo/pages/error/403.njk b/source/screens/demo/pages/error/403.njk index 3fc9b1d..03904e4 100644 --- a/source/screens/demo/pages/error/403.njk +++ b/source/screens/demo/pages/error/403.njk @@ -1,18 +1,20 @@ - +--- +title: 403 +--- {% set pageBase = "../../" %} -{% set pageId = "403" %} +{% set pageId = page.fileSlug %} {% set bodyClass = "body_status" %} {% extends "demo/_maintenance.njk" %} -{% block title %}{{ pageId }}{% endblock %} +{% block title %}{{ title }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block body %}
-

{{ pageId }}

+

{{ title }}

Client-Fehler

Nicht erlaubt! Forbidden

diff --git a/source/screens/demo/pages/error/404.njk b/source/screens/demo/pages/error/404.njk index ba9e0cd..bebd4f5 100644 --- a/source/screens/demo/pages/error/404.njk +++ b/source/screens/demo/pages/error/404.njk @@ -1,18 +1,20 @@ - +--- +title: 404 +--- {% set pageBase = "../../" %} -{% set pageId = "404" %} +{% set pageId = page.fileSlug %} {% set bodyClass = "body_status" %} {% extends "demo/_maintenance.njk" %} -{% block title %}{{ pageId }}{% endblock %} +{% block title %}{{ title }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block body %}
-

{{ pageId }}

+

{{ title }}

Client-Fehler

Hier ist nichts. Not Found

diff --git a/source/screens/demo/pages/error/408.njk b/source/screens/demo/pages/error/408.njk index 6c679ab..c5e10e0 100644 --- a/source/screens/demo/pages/error/408.njk +++ b/source/screens/demo/pages/error/408.njk @@ -1,18 +1,20 @@ - +--- +title: 408 +--- {% set pageBase = "../../" %} -{% set pageId = "408" %} +{% set pageId = page.fileSlug %} {% set bodyClass = "body_status" %} {% extends "demo/_maintenance.njk" %} -{% block title %}{{ pageId }}{% endblock %} +{% block title %}{{ title }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block body %}
-

{{ pageId }}

+

{{ title }}

Client-Fehler

Zeitüberschreitung der Anforderung. Request Timeout

diff --git a/source/screens/demo/pages/error/500.njk b/source/screens/demo/pages/error/500.njk index 001c27a..d04c5c8 100644 --- a/source/screens/demo/pages/error/500.njk +++ b/source/screens/demo/pages/error/500.njk @@ -1,18 +1,20 @@ - +--- +title: 500 +--- {% set pageBase = "../../" %} -{% set pageId = "500" %} +{% set pageId = page.fileSlug %} {% set bodyClass = "body_status" %} {% extends "demo/_maintenance.njk" %} -{% block title %}{{ pageId }}{% endblock %} +{% block title %}{{ title }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block body %}
-

{{ pageId }}

+

{{ title }}

Server-Fehler

Allgemeiner Server Fehler!!! Internal Server Error

diff --git a/source/screens/demo/pages/error/503.njk b/source/screens/demo/pages/error/503.njk index 4ca521d..f215a54 100644 --- a/source/screens/demo/pages/error/503.njk +++ b/source/screens/demo/pages/error/503.njk @@ -1,18 +1,20 @@ - +--- +title: 503 +--- {% set pageBase = "../../" %} -{% set pageId = "503" %} +{% set pageId = page.fileSlug %} {% set bodyClass = "body_status" %} {% extends "demo/_maintenance.njk" %} -{% block title %}{{ pageId }}{% endblock %} +{% block title %}{{ title }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block body %}
-

{{ pageId }}

+

{{ title }}

Server-Fehler

Dienst nicht verfügbar. Service Unavailable

diff --git a/source/screens/demo/pages/maintenance.njk b/source/screens/demo/pages/maintenance.njk index 03faa16..b9cd3fe 100644 --- a/source/screens/demo/pages/maintenance.njk +++ b/source/screens/demo/pages/maintenance.njk @@ -1,17 +1,20 @@ - +--- +title: Maintenance +--- {% set pageBase = "../" %} -{% set pageId = "blank" %} +{% set pageId = page.fileSlug %} {% set pageClass = "h_full_view" %} {% extends "demo/_maintenance.njk" %} -{% block title %}Maintenance{% endblock %} +{% block title %}{{ title }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block body %} +

HIPPIE

diff --git a/source/screens/demo/pages/pages.json b/source/screens/demo/pages/pages.json new file mode 100644 index 0000000..bc9f264 --- /dev/null +++ b/source/screens/demo/pages/pages.json @@ -0,0 +1,3 @@ +{ + "tags": "page" +} From 23438e7cb374058c7831f54d2d02862351d84158 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 11 Aug 2024 15:34:55 +0200 Subject: [PATCH 026/296] fix: change tags for demo purpose --- source/screens/demo/basics.njk | 2 +- source/screens/demo/components.njk | 2 +- source/screens/demo/examples/card.njk | 2 +- source/screens/demo/examples/portal.njk | 2 +- source/screens/demo/index.njk | 8 ++++---- source/screens/demo/introduction.njk | 2 +- source/screens/demo/layouts.njk | 2 +- source/screens/demo/pages/pages.json | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/screens/demo/basics.njk b/source/screens/demo/basics.njk index 80c456f..bb0a2cc 100644 --- a/source/screens/demo/basics.njk +++ b/source/screens/demo/basics.njk @@ -1,7 +1,7 @@ --- title: Basics tags: - - index + - demoIndex --- {% set pageBase = "../" %} {% set pageId = page.fileSlug %} diff --git a/source/screens/demo/components.njk b/source/screens/demo/components.njk index eb07822..4e12ad5 100644 --- a/source/screens/demo/components.njk +++ b/source/screens/demo/components.njk @@ -1,7 +1,7 @@ --- title: Components tags: - - index + - demoIndex --- {% set pageBase = "../" %} {% set pageId = page.fileSlug %} diff --git a/source/screens/demo/examples/card.njk b/source/screens/demo/examples/card.njk index e917881..6902255 100644 --- a/source/screens/demo/examples/card.njk +++ b/source/screens/demo/examples/card.njk @@ -1,7 +1,7 @@ --- title: Card tags: - - example + - demoExample --- {% set pageBase = "../" %} {% set pageId = page.fileSlug %} diff --git a/source/screens/demo/examples/portal.njk b/source/screens/demo/examples/portal.njk index 981602a..b472f8e 100644 --- a/source/screens/demo/examples/portal.njk +++ b/source/screens/demo/examples/portal.njk @@ -1,7 +1,7 @@ --- title: Portal tags: - - example + - demoExample --- {% set pageBase = "../" %} {% set pageId = page.fileSlug %} diff --git a/source/screens/demo/index.njk b/source/screens/demo/index.njk index 47f1c1e..7037dce 100644 --- a/source/screens/demo/index.njk +++ b/source/screens/demo/index.njk @@ -2,7 +2,7 @@ permalink: "/" title: Index tags: - - index + - demoIndex --- {% set pageBase = hippie.pageBase %} {% set pageId = page.fileSlug %} @@ -43,7 +43,7 @@ tags:

Page

Example

-

Titel
and description

+

Titel
und Beschreibung

{{ ph.name() }}

{{ ph.email('card_address') }}
diff --git a/source/templates/hippie/macros/_placeholder.njk b/source/templates/hippie/macros/_placeholder.njk index d82e4ff..52f35be 100644 --- a/source/templates/hippie/macros/_placeholder.njk +++ b/source/templates/hippie/macros/_placeholder.njk @@ -5,9 +5,9 @@ {% macro link(class='', text='domain.tld', href='http://domain.internal') %} {{ text }} {% endmacro %} -{% macro name(class='', text='Prename Surname') %} +{% macro name(class='', text='Vorname Nachname') %} {{ text }} {% endmacro %} -{% macro address(class='', text='Street No., Postcode City') %} +{% macro address(class='', text='Straße Nr., PLZ Ort') %} {{ text }} {% endmacro %} From 42a20c83f50a2b81debb99b7869cc34c303dc277 Mon Sep 17 00:00:00 2001 From: sthag Date: Wed, 14 Aug 2024 18:08:41 +0200 Subject: [PATCH 035/296] feat: replace transition with new variable --- source/style/hippie-style | 2 +- source/style/modules/portal/_portal_module.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/style/hippie-style b/source/style/hippie-style index 84ddbce..ca9dbcb 160000 --- a/source/style/hippie-style +++ b/source/style/hippie-style @@ -1 +1 @@ -Subproject commit 84ddbceb9a130943c3833b3d937bd7beac2e71d3 +Subproject commit ca9dbcb48ceb8347aaff4b69e852e419f55ef65a diff --git a/source/style/modules/portal/_portal_module.scss b/source/style/modules/portal/_portal_module.scss index 325dcef..6477b6b 100644 --- a/source/style/modules/portal/_portal_module.scss +++ b/source/style/modules/portal/_portal_module.scss @@ -21,7 +21,7 @@ $portal_icon_size: 64px; padding-left: $portal_margin; overflow-x: hidden; overflow-y: auto; - transition: flex 500ms cubic-bezier(0, 0, 0.2, 1.4), background 800ms ease; + transition: $transition_best; &:hover { flex: 3; From 26f5539f3f270697875b3eb0130d1f68fb033590 Mon Sep 17 00:00:00 2001 From: sthag Date: Wed, 14 Aug 2024 18:25:06 +0200 Subject: [PATCH 036/296] feat: update submodule --- source/style/hippie-style | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/style/hippie-style b/source/style/hippie-style index ca9dbcb..2e100f7 160000 --- a/source/style/hippie-style +++ b/source/style/hippie-style @@ -1 +1 @@ -Subproject commit ca9dbcb48ceb8347aaff4b69e852e419f55ef65a +Subproject commit 2e100f72a90d9b29fdd1a053059631b8644d91dd From 3a867c169a09a334473ddfbdf02ee089d422fc08 Mon Sep 17 00:00:00 2001 From: sthag Date: Thu, 15 Aug 2024 22:41:12 +0200 Subject: [PATCH 037/296] feat: add ui examples --- source/code/app.js | 192 ++++++++++++++++++ source/data/new.json | 14 ++ source/screens/demo/examples/ui/drag.njk | 109 ++++++++++ source/screens/demo/examples/ui/new.njk | 81 ++++++++ source/screens/demo/examples/ui/settings.njk | 50 +++++ source/style/modules/ui/_new_module.scss | 121 +++++++++++ source/style/modules/ui/_settings_module.scss | 44 ++++ source/style/ui.scss | 5 + source/templates/demo/_app.njk | 29 +++ source/templates/demo/macros/_states.njk | 15 ++ 10 files changed, 660 insertions(+) create mode 100644 source/code/app.js create mode 100644 source/data/new.json create mode 100755 source/screens/demo/examples/ui/drag.njk create mode 100755 source/screens/demo/examples/ui/new.njk create mode 100755 source/screens/demo/examples/ui/settings.njk create mode 100755 source/style/modules/ui/_new_module.scss create mode 100755 source/style/modules/ui/_settings_module.scss create mode 100644 source/style/ui.scss create mode 100755 source/templates/demo/_app.njk create mode 100644 source/templates/demo/macros/_states.njk diff --git a/source/code/app.js b/source/code/app.js new file mode 100644 index 0000000..5ce57d0 --- /dev/null +++ b/source/code/app.js @@ -0,0 +1,192 @@ +//NEW + +function Clock(id){ + this.id = id; + + var that = this; + setInterval(function(){that.updateClock();}, 1000); + this.updateClock(); +} + +Clock.prototype.updateClock = function(){ + var date = new Date(); + var clock = document.getElementById(this.id); + //console.log(this); + clock.innerHTML = this.formatDigits(date.getHours()) + ":" + this.formatDigits(date.getMinutes()) + ":" + this.formatDigits(date.getSeconds()); +}; + +Clock.prototype.formatDigits = function(val){ + if(val<10) val = "0" + val; + + return val; +} + +//OLD + +var floor = Math.floor; + +function ongoing() { + + var now = new Date(); + + var w = Math.floor(now.getDay()); + var D = new Array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"); + var DNumb = Math.floor(now.getDate()); + var MNumb = Math.floor(now.getMonth()); + var M = new Array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"); + var y = Math.floor(now.getYear()); + if (y < 999) y += 1900; + + var ms = Math.floor(now.getMilliseconds()); + var s = Math.floor(now.getSeconds()); + var m = Math.floor(now.getMinutes() + s / 60); + var h = Math.floor(now.getHours() + m / 60); + + var j2000 = new Date(); // Bezugspunkt ist der 1.1.2000 0:00 UT (entspricht JD 2451544,5) + j2000.setUTCFullYear(2000,0,1); + j2000.setUTCHours(0,0,0,0); + + var utc = new Date(); + utc.setUTCFullYear(y,MNumb,DNumb); // Monate müssen im Wertebereich 0...11 übergeben werden + utc.setUTCHours(h,m,s,ms); + + var utc0 = new Date(); + utc0.setUTCFullYear(y,MNumb,DNumb); + utc0.setUTCHours(0,0,0,0); + + var jd = 2451544.5 + (utc-j2000) / 86400000; // Zählung erfolgt in Millisekunden, 1 Tag = 86.400.000 ms + var jdUTC0 = 2451544.5 + (utc0-j2000) / 86400000; + + var N = jd - 2451545.0; + var L = 280.460 + 0.9856474 * N; // mittlere ekliptikale Länge der Sonne + var g = 357.528 + 0.9856003 * N; // mittlere Anomalie + var el = L + 1.915 * Math.sin(g) + 0.020 * Math.sin(2*g); + var e = 23.439 - 0.0000004 * N; + var rektaszension = Math.atan((Math.cos(e)*Math.sin(el)) / Math.cos(el)); + + var T = (jdUTC0 - 2451545.0) / 36525; + var stGMT = (((6*3600) + (41*60) + 50.54841) + (8640184.812866*T) + (0.093104*Math.pow(T,2)) - (0.0000062*Math.pow(T,3))) / 3600; + + var stGMT2 = 6.697376 + 2400.05134 * T + 1.002738 * T; + var hWGMT = stGMT2 * 15; + var hW = hWGMT + 11.9566185772; + + var st = (stGMT + (now.getUTCHours()*1.00273790935)) + (11.9566185772/15); // Sommerzeit muss noch berücksichtigt werden + var st24 = Math.abs(st - (Math.round(st / 24) * 24)); + var stH = Math.floor(st24); + var stM = Math.floor((st24 % 1) * 60); + var stS = zeroFill(Math.floor((((st24 % 1) * 60) % 1) * 60), 2); + + var travelWidth = document.body.clientWidth; + var travelHeight = document.body.clientHeight; + var sunPosX = 0; + var sunPosY = 0; + var moonPosX = 0; + var moonPosY = 0; + + var sun = $("#sun").css({ + "left": (s / 60) * travelWidth, + "top": (m / 60) * travelHeight + }); + + $("#day").text(D[w]); + $("#dayNumb").text(DNumb); + $("#month").text(M[MNumb]); + $("#year").text(y); + $("#time").text('' + zeroFill(h, 2) + ':' + zeroFill(m, 2) + ':' + zeroFill(s, 2)); + + $("#julian").text(jd.toFixed(6)); + //$("#star").text(stH + ':' + stM + ':' + stS); + $("#star").text(stH + ':' + stM); + $("#star1").text(stGMT); + $("#star2").text(stGMT2); + +} + +function zeroFill( number, width ){ + width -= number.toString().length; + if ( width > 0 ){ + return new Array( width + (/\./.test( number ) ? 2 : 1) ).join( '0' ) + number; + } + return number + ""; // always return a string +} + +// create emails +function composeMail(tag, name, prov, suffix, text, topic) { + var trigger = tag.indexOf("."); + var mailString = name + '@' + prov + '.' + suffix; + var textString = mailString.replace(/@/g, "(at)"); + var descString = "Nachricht an " + mailString; + if (trigger == -1) { + if (!text) { + text = mailString; + } else if (text == "at") { + text = textString; + } else if (text == "to") { + text = descString; + } + if (!topic) { + topic = ""; + } else { + topic = "?subject=" + topic; + } + var old = $('#'+tag).html(); + $('#'+tag).html(old + text); + $('#'+tag).attr("href", "mailto:" + mailString + topic); + } else { + $(tag).each(function() { + if (!text) { + text = mailString; + } else if (text == "at") { + text = textString; + } else if (text == "to") { + text = descString; + } + if (!topic) { + topic = ""; + } else { + topic = "?subject=" + topic; + } + var old = $(this).html(); + $(this).html(old + text); + $(this).attr("href", "mailto:" + mailString + topic); + }); + } +} + +//Länge der Balken im Diagram berechnen +function barwidth(size, G, W) { + var s = size; + var g = G; + var w = W; + var p = ( w / g ) * 100; + var newW = s * ( p /100 ); + + return newW; +} +//String Element erweitern +String.prototype.transform = function() { + return parseFloat(this.replace(',', '.')); +} +//Array Element erweitern +Array.prototype.arrayAdd = function() { + return eval(this.join("+")); +} +//Speicherplatz in Prozent berechnen +function percentage(total, gigs, round) { + var totalSpace = total; + var singleSpace = gigs; + var z = round; + var p = singleSpace / ( totalSpace / 100 ); + + return p; +} +//Speicherplatz in GB berechnen +function gigabytes(percent, total, round) { + var occupiedPercent = percent; + var singleSpace = total; + var z = round; + var g = (singleSpace / 100 ) * occupiedPercent; + + return g; +} diff --git a/source/data/new.json b/source/data/new.json new file mode 100644 index 0000000..9d4a0a8 --- /dev/null +++ b/source/data/new.json @@ -0,0 +1,14 @@ +[ + { + "text": "Index", + "href": "/" + }, + { + "text": "Basics", + "href": "./demo/basics.html" + }, + { + "text": "Drag", + "href": "./demo/examples/ui/drag.html" + } +] \ No newline at end of file diff --git a/source/screens/demo/examples/ui/drag.njk b/source/screens/demo/examples/ui/drag.njk new file mode 100755 index 0000000..fbf7234 --- /dev/null +++ b/source/screens/demo/examples/ui/drag.njk @@ -0,0 +1,109 @@ +--- +title: Drag +tags: + - demoExample +--- +{% set pageId = page.fileSlug %} +{% set pageClass = "h_full_view" %} +{% set bodyClass = "body_drag" %} + +{% extends "demo/_app.njk" %} + +{% block title %}{{ title }}{% endblock %} + +{% block links %} + {{ super() }} + +{% endblock %} + +{% block head %} + {{ super() }} +{% endblock %} + +{% block body %} +

+{% endblock %} + +{%- block script %} + +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/ui/new.njk b/source/screens/demo/examples/ui/new.njk new file mode 100755 index 0000000..edc4d47 --- /dev/null +++ b/source/screens/demo/examples/ui/new.njk @@ -0,0 +1,81 @@ +--- +title: New +tags: + - demoExample +--- +{% set pageId = page.fileSlug %} +{% set pageClass = "h_full_view" %} +{% set bodyClass = "body_new" %} + +{% extends "demo/_app.njk" %} +{% import "demo/macros/_states.njk" as state %} + +{% block title %}{{ title }} +{% endblock %} + +{% block links %} + {{ super() }} + +{% endblock %} + +{% block head %} + {{ super() }} +{% endblock %} + +{% block body %} +
+

+ {{ hippie.brand | upper }} +

+ +
+

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

+
+
+
+ +
+
1
+
2
+
3
+
4
+
+
+{% endblock %} + +{%- block script %} + {{ super() }} + + + +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/ui/settings.njk b/source/screens/demo/examples/ui/settings.njk new file mode 100755 index 0000000..da61f8a --- /dev/null +++ b/source/screens/demo/examples/ui/settings.njk @@ -0,0 +1,50 @@ +--- +title: Settings +tags: + - demoExample + - ui +--- +{% set pageId = page.fileSlug %} +{% set pageClass = "h_full_view" %} +{% set bodyClass = "body_ui" %} + +{% extends "demo/_app.njk" %} + +{% block title %}{{ title }} +{% endblock %} + +{% block links %} + {{ super() }} + +{% endblock %} + +{% block head %} + {{ super() }} +{% endblock %} + +{% block body %} +
+
+
title-bar
+
+
+
+ +
section
+
+
+{% endblock %} + +{%- block script %} + {{ super() }} + + +{% endblock %} \ No newline at end of file diff --git a/source/style/modules/ui/_new_module.scss b/source/style/modules/ui/_new_module.scss new file mode 100755 index 0000000..1456663 --- /dev/null +++ b/source/style/modules/ui/_new_module.scss @@ -0,0 +1,121 @@ +$module_top_height: 32px; + +.body_new { + height: 100vh; + padding: $module_top_height + $space_basic $space_basic $space_basic; +} + +.body_drag { + height: 100vh; + // padding: $space_basic; +} + +.container { + display: grid; + height: 100%; + // margin: $space_basic; + // grid-template-columns: repeat(3, 1fr); + grid-template-rows: auto 1fr; + gap: $space_basic; +} + +.area { + width: 100%; + height: 100%; + transition: $transition_best; + + &:hover { + background-color: #999; + } +} + +.menu, #top { + nav ul { + margin: 0; + } +} + +.grid { + display: grid; + // grid-template-rows: repeat(2, 1fr); + // grid-template-columns: repeat(2, 1fr); + grid-template-areas: "a a"; + grid-auto-rows: 1fr; + grid-auto-columns: 1fr; +} + +.item { + // height: unset; + border-color: darken($color_back_basic, $color_diff_tiny); + border-style: dotted; + border-width: $width_border_8; + border-radius: $width_border_8; + padding: $space_basic; + background-color: rgb($color_back_basic, .5); + // background-color: lighten($color_back_basic, $color_diff_tiny); + // background-color: gold; +} + +.float { + min-height: 50%; +} + +#top { + position: fixed; + top: 0; + left: 0; + display: flex; + width: 100%; + height: $module_top_height; + background-color: rgb(0, 0, 0, .8); + z-index: $z_top; + + div:last-child { + flex: 1; + } + + p, + li { + color: #fff; + } + + h1 a { + color: #000; + } + + p, + li { + margin-top: 8px; + margin-bottom: 7px; + padding: 0 4px; + font-size: 12px; + line-height: 17px; + } + + nav ul { + display: flex; + margin-left: 16px; + } + + .brand { + height: 36px; + background-color: #fff; + margin: 0 0 0 128px; + padding: 7px 24px; + font-size: 16px; + line-height: 22px; + font-weight: bold; + text-align: center; + } + + .state { + margin-right: 16px; + text-align: right; + } +} + +#space { + position: relative; + height: 100%; + background-color: $color-dark; +} \ No newline at end of file diff --git a/source/style/modules/ui/_settings_module.scss b/source/style/modules/ui/_settings_module.scss new file mode 100755 index 0000000..9b9dc1b --- /dev/null +++ b/source/style/modules/ui/_settings_module.scss @@ -0,0 +1,44 @@ +$module_top_height: 32px; + +.body_ui { + height: 100vh; +} + +#frame { + position: relative; + height: 100%; + background-color: $color-dark; + + .title-bar { + button { + margin: 0 2px; + } + } + + main { + aside { + background-color: $color_brighter; + } + } +} + +.frame-flex { + display: flex; + flex-direction: column; + + .title-bar { + display: flex; + + div:last-child { + margin-left: auto; + } + } + + main { + flex: 1; + + aside, section { + height: 100%; + } + } +} \ No newline at end of file diff --git a/source/style/ui.scss b/source/style/ui.scss new file mode 100644 index 0000000..0a36d0d --- /dev/null +++ b/source/style/ui.scss @@ -0,0 +1,5 @@ +@import "demo_config"; +@import "hippie-style/hippie"; + +@import "modules/ui/new_module"; +@import "modules/ui/settings_module"; diff --git a/source/templates/demo/_app.njk b/source/templates/demo/_app.njk new file mode 100755 index 0000000..0939550 --- /dev/null +++ b/source/templates/demo/_app.njk @@ -0,0 +1,29 @@ + + + + + + + {% block head %} + {{ hippie.titlePrefix }} + {%- block title %}{% endblock %}{{ hippie.titlePostfix }} + + {% block meta %} + {% include "demo/partials/_meta.njk" %} + + {% endblock %} + + {% block links %} + {% endblock %} + + {% endblock %} + + + + {% block body %}{% endblock %} + + {% block script %} + {% endblock %} + + + \ No newline at end of file diff --git a/source/templates/demo/macros/_states.njk b/source/templates/demo/macros/_states.njk new file mode 100644 index 0000000..3b3a333 --- /dev/null +++ b/source/templates/demo/macros/_states.njk @@ -0,0 +1,15 @@ + +{% macro coord(id, text='X: #, Y: ##') %} + {{ text }} +{% endmacro %} +{% macro time(id, text='00:00:00', postfix=' Uhr') %} + {{ text }}{{ postfix }} +{% endmacro %} +{% macro date() %} + + Wochentag, + ##. + Monat + #### + +{% endmacro %} \ No newline at end of file From 22ad9eb6ccbc0ebebab6ae83506cf24bca670e04 Mon Sep 17 00:00:00 2001 From: sthag Date: Thu, 15 Aug 2024 22:49:11 +0200 Subject: [PATCH 038/296] feat: add new draggable elements --- source/screens/demo/examples/ui/drag.njk | 141 ++++++++++++----------- 1 file changed, 76 insertions(+), 65 deletions(-) diff --git a/source/screens/demo/examples/ui/drag.njk b/source/screens/demo/examples/ui/drag.njk index fbf7234..13b48d7 100755 --- a/source/screens/demo/examples/ui/drag.njk +++ b/source/screens/demo/examples/ui/drag.njk @@ -21,89 +21,100 @@ tags: {% endblock %} {% block body %} -
+ +
{% endblock %} {%- block script %} {% endblock %} \ No newline at end of file From 8e06f8feb880439afba7f82a1a6215abb5fd1aa4 Mon Sep 17 00:00:00 2001 From: sthag Date: Thu, 15 Aug 2024 22:59:52 +0200 Subject: [PATCH 039/296] feat: add color to draggables --- source/screens/demo/examples/ui/drag.njk | 21 +++++++++++++++++---- source/style/modules/ui/_new_module.scss | 8 ++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/source/screens/demo/examples/ui/drag.njk b/source/screens/demo/examples/ui/drag.njk index 13b48d7..a76f5bb 100755 --- a/source/screens/demo/examples/ui/drag.njk +++ b/source/screens/demo/examples/ui/drag.njk @@ -21,12 +21,12 @@ tags: {% endblock %} {% block body %} -
+ {% endblock %} {%- block script %} - + {% endblock %} \ No newline at end of file diff --git a/source/style/modules/ui/_new_module.scss b/source/style/modules/ui/_new_module.scss index 1456663..100284b 100755 --- a/source/style/modules/ui/_new_module.scss +++ b/source/style/modules/ui/_new_module.scss @@ -118,4 +118,12 @@ $module_top_height: 32px; position: relative; height: 100%; background-color: $color-dark; +} + +#addFrame { + @extend .io_button; + position: fixed; + top: 8px; + right: 8px; + margin: 0; } \ No newline at end of file From 4cf279bee5595cf8efd2e8e2ce44e4d834c96b37 Mon Sep 17 00:00:00 2001 From: sthag Date: Thu, 15 Aug 2024 23:06:21 +0200 Subject: [PATCH 040/296] feat: draggable is now a class --- source/screens/demo/examples/ui/drag.njk | 207 +++++++++++++---------- 1 file changed, 113 insertions(+), 94 deletions(-) diff --git a/source/screens/demo/examples/ui/drag.njk b/source/screens/demo/examples/ui/drag.njk index a76f5bb..61ab554 100755 --- a/source/screens/demo/examples/ui/drag.njk +++ b/source/screens/demo/examples/ui/drag.njk @@ -26,108 +26,127 @@ tags: {% endblock %} {%- block script %} - + // Create a new NewDiv instance + const newDiv = new NewDiv(100, 100, 800, 600, '#000'); + newDiv.createDiv(); + newDiv.appendToFrame(document.getElementById('space')); + {% endblock %} \ No newline at end of file From b039c506a89a15c449e6550cd3838d09d3ff3313 Mon Sep 17 00:00:00 2001 From: sthag Date: Sat, 12 Apr 2025 14:25:55 +0200 Subject: [PATCH 041/296] feat: Change and move content - Add info to basics - Move table variants from basic to components --- source/screens/demo/basics.njk | 109 ++------------------ source/screens/demo/components.njk | 122 ++++++++++++++++++++++- source/screens/demo/examples/ui/drag.njk | 2 +- 3 files changed, 133 insertions(+), 100 deletions(-) diff --git a/source/screens/demo/basics.njk b/source/screens/demo/basics.njk index bb0a2cc..566d527 100644 --- a/source/screens/demo/basics.njk +++ b/source/screens/demo/basics.njk @@ -203,20 +203,24 @@ tags:
figure>figcaption+{element}
+

Eine sehr klar definierte Gruppierung stellt das Element <main> dar. Es umschließt den hauptsächlichen Inhalt des Dokumentes.

Eine von sich aus undefinierte Möglichkeit zur Gruppierung von Text besteht durch <div>. Dieses Element hat, ohne weitere Klassifizierung keine Auswirkungen auf die Erscheinung oder die inhaltliche Aussage. Daher der allgemeine Einsatz.

-
+

Es wird allerdings häufig eingesetzt und bekommt vielfältige Funktionen zugeordnet wie diese hervorgehobene Information zeigt.

+
+ div.div_info>p +

Textebene

{# // a // em // strong // small // s // cite // q // dfn // abbr // ruby // rb // rt // rtc // rp // data // time // code // var // samp // kbd // sub // sup // i // b // u // mark // bdi // bdo // span // br // wbr // -- Edits -- // ins // del #}

Verweise

-

Ein wesentlicher Bestandteil von Hypertext sind Verweise +

Ein wesentlicher Bestandteil von Hypertext sind Verweise <a>. Sie dienen als Sprungmarken innerhalb des Netzwerks. Es kann grob zwischen internen und externen Verweisen unterschieden werden. Interne Verweise @@ -590,8 +594,7 @@ tags: Tabelle - - + mit @@ -599,117 +602,27 @@ tags: - + Kopf- und - Fußzeile - Fußzeile + Fußzeile A B

- table.width_full.table_fix>caption+thead>tr>th*3^^tbody>(tr>td*3)*3^^tfoot>tr>td*3 + table.width_full.table_fix>caption+thead>tr>th[scope="col"]*3^^tbody>(tr>td*3)*3^^tfoot>tr>th[scope="row"]+td*2
-
-

Viele weitere Formate sind möglich. Hier nur einige typische Beispiele:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KopfzeileAB
VorspalteEine
1erweiterte
2Tabelle
-
- table.width_full.table_stripe.table_free>tr>td*3 -
- - - - - - - - - - - - - - - - - - - - - -
Tabelle
ohneRahmen
jedochmit
Streifen
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Die Verteilung der Zellen ist hier von ihrem Inhalt abhängig.
BezeichnungMengeWert
Alpha18990
Bravo101
Charlie11
Summe9001
+

Viele weitere Formate sind möglich.

Formulare

diff --git a/source/screens/demo/components.njk b/source/screens/demo/components.njk index 4e12ad5..795e41f 100644 --- a/source/screens/demo/components.njk +++ b/source/screens/demo/components.njk @@ -46,8 +46,9 @@ tags:

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.

+
article>h1+p{Elemente:}+pre+h4{Varianten}
-

Bereiche

+

Bereiche

Elemente:

// body
// article
// section
// nav
// aside
// h1-h6
// header
// footer

<body>

@@ -62,6 +63,125 @@ tags:

<h3>

<h4>

+
+

Gruppierung

+

Elemente:

+
// p // address // hr // pre // blockquote // ol // ul // li // dl // dt // dd // figure // figcaption // main // div
+

<p>

+

Varianten

+
p.txt_center
+
p.txt_right
+
p.column_2
+
p.column_3.column_line
+

<hr>

+

Varianten

+
hr.hr_hidden
+
hr.hr_dotted
+
hr.space_even_half
+
hr.hr_dotted.space_even_fourth
+

<blockquote>

+
blockquote>p+p.quote_source
+

<figure>

+
figure>figcaption+{element}
+

<div>

+
div.div_info>p
+

Varianten

+
+
+

Tabellen

+

Elemente:

+
// table // caption // colgroup // col // tbody // thead // tfoot // tr // td // th
+

<table>

+

Varianten

+
table.width_full.table_fix>(thead>tr>th.cell_pre[scope="col"]+th[scope="col"]*3)+tbody>tr>td.cell_pre+td*3
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KopfzeileAB
VorspalteEine
1erweiterte
2Tabelle
+
table.width_full.table_stripe.table_fix.table_free>tr>td*3
+ + + + + + + + + + + + + + + + + + + + + +
Tabelle
ohneRahmen
jedochmit
Streifen
+
table.width_full.table_fix>(thead>tr>th[scope="col"]*3)+(tbody>tr>td*2+td.txt_right)+tfoot>tr>th[colspan="2"]+td.txt_right
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Die Verteilung der Zellen ist hier von ihrem Inhalt abhängig.
BezeichnungMengeWert
Alpha18990
Bravo101
Charlie11
Summe9001
+
{% endblock %} diff --git a/source/screens/demo/examples/ui/drag.njk b/source/screens/demo/examples/ui/drag.njk index 61ab554..15c24b1 100755 --- a/source/screens/demo/examples/ui/drag.njk +++ b/source/screens/demo/examples/ui/drag.njk @@ -147,6 +147,6 @@ tags: // Create a new NewDiv instance const newDiv = new NewDiv(100, 100, 800, 600, '#000'); newDiv.createDiv(); - newDiv.appendToFrame(document.getElementById('space')); + newDiv.appendToFrame(space); {% endblock %} \ No newline at end of file From 04a26a22894d25be81e832663bdf3fe32fcdc138 Mon Sep 17 00:00:00 2001 From: sthag Date: Sat, 12 Apr 2025 14:30:54 +0200 Subject: [PATCH 042/296] feat: Change meta link to button --- source/templates/hippie/partials/_body_nav.njk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/templates/hippie/partials/_body_nav.njk b/source/templates/hippie/partials/_body_nav.njk index 7d500b3..f38e940 100644 --- a/source/templates/hippie/partials/_body_nav.njk +++ b/source/templates/hippie/partials/_body_nav.njk @@ -10,9 +10,10 @@
  • {# #} - + {#
    -
    + #} +
  • From 024540e389bf980bcd1137820d540816520c5859 Mon Sep 17 00:00:00 2001 From: sthag Date: Sat, 12 Apr 2025 15:49:46 +0200 Subject: [PATCH 043/296] feat: Move macros for general usage --- source/screens/demo/examples/portal.njk | 2 +- source/screens/demo/examples/ui/new.njk | 2 +- .../{demo/macros/_gates.njk => hippie/macros/_gate.njk} | 0 .../{demo/macros/_states.njk => hippie/macros/_state.njk} | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename source/templates/{demo/macros/_gates.njk => hippie/macros/_gate.njk} (100%) rename source/templates/{demo/macros/_states.njk => hippie/macros/_state.njk} (100%) diff --git a/source/screens/demo/examples/portal.njk b/source/screens/demo/examples/portal.njk index 8c6bb73..5b96681 100644 --- a/source/screens/demo/examples/portal.njk +++ b/source/screens/demo/examples/portal.njk @@ -7,7 +7,7 @@ tags: {% set bodyClass = "body_portal" %} {% extends "demo/_default.njk" %} -{% import "demo/macros/_gates.njk" as gate %} +{% import "hippie/macros/_gate.njk" as gate %} {% block title %}{{ title }}{% endblock %} diff --git a/source/screens/demo/examples/ui/new.njk b/source/screens/demo/examples/ui/new.njk index edc4d47..c567309 100755 --- a/source/screens/demo/examples/ui/new.njk +++ b/source/screens/demo/examples/ui/new.njk @@ -8,7 +8,7 @@ tags: {% set bodyClass = "body_new" %} {% extends "demo/_app.njk" %} -{% import "demo/macros/_states.njk" as state %} +{% import "hippie/macros/_state.njk" as state %} {% block title %}{{ title }} {% endblock %} diff --git a/source/templates/demo/macros/_gates.njk b/source/templates/hippie/macros/_gate.njk similarity index 100% rename from source/templates/demo/macros/_gates.njk rename to source/templates/hippie/macros/_gate.njk diff --git a/source/templates/demo/macros/_states.njk b/source/templates/hippie/macros/_state.njk similarity index 100% rename from source/templates/demo/macros/_states.njk rename to source/templates/hippie/macros/_state.njk From 2e2091a179f37eb6df5f900efd2c57ec25d61c75 Mon Sep 17 00:00:00 2001 From: sthag Date: Sat, 12 Apr 2025 16:41:47 +0200 Subject: [PATCH 044/296] feat: Add soungbook example - Add songbook to demo - Add macro for song - Add style module --- source/screens/demo/examples/songbook.njk | 51 +++++++++++++++++++ .../demo/examples/songbook/0_artist-title.md | 26 ++++++++++ source/style/demo.scss | 1 + .../modules/songbook/_songbook_module.scss | 20 ++++++++ source/templates/hippie/macros/_song.njk | 12 +++++ 5 files changed, 110 insertions(+) create mode 100755 source/screens/demo/examples/songbook.njk create mode 100755 source/screens/demo/examples/songbook/0_artist-title.md create mode 100755 source/style/modules/songbook/_songbook_module.scss create mode 100644 source/templates/hippie/macros/_song.njk diff --git a/source/screens/demo/examples/songbook.njk b/source/screens/demo/examples/songbook.njk new file mode 100755 index 0000000..0b91499 --- /dev/null +++ b/source/screens/demo/examples/songbook.njk @@ -0,0 +1,51 @@ +--- +title: Songbook +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 %} + +
    +
    +

    Titel

    +

    Jahr

    +
    +
    +

    Vorwort

    +

    Liederbuch für + Name.

    +

    Gibt es gebunden und hier + {{ ph.link() }}.
    + Bestellungen bitte an + {{ ph.name() }} + richten.

    +
    + {%- for piece in collections.song -%} + {{ song.simple(loop.index0, piece.data, piece.content) }} + {%- endfor -%} +
    +
    {{ ph.name() }}
    +
    +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/songbook/0_artist-title.md b/source/screens/demo/examples/songbook/0_artist-title.md new file mode 100755 index 0000000..ccf1b5c --- /dev/null +++ b/source/screens/demo/examples/songbook/0_artist-title.md @@ -0,0 +1,26 @@ +--- +tags: + - songbook + - song +title: "Interpret - Titel" +releaseDate: JJJJ +description: Text +--- +~~~ +[verse 1] +strophe 1 + +[chorus] +refrain + +[verse 2] +strophe 2 + +[chorus] +[bridge] +überleitung + +[interlude] +[chorus] +[outro] +~~~ diff --git a/source/style/demo.scss b/source/style/demo.scss index e46a622..b3d4100 100644 --- a/source/style/demo.scss +++ b/source/style/demo.scss @@ -11,5 +11,6 @@ // ----------------------------------------------------------------------------- @import "modules/card/card_module"; @import "modules/portal/portal_module"; +@import "modules/songbook/songbook_module"; @import "modules/demo/demo_module"; // @import "modules/YOUR-MODULE/YOUR-FILES"; diff --git a/source/style/modules/songbook/_songbook_module.scss b/source/style/modules/songbook/_songbook_module.scss new file mode 100755 index 0000000..321f8bd --- /dev/null +++ b/source/style/modules/songbook/_songbook_module.scss @@ -0,0 +1,20 @@ +.songbook_song { + pre { + @extend .pre_code + } + + header { + h2 { + margin-bottom: $space_basic; + } + + h6 { + color: $color_brightest; + } + + h2+h6 { + margin-top: 0; + margin-bottom: $space_small; + } + } +} \ 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..79083c0 --- /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 }} +
    {{ index }}
    +
    +{% endmacro %} \ No newline at end of file From 2c61450238d13b88b5997c50517ba3157fe2028f Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 14 Apr 2025 20:16:10 +0200 Subject: [PATCH 045/296] feat: Separate style for drag example --- source/style/modules/ui/_drag_module.scss | 18 ++++++++++++++++++ source/style/modules/ui/_new_module.scss | 22 ++-------------------- source/style/ui.scss | 1 + 3 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 source/style/modules/ui/_drag_module.scss diff --git a/source/style/modules/ui/_drag_module.scss b/source/style/modules/ui/_drag_module.scss new file mode 100644 index 0000000..ac1dc6c --- /dev/null +++ b/source/style/modules/ui/_drag_module.scss @@ -0,0 +1,18 @@ +.body_drag { + height: 100vh; + // padding: $space_basic; +} + +#space { + position: relative; + height: 100%; + background-color: $color-dark; +} + +#addFrame { + @extend .io_button; + position: fixed; + top: 8px; + right: 8px; + margin: 0; +} \ No newline at end of file diff --git a/source/style/modules/ui/_new_module.scss b/source/style/modules/ui/_new_module.scss index 100284b..1c0d5a9 100755 --- a/source/style/modules/ui/_new_module.scss +++ b/source/style/modules/ui/_new_module.scss @@ -5,11 +5,6 @@ $module_top_height: 32px; padding: $module_top_height + $space_basic $space_basic $space_basic; } -.body_drag { - height: 100vh; - // padding: $space_basic; -} - .container { display: grid; height: 100%; @@ -29,7 +24,8 @@ $module_top_height: 32px; } } -.menu, #top { +.menu, +#top { nav ul { margin: 0; } @@ -112,18 +108,4 @@ $module_top_height: 32px; margin-right: 16px; text-align: right; } -} - -#space { - position: relative; - height: 100%; - background-color: $color-dark; -} - -#addFrame { - @extend .io_button; - position: fixed; - top: 8px; - right: 8px; - margin: 0; } \ No newline at end of file diff --git a/source/style/ui.scss b/source/style/ui.scss index 0a36d0d..d088323 100644 --- a/source/style/ui.scss +++ b/source/style/ui.scss @@ -3,3 +3,4 @@ @import "modules/ui/new_module"; @import "modules/ui/settings_module"; +@import "modules/ui/drag_module"; From a43def2e92ee4e6d511c05cfa0890c3f8ebe7e0c Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 14 Apr 2025 20:16:32 +0200 Subject: [PATCH 046/296] feat: New order for meta elements --- source/templates/hippie/partials/_head_meta.njk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/templates/hippie/partials/_head_meta.njk b/source/templates/hippie/partials/_head_meta.njk index 00c2efd..b55c7c2 100644 --- a/source/templates/hippie/partials/_head_meta.njk +++ b/source/templates/hippie/partials/_head_meta.njk @@ -1,7 +1,8 @@ - - - + + + + - + \ No newline at end of file From 58cb0eba2c6ba4ccc10024a4251d1cc054db63af Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 14 Apr 2025 20:50:23 +0200 Subject: [PATCH 047/296] feat: Add sprite folder to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d958f01..5e89ea2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ ################### build/** reports/** +source/art/sprites/ source/art/images/sprite.* # https://gist.github.com/octocat/9257657 From 37986e7b4b5537993bbc4f6343fa9ef097c9107c Mon Sep 17 00:00:00 2001 From: sthag Date: Fri, 2 May 2025 14:05:33 +0200 Subject: [PATCH 048/296] feat: Reflect style changes in hippie-style - Update submodule - Rename changed classes --- source/code/hippie/functions.js | 6 +++--- source/style/hippie-style | 2 +- source/templates/hippie/partials/_body_nav.njk | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/code/hippie/functions.js b/source/code/hippie/functions.js index 2e80761..602ca13 100644 --- a/source/code/hippie/functions.js +++ b/source/code/hippie/functions.js @@ -33,20 +33,20 @@ function HippieScroll($tp, $dn) { let initLeft = false; const initY = hippie.screen.vh; - $tp.addClass('hide'); + $tp.addClass('di_none'); // Check scroll position and toggle element this.check = function () { hippie.screen.y = Math.min($(document).scrollTop(), document.documentElement.scrollTop); if (hippie.screen.y > initY) { if (!initLeft) { - $tp.removeClass('hide'); + $tp.removeClass('di_none'); console.info('Initial viewport left'); } initLeft = true; } else { if (initLeft) { - $tp.addClass('hide'); + $tp.addClass('di_none'); console.info('Initial viewport entered'); } initLeft = false; diff --git a/source/style/hippie-style b/source/style/hippie-style index 2e100f7..9f3797f 160000 --- a/source/style/hippie-style +++ b/source/style/hippie-style @@ -1 +1 @@ -Subproject commit 2e100f72a90d9b29fdd1a053059631b8644d91dd +Subproject commit 9f3797f6516a63101fb8ebd23ab8229053ec57b6 diff --git a/source/templates/hippie/partials/_body_nav.njk b/source/templates/hippie/partials/_body_nav.njk index f38e940..db7ea52 100644 --- a/source/templates/hippie/partials/_body_nav.njk +++ b/source/templates/hippie/partials/_body_nav.njk @@ -2,7 +2,7 @@
    +

    Varianten

    +
    +
    + + + + Caps Lock is ON. +
    +
    +

    <select>

    + - - + + + {% endblock %} {% block script %} @@ -243,7 +265,7 @@ tags: .visibility = 'hidden'; } } - + function capsDetect() { const body = document.getElementsByTagName('body')[0]; const capsWarning = document.getElementById('error'); diff --git a/source/screens/demo/layouts.njk b/source/screens/demo/layouts.njk index 9672ea8..ab80554 100644 --- a/source/screens/demo/layouts.njk +++ b/source/screens/demo/layouts.njk @@ -15,304 +15,291 @@ tags: {% block main %} -
    -
    -
    -

    Sammlung formatierter Elemente

    -

    Die Elemente werden fortlaufend komplexer

    -
    -
    -

    <h3>

    -

    Beispiele

    -
    h3.txt_color_dark+p
    -

    Dunkle Überschrift

    -

    Mit normalem Textabsatz

    -

    <h4>

    -

    Beispiele

    -
    a>h4
    - -

    Überschrift als Block-Verweis

    -
    -

    <section>

    -
    section>div.float_space_left>img^p+p
    -
    -
    Fahne von interaktionsweise
    -

    Vorname Name
    Straße 1, 01234 Stadt

    -

    +49 (0)123 1337 0000
    - name@domain.tld -

    -
    -
    div.space_left_fourth
    -
    -
    -

    Eingerückter Inhalt

    -
    -
    -
    nav>ul>(li>a.a_button{punkt $})*4nav>ul>(li>a.a_button_border{stufe $})*4
    -
    - - -
    -
    nav.nav_horizontal>ul>(li>a.a_button{abschnitt $})*4nav.nav_center_old>ul>(li>a.a_button{typ $})*4
    -
    +

    Tabellen

    +
    table.table_link>thead>tr>th{&nbsp;}+th{ab / zy}+th{neu / alt}^^(tbody>tr>td.cell_icon[rowspan="2"]>img[width=16  height=16]^+td.cell_link>a[target=_blank]{name}+a[target=_blank]{url}^+td.cell_date[rowspan="2"]{yyy-mm-dd}^tr>td.cell_text>div.shorten{beschreibung})*2
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Eingebettet

    +
    + + Background flag + + + + + + + + + + +
    + + {% endblock %} {% block script %} From 7950d23b145b4dffe5a11fbc7ea660f3456f919b Mon Sep 17 00:00:00 2001 From: sthag Date: Thu, 19 Jun 2025 14:20:56 +0200 Subject: [PATCH 071/296] feat: More content for components and layouts - Update hippie styles - Add demo images - New components content - New layout structure and content --- source/art/images/demo/bullet.gif | Bin 0 -> 67 bytes source/art/images/demo/letter.gif | Bin 0 -> 77 bytes source/screens/demo/components.njk | 83 ++++++++++++++++++++++++++--- source/screens/demo/layouts.njk | 55 ++++++++++++------- source/style/hippie-style | 2 +- 5 files changed, 112 insertions(+), 28 deletions(-) create mode 100644 source/art/images/demo/bullet.gif create mode 100644 source/art/images/demo/letter.gif diff --git a/source/art/images/demo/bullet.gif b/source/art/images/demo/bullet.gif new file mode 100644 index 0000000000000000000000000000000000000000..55a84abda4f23c8a666c7407220b5d6c3d29b233 GIT binary patch literal 67 zcmZ?wbhEHb6krfwXkcWJmzQT?U{L(Y!pOkD$e;sc1H}ax7?`Ab`d6NQo8K^JQeako VY}IPMlvx!MC0dqgMKLf~0|2-%5Q+c* literal 0 HcmV?d00001 diff --git a/source/art/images/demo/letter.gif b/source/art/images/demo/letter.gif new file mode 100644 index 0000000000000000000000000000000000000000..60aac08875a890ca2123c56ff6c0187c3a02f6ca GIT binary patch literal 77 zcmZ?wbhEHb6krfwXkcW30L7myKqe!D4u}hqVPI0}>0f#JEkEy!En%E@rYNp|)7o`I YR<3>C(^+cLPFXANM1GT&Wo57i0C18ONdN!< literal 0 HcmV?d00001 diff --git a/source/screens/demo/components.njk b/source/screens/demo/components.njk index 87c7a3c..5890112 100644 --- a/source/screens/demo/components.njk +++ b/source/screens/demo/components.njk @@ -80,7 +80,17 @@ tags:
    Überschrift 6

    Mit Absatz innerhalb von <hgroup>.

    +

    <header>

    +
    Kopfbereich
    +
    header.header_page
    +
    header.header_txt>h1
    +
    +

    Überschrift 1

    +

    Innerhalb eines <header>.

    +

    <footer>

    +

    Bekommt überlicherweise Klassen zur Positionierung und der Abmessungen zugewiesen.

    +
    Fußbereich
    {{ footer.pinned() }}
    @@ -90,24 +100,81 @@ tags:

    Elemente:

    // p // address // hr // pre // blockquote // ol // ul // li // dl // dt // dd // figure // figcaption // main // div

    <p>

    +

    Ein Absatz. Ein code Element innerhalb wird besonders behandelt.

    Varianten

    -
    p.txt_center
    -
    p.txt_right
    p.column_2
    +

    Spalten können angegeben werden.

    p.column_3.column_line
    +

    Spalten können angegeben werden.

    +

    <address>

    +
    Anschrift, mit bestimmtem, ##### Format.

    <hr>

    +

    Varianten

    -
    hr.hr_hidden
    -
    hr.hr_dotted
    -
    hr.space_even_half
    -
    hr.hr_dotted.space_even_fourth
    +
    hr.hr_hidden+hr.hr_dotted+hr.hr_double
    +
    +
    +
    +

    <pre>

    +
    Vorformatierter Text.
    +	erhält Umbrüche und Einrückung.
    +			
    +
    pre.pre_code>code*2
    +
    let variable = true;
    +()(){}

    <blockquote>

    -
    blockquote>p+p.quote_source
    +
    Ein Zitat ist eingerückt.
    +
    blockquote.quote_mark>p+p.quote_source
    +
    +

    Zitat mit automatischen Anführungszeichen

    +

    und Quellenangabe.

    +
    +

    <dl>, <ol>, <ul>

    +
    +
    Begriff
    +
    Definition
    +
    +
      +
    1. Eins
    2. +
    3. Zwei
    4. +
    +
      +
    • Obst
    • +
    • Gemüse
    • +
    +

    Varianten

    +
    ul.list_basic.list_dash>li*2
    +
      +
    • Mehr Abstand und
    • +
    • mit Unterstrichen.
    • +
    +
    ul.list_link>(li>a)*2
    +

    <figure>

    figure>figcaption+{element}
    +
    +
    Bezeichnung
    + Grafisches Element. +
    +

    <main>

    +
    Hauptbereich

    <div>

    -
    div.div_info>p

    Varianten

    +
    div.div_info>p
    +
    +

    Absatz in Informationsbox.

    +
    +
    div.box_space>div.box_cube>span
    +
    +
    Text
    +
    +
    div.box_placeholder+hr+div.box_placeholder_bkg
    +
    +
    +

    Tabellen

    diff --git a/source/screens/demo/layouts.njk b/source/screens/demo/layouts.njk index ab80554..a45a817 100644 --- a/source/screens/demo/layouts.njk +++ b/source/screens/demo/layouts.njk @@ -21,19 +21,9 @@ tags:

    Die Elemente werden fortlaufend komplexer

    -

    <h3>

    -

    Beispiele

    -
    h3.txt_color_dark+p
    -

    Dunkle Überschrift

    -

    Mit normalem Textabsatz

    -

    <h4>

    -

    Beispiele

    -
    a>h4
    - -

    Überschrift als Block-Verweis

    -
    -

    <section>

    -
    section>div.float_space_left>img^p+p
    +

    Bereiche

    +

    section

    +
    section.overflow>div.float_space_left>img^p+p>br+a.lineLink
    Fahne von interaktionsweise

    Vorname Name
    Straße 1, 01234 Stadt

    @@ -41,13 +31,13 @@ tags: name@domain.tld

    -
    div.space_left_fourth
    +
    div.space_left_fourth>(hr+p+hr)

    Eingerückter Inhalt


    -
    nav>ul>(li>a.a_button{punkt $})*4nav>ul>(li>a.a_button_border{stufe $})*4
    +
    div.overflow>(nav.float_space_left>ul>(li>a.a_button{punkt $})*4+nav>ul>(li>a.a_button_border{stufe $})*4)
    -
    nav.nav_horizontal>ul>(li>a.a_button{abschnitt $})*4nav.nav_center_old>ul>(li>a.a_button{typ $})*4
    +
    nav.nav_horizontal>ul>(li>a.a_button{abschnitt $})*4
    +
    div.overflow>nav.nav_center_old>ul>(li>a.a_button{typ $})*4
    +

    Show me a @@ -229,10 +221,34 @@ tags:

    Gruppierung

    +

    p

    +
    p.txt_right+p.txt_center+p.txt_left
    +

    Rechts

    +

    Mittig

    +

    Links

    +

    h*

    +
    h3.txt_color_dark+p.txt_tiny
    +

    Dunkle Überschrift

    +

    Mit winzigem Textabsatz

    +
    a>h4
    + +

    Überschrift als Block-Verweis

    +
    +

    Überschrift 1

    +

    Kann mehrmals, ohne großen Abstand oberhalb, untereinander stehen.

    +

    Überschrift 2

    +

    kann das ebenso.

    + +

    hr

    +
    hr.space_even_half
    +
    +
    hr.hr_dotted.space_even_fourth
    +
    +

    ul

    ul.list_link>(li>a>img)*2+li>a
  • {{ io.frameFooter('mode-bar') }} diff --git a/source/templates/hippie/macros/_io.njk b/source/templates/hippie/macros/_io.njk index 36a3b9e..f9a7300 100644 --- a/source/templates/hippie/macros/_io.njk +++ b/source/templates/hippie/macros/_io.njk @@ -32,4 +32,18 @@ +{% endmacro %} + +{% macro statusBar(title) %} +
    + + +
    {% endmacro %} \ No newline at end of file From c77bcd8bdccdcd224247c96ac60b1d04ff56ac82 Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 27 Oct 2025 20:51:17 +0100 Subject: [PATCH 108/296] feat: Replace ui drag screen with liquid template - Recreate io macros as liquid partials - Add app template based on default - Drag screen uses app.liquid layout instead of _app_frame.njk --- source/screens/demo/examples/ui/drag.liquid | 48 ++++++++++++++++++ source/screens/demo/examples/ui/drag.njk | 50 ------------------- source/templates/hippie/app.liquid | 40 +++++++++++++++ .../hippie/partials/frame-header.liquid | 20 ++++++++ .../hippie/partials/frame-mode.liquid | 10 ++++ .../hippie/partials/frame-status.liquid | 11 ++++ 6 files changed, 129 insertions(+), 50 deletions(-) create mode 100755 source/screens/demo/examples/ui/drag.liquid delete mode 100755 source/screens/demo/examples/ui/drag.njk create mode 100644 source/templates/hippie/app.liquid create mode 100644 source/templates/hippie/partials/frame-header.liquid create mode 100644 source/templates/hippie/partials/frame-mode.liquid create mode 100644 source/templates/hippie/partials/frame-status.liquid diff --git a/source/screens/demo/examples/ui/drag.liquid b/source/screens/demo/examples/ui/drag.liquid new file mode 100755 index 0000000..aeceed7 --- /dev/null +++ b/source/screens/demo/examples/ui/drag.liquid @@ -0,0 +1,48 @@ +--- +title: Drag +tags: +- ui +--- +{% layout "hippie/app.liquid" %} + +{% block body %} +
    + +
    +
    +
    +
    +
    + {% render 'hippie/partials/frame-header.liquid' %} +
    + {% render 'hippie/partials/frame-mode.liquid' %} +
    +
    +
    +{% endblock %} + +{%- block script %} + + +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/ui/drag.njk b/source/screens/demo/examples/ui/drag.njk deleted file mode 100755 index ecd3001..0000000 --- a/source/screens/demo/examples/ui/drag.njk +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: Drag -tags: - - ui ---- -{% set pageId = page.fileSlug %} - -{% extends "hippie/_app_frame.njk" %} - -{% block body %} -
    - -
    -
    -
    -
    -
    - {{ io.frameHeader('title-bar') }} -
    - {{ io.frameFooter('mode-bar') }} -
    -
    -
    -{% endblock %} - -{%- block script %} - - -{% endblock %} \ No newline at end of file diff --git a/source/templates/hippie/app.liquid b/source/templates/hippie/app.liquid new file mode 100644 index 0000000..58ca863 --- /dev/null +++ b/source/templates/hippie/app.liquid @@ -0,0 +1,40 @@ +{% assign pageBase = "../../../" -%} +{% assign pageId = page.fileSlug -%} +{% assign pageClass = "html_ui" -%} +{%- layout "hippie/default.liquid" %} + +{% block title %}{{ title }}{% endblock %} + +{% block links %} +{{ block.super -}} + + +{% endblock %} + +{% block script %} +{{ block.super -}} + + + + + +{% endblock %} \ No newline at end of file diff --git a/source/templates/hippie/partials/frame-header.liquid b/source/templates/hippie/partials/frame-header.liquid new file mode 100644 index 0000000..14d04bc --- /dev/null +++ b/source/templates/hippie/partials/frame-header.liquid @@ -0,0 +1,20 @@ +
    + + +
    \ No newline at end of file diff --git a/source/templates/hippie/partials/frame-mode.liquid b/source/templates/hippie/partials/frame-mode.liquid new file mode 100644 index 0000000..4e87985 --- /dev/null +++ b/source/templates/hippie/partials/frame-mode.liquid @@ -0,0 +1,10 @@ +
    + + +
    \ No newline at end of file diff --git a/source/templates/hippie/partials/frame-status.liquid b/source/templates/hippie/partials/frame-status.liquid new file mode 100644 index 0000000..98c94f9 --- /dev/null +++ b/source/templates/hippie/partials/frame-status.liquid @@ -0,0 +1,11 @@ +
    + + +
    \ No newline at end of file From ff5d4bd3eba5393e43fa9e79674817e944bf53a5 Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 27 Oct 2025 21:15:32 +0100 Subject: [PATCH 109/296] feat: Add jquery dependency - Add jquery version 3.7.1 - Remove external script resource from app template - Add eleventy passthrough to build/vendor --- .eleventy.js | 4 ++++ package-lock.json | 7 +++++++ package.json | 3 ++- source/templates/hippie/app.liquid | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 3da1568..00dded1 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -40,6 +40,10 @@ module.exports = function (eleventyConfig) { eleventyConfig.addPassthroughCopy("vendor"); eleventyConfig.addPassthroughCopy({"node_modules/bootstrap-icons": "vendor/bootstrap-icons"}); + eleventyConfig.addPassthroughCopy({ + "node_modules/jquery/dist/jquery.min.js": "vendor", + "node_modules/jquery/dist/jquery.min.map": "vendor" + }); // eleventyConfig.addPassthroughCopy({"node_modules/normalize.css/normalize.css": "vendor/normalize.css"}); eleventyConfig.addWatchTarget("./source/style/"); diff --git a/package-lock.json b/package-lock.json index 73baa18..1fc8cd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@11ty/eleventy": "^2.0.1", "bootstrap-icons": "^1.13.1", + "jquery": "^3.7.1", "sass": "^1.93.0" }, "devDependencies": { @@ -1583,6 +1584,12 @@ "node": ">=10" } }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "license": "MIT" + }, "node_modules/js-stringify": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", diff --git a/package.json b/package.json index d2759a8..3dc6f91 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "dependencies": { "@11ty/eleventy": "^2.0.1", "bootstrap-icons": "^1.13.1", + "jquery": "^3.7.1", "sass": "^1.93.0" } -} \ No newline at end of file +} diff --git a/source/templates/hippie/app.liquid b/source/templates/hippie/app.liquid index 58ca863..2456f20 100644 --- a/source/templates/hippie/app.liquid +++ b/source/templates/hippie/app.liquid @@ -13,7 +13,7 @@ {% block script %} {{ block.super -}} - + From e21b9d36b5b430890df6aea8ef833da43d84ce27 Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 27 Oct 2025 21:16:41 +0100 Subject: [PATCH 110/296] feat: Replace form screen with liquid version --- source/screens/demo/examples/ui/form.liquid | 56 +++++++++++++++++++++ source/screens/demo/examples/ui/form.njk | 55 -------------------- 2 files changed, 56 insertions(+), 55 deletions(-) create mode 100644 source/screens/demo/examples/ui/form.liquid delete mode 100644 source/screens/demo/examples/ui/form.njk diff --git a/source/screens/demo/examples/ui/form.liquid b/source/screens/demo/examples/ui/form.liquid new file mode 100644 index 0000000..492e191 --- /dev/null +++ b/source/screens/demo/examples/ui/form.liquid @@ -0,0 +1,56 @@ +--- +title: Form +tags: +- ui +--- +{% assign bodyClass = "body_frame" -%} +{% layout "hippie/app.liquid" %} + +{% block body %} +{% render 'hippie/partials/frame-header.liquid' %} +
    +

    Formulare

    + + +
    +
    + +
    +
    a
    +
    b
    +
    c
    +
    + +{% endblock %} + +{%- block script %} +{{ block.super -}} + +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/ui/form.njk b/source/screens/demo/examples/ui/form.njk deleted file mode 100644 index 2e6c088..0000000 --- a/source/screens/demo/examples/ui/form.njk +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: Form -tags: - - ui ---- -{% extends "hippie/_app_frame.njk" %} - -{% block body %} - {{ io.frameHeader('title-bar') }} -
    -

    Formulare

    - - -
    -
    -
    -
    -
    a
    -
    b
    -
    c
    -
    -
    -{% endblock %} - -{%- block script %} - {{ super() }} - -{% endblock %} \ No newline at end of file From 3c9c438b254eada678a98bc5b16a1f1679a5f4f8 Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 27 Oct 2025 21:23:26 +0100 Subject: [PATCH 111/296] feat: Add game and gallery screens --- source/screens/demo/examples/game.liquid | 25 ++++++ .../screens/demo/examples/ui/gallery.liquid | 77 +++++++++++++++++++ source/style/modules/ui/_gallery_module.scss | 18 +++++ source/style/modules/ui/_game_module.scss | 3 + 4 files changed, 123 insertions(+) create mode 100644 source/screens/demo/examples/game.liquid create mode 100755 source/screens/demo/examples/ui/gallery.liquid create mode 100644 source/style/modules/ui/_gallery_module.scss create mode 100644 source/style/modules/ui/_game_module.scss diff --git a/source/screens/demo/examples/game.liquid b/source/screens/demo/examples/game.liquid new file mode 100644 index 0000000..a57b17f --- /dev/null +++ b/source/screens/demo/examples/game.liquid @@ -0,0 +1,25 @@ +--- +title: Game - TFW +tags: +- demoExample +- gameExample +--- +{% assign bodyClass = "body_game" -%} +{% layout "hippie/app.liquid" %} + +{% block body %} +
    + +
    +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/ui/gallery.liquid b/source/screens/demo/examples/ui/gallery.liquid new file mode 100755 index 0000000..f29cae5 --- /dev/null +++ b/source/screens/demo/examples/ui/gallery.liquid @@ -0,0 +1,77 @@ +--- +title: Gallery +tags: +- ui +--- +{% assign bodyClass = "body_frame" -%} +{% layout "hippie/app.liquid" %} + +{% block body %} +{% render 'hippie/partials/frame-header.liquid' %} +
    +
    +
    + + +
    + + {% render 'hippie/partials/frame-status.liquid' %} +
    +
    +{% render 'hippie/partials/frame-mode.liquid' %} +{% endblock %} + +{%- block script %} +{{ block.super -}} + +{% endblock %} \ No newline at end of file diff --git a/source/style/modules/ui/_gallery_module.scss b/source/style/modules/ui/_gallery_module.scss new file mode 100644 index 0000000..4f8a233 --- /dev/null +++ b/source/style/modules/ui/_gallery_module.scss @@ -0,0 +1,18 @@ +@use "../../hippie-style/hippie"; + +.gallery { + display: flex; + flex-wrap: wrap; + justify-content: left; + align-items: start; + gap: 10px; + background-color: hippie.$color_back_io; + + & > div { + background-color: hotpink; + aspect-ratio: 2 / 3; + width: 128px; + transition: width 0.3s ease; + } +} + diff --git a/source/style/modules/ui/_game_module.scss b/source/style/modules/ui/_game_module.scss new file mode 100644 index 0000000..7bb575e --- /dev/null +++ b/source/style/modules/ui/_game_module.scss @@ -0,0 +1,3 @@ +.body_game { + background-color: hotpink; +} \ No newline at end of file From e0cfcfac13552d2372d2f99233460e2f5b598a6e Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 27 Oct 2025 21:33:38 +0100 Subject: [PATCH 112/296] feat: Add and rename screens - Add windows screen - Add windows.js - Different variants of classes for drag and edge snap behaviour - Rename js files to better distinguish usage --- source/code/{_ui.js => drag.js} | 0 source/code/{_intro.js => intro.js} | 0 source/code/windows.js | 282 ++++++++++++++++++ source/screens/demo/examples/intro.njk | 2 +- source/screens/demo/examples/ui/drag.liquid | 2 +- .../screens/demo/examples/ui/windows.liquid | 30 ++ source/style/modules/ui/_windows_module.scss | 36 +++ source/style/ui.scss | 1 + 8 files changed, 351 insertions(+), 2 deletions(-) rename source/code/{_ui.js => drag.js} (100%) rename source/code/{_intro.js => intro.js} (100%) create mode 100644 source/code/windows.js create mode 100644 source/screens/demo/examples/ui/windows.liquid create mode 100644 source/style/modules/ui/_windows_module.scss diff --git a/source/code/_ui.js b/source/code/drag.js similarity index 100% rename from source/code/_ui.js rename to source/code/drag.js diff --git a/source/code/_intro.js b/source/code/intro.js similarity index 100% rename from source/code/_intro.js rename to source/code/intro.js diff --git a/source/code/windows.js b/source/code/windows.js new file mode 100644 index 0000000..6c68eec --- /dev/null +++ b/source/code/windows.js @@ -0,0 +1,282 @@ +class Draggable { + constructor(element) { + this.element = element; + this.offsetX = 0; + this.offsetY = 0; + this.isDragging = false; + this.barSize = ''; + + this.init(); + } + + init() { + this.element.addEventListener('mousedown', this.onMouseDown.bind(this)); + document.addEventListener('mousemove', this.onMouseMove.bind(this)); + document.addEventListener('mouseup', this.onMouseUp.bind(this)); + this.setPosition('bottom'); + } + + onMouseDown(event) { + this.isDragging = true; + this.offsetX = event.clientX - this.element.getBoundingClientRect().left; + this.offsetY = event.clientY - this.element.getBoundingClientRect().top; + + event.preventDefault(); + } + + onMouseMove(event) { + if (!this.isDragging) { + return; + } + + let x = event.clientX - this.offsetX; + let y = event.clientY - this.offsetY; + + // Update the position of the element + this.element.style.left = `${x}px`; + this.element.style.top = `${y}px`; + } + + onMouseUp() { + if (!this.isDragging) { + return; + } + this.isDragging = false; + + this.snapToEdges(); + } + + snapToEdges() { + const rect = this.element.getBoundingClientRect(); + const windowWidth = window.innerWidth; + const windowHeight = window.innerHeight; + + // Determine the closest edge + const distances = { + left: rect.left, + right: windowWidth - rect.right, + top: rect.top, + bottom: windowHeight - rect.bottom + }; + + const closestEdge = Object.keys(distances).reduce((a, b) => distances[a] < distances[b] ? a : b); + + this.setPosition(closestEdge, this.barSize); + } + + setPosition(side, barSize) { + switch (side) { + case 'left': + // this.element.style.top = `${rect.top}px`; // Optional: keep vertical position + this.element.style.top = '0px'; + this.element.style.right = ''; + this.element.style.bottom = '0px'; + this.element.style.left = '0px'; + this.element.style.width = barSize; + this.element.style.height = ''; + break; + case 'right': + // this.element.style.left = `${windowWidth - rect.width}px`; + // this.element.style.top = `${rect.top}px`; // Optional: keep vertical position + this.element.style.top = '0px'; + this.element.style.right = '0px'; + this.element.style.bottom = '0px'; + this.element.style.left = ''; + this.element.style.width = barSize; + this.element.style.height = ''; + break; + case 'top': + // this.element.style.top = '0px'; + // this.element.style.left = `${rect.left}px`; // Optional: keep horizontal position + this.element.style.top = '0px'; + this.element.style.right = '0px'; + this.element.style.bottom = ''; + this.element.style.left = '0px'; + this.element.style.width = ''; + this.element.style.height = barSize; + break; + case 'bottom': + // this.element.style.top = `${windowHeight - rect.height}px`; + // this.element.style.left = `${rect.left}px`; // Optional: keep horizontal position + this.element.style.top = ''; + this.element.style.right = '0px'; + this.element.style.bottom = '0px'; + this.element.style.left = '0px'; + this.element.style.width = ''; + this.element.style.height = barSize; + break; + } + } +} + +class DragAdv { + constructor(element, placeholder) { + this.element = element; + this.placeholder = placeholder; + this.offsetX = 0; + this.offsetY = 0; + this.isDragging = false; + this.barSize = ''; + + this.init(); + } + + init() { + this.element.addEventListener('mousedown', this.onMouseDown.bind(this)); + document.addEventListener('mousemove', this.onMouseMove.bind(this)); + document.addEventListener('mouseup', this.onMouseUp.bind(this)); + this.setPosition('bottom'); + } + + onMouseDown(event) { + this.isDragging = true; + // this.offsetX = event.clientX - this.element.getBoundingClientRect().left; + // this.offsetY = event.clientY - this.element.getBoundingClientRect().top; + this.offsetX = 0; + this.offsetY = 0; + this.element.style.display = 'none'; + + this.showPlaceholder(); + event.preventDefault(); + } + + onMouseMove(event) { + if (!this.isDragging) return; + + let x = event.clientX - this.offsetX; + let y = event.clientY - this.offsetY; + + // Update the position of the element + // this.element.style.left = `${x}px`; + // this.element.style.top = `${y}px`; + // this.element.style.display = 'none'; + + // Update placeholder position + this.placeholder.style.left = `${x}px`; + this.placeholder.style.top = `${y}px`; + // this.placeholder.style.display = 'block'; + } + + onMouseUp() { + if (!this.isDragging) return; + this.isDragging = false; + + this.element.style.display = 'block'; + + this.snapToEdges(); + this.hidePlaceholder(); + } + + showPlaceholder() { + this.placeholder.style.display = 'block'; + } + + hidePlaceholder() { + this.placeholder.style.display = 'none'; + } + + snapToEdges() { + const rect = this.placeholder.getBoundingClientRect(); + const windowWidth = window.innerWidth; + const windowHeight = window.innerHeight; + + const distances = { + left: rect.left, + right: windowWidth - rect.right, + top: rect.top, + bottom: windowHeight - rect.bottom + }; + + const closestEdge = Object.keys(distances).reduce((a, b) => distances[a] < distances[b] ? a : b); + + console.log(rect); + console.log(closestEdge); + this.setPosition(closestEdge, this.barSize); + /*switch (closestEdge) { + case 'left': + this.element.style.left = '0px'; + this.element.style.top = `${rect.top}px`; + break; + case 'right': + this.element.style.left = `${windowWidth - rect.width}px`; + this.element.style.top = `${rect.top}px`; + break; + case 'top': + this.element.style.top = '0px'; + this.element.style.left = `${rect.left}px`; + break; + case 'bottom': + this.element.style.top = `${windowHeight - rect.height}px`; + this.element.style.left = `${rect.left}px`; + break; + }*/ + } + + setPosition(side, barSize) { + switch (side) { + case 'left': + // this.element.style.top = `${rect.top}px`; // Optional: keep vertical position + this.element.style.top = '0px'; + this.element.style.right = ''; + this.element.style.bottom = '0px'; + this.element.style.left = '0px'; + this.element.style.width = barSize; + this.element.style.height = ''; + break; + case 'right': + // this.element.style.left = `${windowWidth - rect.width}px`; + // this.element.style.top = `${rect.top}px`; // Optional: keep vertical position + this.element.style.top = '0px'; + this.element.style.right = '0px'; + this.element.style.bottom = '0px'; + this.element.style.left = ''; + this.element.style.width = barSize; + this.element.style.height = ''; + break; + case 'top': + // this.element.style.top = '0px'; + // this.element.style.left = `${rect.left}px`; // Optional: keep horizontal position + this.element.style.top = '0px'; + this.element.style.right = '0px'; + this.element.style.bottom = ''; + this.element.style.left = '0px'; + this.element.style.width = ''; + this.element.style.height = barSize; + break; + case 'bottom': + // this.element.style.top = `${windowHeight - rect.height}px`; + // this.element.style.left = `${rect.left}px`; // Optional: keep horizontal position + this.element.style.top = ''; + this.element.style.right = '0px'; + this.element.style.bottom = '0px'; + this.element.style.left = '0px'; + this.element.style.width = ''; + this.element.style.height = barSize; + break; + } + } +} + +class BestDrag { + #element; + + constructor(element) { + this.#setElement(element); + } + + #setElement(value) { + if (!value) { + throw new Error('No element found'); + } + this.#element = value; + this.#element.style.background = "hotpink"; + } + + get element() { + return this.#element; + } + + set element(value) { + this.#setElement(value); + } +} \ No newline at end of file diff --git a/source/screens/demo/examples/intro.njk b/source/screens/demo/examples/intro.njk index 1358739..548cc3f 100644 --- a/source/screens/demo/examples/intro.njk +++ b/source/screens/demo/examples/intro.njk @@ -49,7 +49,7 @@ tags: {%- block script %} {{ super() }} - + + + +{% endblock %} \ No newline at end of file diff --git a/source/style/modules/ui/_windows_module.scss b/source/style/modules/ui/_windows_module.scss new file mode 100644 index 0000000..0f46b78 --- /dev/null +++ b/source/style/modules/ui/_windows_module.scss @@ -0,0 +1,36 @@ +@use "sass:map"; + +@use "../../hippie-style/hippie"; + +#task-bar { + @extend %flex-inline; + z-index: map.get(hippie.$z-indexes, "content-top"); + align-items: stretch; + position: fixed; + //right: 0; + //bottom: 0; + //left: 0; + border: 1px solid transparent; + padding: hippie.$space_basic; + background-color: rgba(0, 0, 0, .1); + + button { + @extend .button_io; + overflow: hidden; + } +} + +#screen-space { + position: relative; + height: 100%; +} + +#placeholder { + display: none; + z-index: map.get(hippie.$z-indexes, "content-top"); + position: fixed; + width: 100px; + height: 100px; + border: 2px dashed deeppink; + background-color: hotpink; +} \ No newline at end of file diff --git a/source/style/ui.scss b/source/style/ui.scss index 4a1e6c8..da6ecf7 100644 --- a/source/style/ui.scss +++ b/source/style/ui.scss @@ -9,6 +9,7 @@ @use "modules/ui/form_module"; @use "modules/ui/game_module"; @use "modules/ui/gallery_module"; +@use "modules/ui/windows_module"; $color_gui_back: hippie.$color_dark; $space_gui_half: hippie.$space_half; From 0996ace34f31c8e3d2bf2b0ec8a925cf3fdaa606 Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 27 Oct 2025 21:53:57 +0100 Subject: [PATCH 113/296] fix: Task bar drag behaviour - Placeholder is centered to mouse cursor - Placeholder is positioned on mouse down not only on move --- source/code/windows.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/source/code/windows.js b/source/code/windows.js index 6c68eec..c6e42b8 100644 --- a/source/code/windows.js +++ b/source/code/windows.js @@ -125,18 +125,24 @@ class DragAdv { this.element.addEventListener('mousedown', this.onMouseDown.bind(this)); document.addEventListener('mousemove', this.onMouseMove.bind(this)); document.addEventListener('mouseup', this.onMouseUp.bind(this)); - this.setPosition('bottom'); + this.setPosition('bottom', this.barSize); } onMouseDown(event) { this.isDragging = true; - // this.offsetX = event.clientX - this.element.getBoundingClientRect().left; - // this.offsetY = event.clientY - this.element.getBoundingClientRect().top; - this.offsetX = 0; - this.offsetY = 0; - this.element.style.display = 'none'; this.showPlaceholder(); + + this.offsetX = this.placeholder.getBoundingClientRect().width / 2; + this.offsetY = this.placeholder.getBoundingClientRect().height / 2; + this.element.style.display = 'none'; + + let x = event.clientX - this.offsetX; + let y = event.clientY - this.offsetY; + + this.placeholder.style.left = `${x}px`; + this.placeholder.style.top = `${y}px`; + event.preventDefault(); } @@ -146,15 +152,8 @@ class DragAdv { let x = event.clientX - this.offsetX; let y = event.clientY - this.offsetY; - // Update the position of the element - // this.element.style.left = `${x}px`; - // this.element.style.top = `${y}px`; - // this.element.style.display = 'none'; - - // Update placeholder position this.placeholder.style.left = `${x}px`; this.placeholder.style.top = `${y}px`; - // this.placeholder.style.display = 'block'; } onMouseUp() { From 1ada62f6eceae2a55a9c94466658e3ba384c2a40 Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 27 Oct 2025 23:24:02 +0100 Subject: [PATCH 114/296] feat: Optimize DragAdv class - Only use left mouse button - Handle element and placeholder together --- source/code/windows.js | 61 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/source/code/windows.js b/source/code/windows.js index c6e42b8..f282729 100644 --- a/source/code/windows.js +++ b/source/code/windows.js @@ -61,6 +61,24 @@ class Draggable { const closestEdge = Object.keys(distances).reduce((a, b) => distances[a] < distances[b] ? a : b); + /*switch (closestEdge) { + case 'left': + this.element.style.left = '0px'; + this.element.style.top = `${rect.top}px`; + break; + case 'right': + this.element.style.left = `${windowWidth - rect.width}px`; + this.element.style.top = `${rect.top}px`; + break; + case 'top': + this.element.style.top = '0px'; + this.element.style.left = `${rect.left}px`; + break; + case 'bottom': + this.element.style.top = `${windowHeight - rect.height}px`; + this.element.style.left = `${rect.left}px`; + break; + }*/ this.setPosition(closestEdge, this.barSize); } @@ -129,19 +147,20 @@ class DragAdv { } onMouseDown(event) { - this.isDragging = true; + if (event.button === 0) { + this.isDragging = true; - this.showPlaceholder(); + this.showPlaceholder(); - this.offsetX = this.placeholder.getBoundingClientRect().width / 2; - this.offsetY = this.placeholder.getBoundingClientRect().height / 2; - this.element.style.display = 'none'; + this.offsetX = this.placeholder.getBoundingClientRect().width / 2; + this.offsetY = this.placeholder.getBoundingClientRect().height / 2; - let x = event.clientX - this.offsetX; - let y = event.clientY - this.offsetY; + let x = event.clientX - this.offsetX; + let y = event.clientY - this.offsetY; - this.placeholder.style.left = `${x}px`; - this.placeholder.style.top = `${y}px`; + this.placeholder.style.left = `${x}px`; + this.placeholder.style.top = `${y}px`; + } event.preventDefault(); } @@ -160,18 +179,18 @@ class DragAdv { if (!this.isDragging) return; this.isDragging = false; - this.element.style.display = 'block'; - this.snapToEdges(); this.hidePlaceholder(); } showPlaceholder() { + this.element.style.display = 'none'; this.placeholder.style.display = 'block'; } hidePlaceholder() { this.placeholder.style.display = 'none'; + this.element.style.display = ''; } snapToEdges() { @@ -188,27 +207,7 @@ class DragAdv { const closestEdge = Object.keys(distances).reduce((a, b) => distances[a] < distances[b] ? a : b); - console.log(rect); - console.log(closestEdge); this.setPosition(closestEdge, this.barSize); - /*switch (closestEdge) { - case 'left': - this.element.style.left = '0px'; - this.element.style.top = `${rect.top}px`; - break; - case 'right': - this.element.style.left = `${windowWidth - rect.width}px`; - this.element.style.top = `${rect.top}px`; - break; - case 'top': - this.element.style.top = '0px'; - this.element.style.left = `${rect.left}px`; - break; - case 'bottom': - this.element.style.top = `${windowHeight - rect.height}px`; - this.element.style.left = `${rect.left}px`; - break; - }*/ } setPosition(side, barSize) { From 6098a1e62d2791e1c41e93cd3d855c80f12749f1 Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 27 Oct 2025 23:24:49 +0100 Subject: [PATCH 115/296] feat: Style and content for windows --- .../screens/demo/examples/ui/windows.liquid | 31 +++++++++- source/style/modules/ui/_windows_module.scss | 61 ++++++++++++++++++- 2 files changed, 86 insertions(+), 6 deletions(-) diff --git a/source/screens/demo/examples/ui/windows.liquid b/source/screens/demo/examples/ui/windows.liquid index 9dc321b..daacb66 100644 --- a/source/screens/demo/examples/ui/windows.liquid +++ b/source/screens/demo/examples/ui/windows.liquid @@ -7,9 +7,34 @@ tags: {% layout "hippie/app.liquid" %} {% block body %} - +
    + + + +
    + + + +
    +
    {% endblock %} diff --git a/source/style/modules/ui/_windows_module.scss b/source/style/modules/ui/_windows_module.scss index 0f46b78..c7a9846 100644 --- a/source/style/modules/ui/_windows_module.scss +++ b/source/style/modules/ui/_windows_module.scss @@ -2,10 +2,21 @@ @use "../../hippie-style/hippie"; -#task-bar { - @extend %flex-inline; - z-index: map.get(hippie.$z-indexes, "content-top"); +$padding_half: calc(#{hippie.$space_half} - 3px) hippie.$space_half; + +%flex-bar { + display: flex; + flex-direction: row; + flex-wrap: wrap; align-items: stretch; + align-content: center; + justify-content: flex-start; + gap: hippie.$space_half hippie.$space_basic; +} + +#task-bar { + @extend %flex-bar; + z-index: map.get(hippie.$z-indexes, "content-top"); position: fixed; //right: 0; //bottom: 0; @@ -14,10 +25,54 @@ padding: hippie.$space_basic; background-color: rgba(0, 0, 0, .1); + nav, + & > div { + @extend %flex-bar; + + &:last-child { + margin-left: auto; + } + } + button { @extend .button_io; overflow: hidden; } + + nav.small { + //font-size: .8em; + + button { + border: none; + padding: $padding_half; + + &:hover { + background-color: transparent; + } + } + } + + nav.big { + font-size: 1.5em; + + button { + border: none; + padding: 0; + + &:hover { + background-color: transparent; + } + } + } + + .clock { + text-align: end; + + &, + & > * { + line-height: 1; + } + } } #screen-space { From 6c252875fa97a114e73695925e0c8bbfcb1802a6 Mon Sep 17 00:00:00 2001 From: sthag Date: Tue, 28 Oct 2025 19:45:27 +0100 Subject: [PATCH 116/296] chore: Update jshint rules --- .jshintrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.jshintrc b/.jshintrc index 7554aff..f7c493b 100644 --- a/.jshintrc +++ b/.jshintrc @@ -7,25 +7,25 @@ // Enforcing "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) "camelcase" : false, // true: Identifiers must be in camelCase - "curly" : true, // true: Require {} for every new block or scope + "curly" : false, // true: Require {} for every new block or scope "eqeqeq" : true, // true: Require triple equals (===) for comparison "forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty() "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc. "immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` - "latedef" : false, // true: Require variables/functions to be defined before being used - "newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()` + "latedef" : true, // true: Require variables/functions to be defined before being used + "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()` "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` "noempty" : true, // true: Prohibit use of empty blocks "nonbsp" : true, // true: Prohibit `non-breaking whitespace` characters. "nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment) "plusplus" : false, // true: Prohibit use of `++` and `--` - "quotmark" : false, // Quotation mark consistency: + "quotmark" : true, // Quotation mark consistency: // false : do nothing (default) // true : ensure whatever is used is consistent // "single" : require single quotes // "double" : require double quotes "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) - "unused" : false, // Unused variables: + "unused" : true, // Unused variables: // true : all variables, last function parameter // "vars" : all variables only // "strict" : all variables, all function parameters From c259ead9a0d93f00960e48caae5b0e11ab0457dc Mon Sep 17 00:00:00 2001 From: sthag Date: Tue, 28 Oct 2025 19:51:59 +0100 Subject: [PATCH 117/296] feat: Replace new with start screen - Convert to liquid - Add old ongoing function for now - Add macros as partials - Rename data source to better reflect usage - Update app.js to fulfill jshint --- source/code/app.js | 27 +++++++---- source/data/{new.json => start.json} | 4 +- source/screens/demo/examples/ui/new.njk | 45 ------------------- source/screens/demo/examples/ui/start.liquid | 44 ++++++++++++++++++ .../hippie/partials/header-status.liquid | 21 +++++++++ .../hippie/partials/status-coord.liquid | 1 + .../hippie/partials/status-date.liquid | 6 +++ .../hippie/partials/status-time.liquid | 1 + 8 files changed, 94 insertions(+), 55 deletions(-) rename source/data/{new.json => start.json} (56%) delete mode 100755 source/screens/demo/examples/ui/new.njk create mode 100644 source/screens/demo/examples/ui/start.liquid create mode 100644 source/templates/hippie/partials/header-status.liquid create mode 100644 source/templates/hippie/partials/status-coord.liquid create mode 100644 source/templates/hippie/partials/status-date.liquid create mode 100644 source/templates/hippie/partials/status-time.liquid diff --git a/source/code/app.js b/source/code/app.js index 8632638..8a21b5f 100644 --- a/source/code/app.js +++ b/source/code/app.js @@ -1,25 +1,33 @@ //NEW function Clock(id) { - this.id = id; + 'use strict'; - var that = this; - setInterval(function () { that.updateClock(); }, 1000); + this.id = id; + const that = this; + + setInterval(function () { + that.updateClock(); + }, 1000); this.updateClock(); } Clock.prototype.updateClock = function () { - var date = new Date(); - var clock = document.getElementById(this.id); + 'use strict'; + + const date = new Date(); + const clock = document.getElementById(this.id); //console.log(this); - clock.innerHTML = this.formatDigits(date.getHours()) + ":" + this.formatDigits(date.getMinutes()) + ":" + this.formatDigits(date.getSeconds()); + clock.innerHTML = this.formatDigits(date.getHours()) + ':' + this.formatDigits(date.getMinutes()) + ":" + this.formatDigits(date.getSeconds()); }; Clock.prototype.formatDigits = function (val) { - if (val < 10) val = "0" + val; + 'use strict'; + + if (val < 10) val = '0' + val; return val; -} +}; //OLD @@ -121,6 +129,7 @@ function barwidth(size, G, W) { return newW; } + //String Element erweitern String.prototype.transform = function () { return parseFloat(this.replace(',', '.')); @@ -129,6 +138,7 @@ String.prototype.transform = function () { Array.prototype.arrayAdd = function () { return eval(this.join("+")); } + //Speicherplatz in Prozent berechnen function percentage(total, gigs, round) { var totalSpace = total; @@ -138,6 +148,7 @@ function percentage(total, gigs, round) { return p; } + //Speicherplatz in GB berechnen function gigabytes(percent, total, round) { var occupiedPercent = percent; diff --git a/source/data/new.json b/source/data/start.json similarity index 56% rename from source/data/new.json rename to source/data/start.json index 9d4a0a8..cc0da22 100644 --- a/source/data/new.json +++ b/source/data/start.json @@ -5,10 +5,10 @@ }, { "text": "Basics", - "href": "./demo/basics.html" + "href": "/demo/basics.html" }, { "text": "Drag", - "href": "./demo/examples/ui/drag.html" + "href": "/demo/examples/ui/drag.html" } ] \ No newline at end of file diff --git a/source/screens/demo/examples/ui/new.njk b/source/screens/demo/examples/ui/new.njk deleted file mode 100755 index df1f62a..0000000 --- a/source/screens/demo/examples/ui/new.njk +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: New -tags: - - ui ---- -{% set pageId = page.fileSlug %} -{% set bodyClass = "body_new" %} - -{% extends "hippie/_app_frame.njk" %} -{% import "hippie/macros/_header.njk" as header %} - -{% block body %} - {{ header.status(hippie, new) }} - -
    -
    1
    -
    2
    -
    3
    -
    4
    -
    -{% endblock %} - -{%- block script %} - {{ super() }} - -{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/ui/start.liquid b/source/screens/demo/examples/ui/start.liquid new file mode 100644 index 0000000..8e13c85 --- /dev/null +++ b/source/screens/demo/examples/ui/start.liquid @@ -0,0 +1,44 @@ +--- +title: Start +tags: +- ui +--- +{% assign bodyClass = "body_new" -%} +{% layout "hippie/app.liquid" %} + +{% block body %} +{% render 'hippie/partials/header-status', hippie: hippie, links: start %} + +
    +
    1
    +
    2
    +
    3
    +
    4
    +
    +{% endblock %} + +{%- block script %} +{{ block.super -}} + +{% endblock %} \ No newline at end of file diff --git a/source/templates/hippie/partials/header-status.liquid b/source/templates/hippie/partials/header-status.liquid new file mode 100644 index 0000000..725e305 --- /dev/null +++ b/source/templates/hippie/partials/header-status.liquid @@ -0,0 +1,21 @@ +
    +

    + {{ hippie.brand | upcase }} +

    + +
    +

    {% render 'hippie/partials/status-coord', id: "log" %} + / + {% render 'hippie/partials/status-date', id: "date" %} + / + {% render 'hippie/partials/status-time', id: "time" %}

    +
    +
    diff --git a/source/templates/hippie/partials/status-coord.liquid b/source/templates/hippie/partials/status-coord.liquid new file mode 100644 index 0000000..29e592f --- /dev/null +++ b/source/templates/hippie/partials/status-coord.liquid @@ -0,0 +1 @@ +{{ text | default: 'X: #, Y: ##' }} diff --git a/source/templates/hippie/partials/status-date.liquid b/source/templates/hippie/partials/status-date.liquid new file mode 100644 index 0000000..296a866 --- /dev/null +++ b/source/templates/hippie/partials/status-date.liquid @@ -0,0 +1,6 @@ + + Wochentag, + ##. + Monat + #### + diff --git a/source/templates/hippie/partials/status-time.liquid b/source/templates/hippie/partials/status-time.liquid new file mode 100644 index 0000000..f981e80 --- /dev/null +++ b/source/templates/hippie/partials/status-time.liquid @@ -0,0 +1 @@ +{{ text | default: '00:00:00' }}{{ postfix | default: ' Uhr' }} From bac4b73c08151f09e482767edaa8a3bd7f4044e5 Mon Sep 17 00:00:00 2001 From: sthag Date: Fri, 31 Oct 2025 19:47:19 +0100 Subject: [PATCH 118/296] feat: Add time to task bar - Add app.js to windows screen - Add time display to task bar - Add new TimeDisplay class to app.js - Add play and pause buttons as example - Fix event handlers of task bar according to bubbling and propagation --- source/code/app.js | 57 +++++++++++++++++++ source/code/windows.js | 33 +++++++---- .../screens/demo/examples/ui/windows.liquid | 20 ++++++- source/style/modules/ui/_windows_module.scss | 4 ++ 4 files changed, 103 insertions(+), 11 deletions(-) diff --git a/source/code/app.js b/source/code/app.js index 8a21b5f..3f588fe 100644 --- a/source/code/app.js +++ b/source/code/app.js @@ -1,3 +1,53 @@ +// NEWER + +class TimeDisplay { + constructor(element, format = 'HH:mm:ss', interval = 1000) { + this.element = element; + this.format = format; + this.interval = interval; + this.isPaused = false; + this.locale = navigator.language || 'en-US'; + this.updateTime(); + } + + formatTime(date) { + const options = {hour: '2-digit', minute: '2-digit', hour12: false}; + + switch (this.format) { + case 'HH:mm': + return date.toLocaleTimeString(this.locale, options); + case 'HH:mm:ss': + return date.toLocaleTimeString(this.locale, {...options, second: '2-digit'}); + case 'hh:mm A': + return date.toLocaleTimeString(this.locale, {...options, hour12: true}); + case 'hh:mm:ss A': + return date.toLocaleTimeString(this.locale, {...options, second: '2-digit', hour12: true}); + } + + return date.toString(); + } + + async updateTime() { + while (true) { + if (!this.isPaused) { + const now = new Date(); + this.element.textContent = this.formatTime(now); + } + await new Promise(resolve => setTimeout(resolve, this.interval)); + } + } + + // Method to pause updates + pause() { + this.isPaused = true; + } + + // Method to resume updates + resume() { + this.isPaused = false; + } +} + //NEW function Clock(id) { @@ -158,3 +208,10 @@ function gigabytes(percent, total, round) { return g; } + +function checkButtonAndTarget(event, element, button = 0) { + return ( + event.button === button && + event.target === element + ); +} \ No newline at end of file diff --git a/source/code/windows.js b/source/code/windows.js index f282729..e928e97 100644 --- a/source/code/windows.js +++ b/source/code/windows.js @@ -139,6 +139,7 @@ class DragAdv { this.init(); } + // TODO: Ereignisse besser delegieren init() { this.element.addEventListener('mousedown', this.onMouseDown.bind(this)); document.addEventListener('mousemove', this.onMouseMove.bind(this)); @@ -147,9 +148,12 @@ class DragAdv { } onMouseDown(event) { - if (event.button === 0) { + if (checkButtonAndTarget(event, this.element, 0)) { + console.debug('Drag mode enabled'); + this.isDragging = true; + // TODO: Platzhalter anpassen je nach Ziel this.showPlaceholder(); this.offsetX = this.placeholder.getBoundingClientRect().width / 2; @@ -166,21 +170,29 @@ class DragAdv { } onMouseMove(event) { - if (!this.isDragging) return; + if (this.isDragging) { + if (!this.isDragging) return; - let x = event.clientX - this.offsetX; - let y = event.clientY - this.offsetY; + let x = event.clientX - this.offsetX; + let y = event.clientY - this.offsetY; - this.placeholder.style.left = `${x}px`; - this.placeholder.style.top = `${y}px`; + console.debug('Position: ', x, y); + + this.placeholder.style.left = `${x}px`; + this.placeholder.style.top = `${y}px`; + } } onMouseUp() { - if (!this.isDragging) return; - this.isDragging = false; + if (event.target === this.placeholder) { + console.debug('Drag mode disabled'); - this.snapToEdges(); - this.hidePlaceholder(); + if (!this.isDragging) return; + this.isDragging = false; + + this.snapToEdges(); + this.hidePlaceholder(); + } } showPlaceholder() { @@ -193,6 +205,7 @@ class DragAdv { this.element.style.display = ''; } + // TODO: Prüfung auf Ziel auslagern und schon bei Mausbewegung verfügbar machen snapToEdges() { const rect = this.placeholder.getBoundingClientRect(); const windowWidth = window.innerWidth; diff --git a/source/screens/demo/examples/ui/windows.liquid b/source/screens/demo/examples/ui/windows.liquid index daacb66..7521092 100644 --- a/source/screens/demo/examples/ui/windows.liquid +++ b/source/screens/demo/examples/ui/windows.liquid @@ -18,6 +18,8 @@ tags:
    - +
    + ##:## +
    +
    @@ -42,6 +43,7 @@ tags: {% endblock %} {%- block script %} + +{% comment %}{% endcomment %} + + diff --git a/source/templates/hippie/_main.njk b/source/templates/hippie/_main.njk index 7574dc9..3934cc1 100644 --- a/source/templates/hippie/_main.njk +++ b/source/templates/hippie/_main.njk @@ -43,6 +43,7 @@ {{ log.log('BODY :: Loading script assets...') }} {# #} + + From 5f8e048c84c414f5465de4ab096afe8fe9778ab8 Mon Sep 17 00:00:00 2001 From: sthag Date: Sat, 8 Nov 2025 21:58:23 +0100 Subject: [PATCH 140/296] feat: Replace status screens with liquid versions - maintenance.njk is now a single status.liquid - All status screens use liquid - Simplify structure --- source/screens/demo/pages/error/304.liquid | 20 +++++++++++ source/screens/demo/pages/error/304.njk | 26 -------------- source/screens/demo/pages/error/400.liquid | 17 +++++++++ source/screens/demo/pages/error/400.njk | 26 -------------- source/screens/demo/pages/error/401.liquid | 18 ++++++++++ source/screens/demo/pages/error/401.njk | 26 -------------- source/screens/demo/pages/error/403.liquid | 18 ++++++++++ source/screens/demo/pages/error/403.njk | 26 -------------- source/screens/demo/pages/error/404.liquid | 19 ++++++++++ source/screens/demo/pages/error/404.njk | 26 -------------- source/screens/demo/pages/error/408.liquid | 17 +++++++++ source/screens/demo/pages/error/408.njk | 26 -------------- source/screens/demo/pages/error/500.liquid | 17 +++++++++ source/screens/demo/pages/error/500.njk | 26 -------------- source/screens/demo/pages/error/503.liquid | 19 ++++++++++ source/screens/demo/pages/error/503.njk | 26 -------------- source/screens/demo/pages/maintenance.liquid | 13 +++++++ source/screens/demo/pages/maintenance.njk | 21 ----------- source/templates/demo/_maintenance.njk | 12 ------- source/templates/hippie/_maintenance.njk | 27 -------------- .../hippie/partials/footer-status.liquid | 9 +++++ source/templates/hippie/status.liquid | 36 +++++++++++++++++++ 22 files changed, 203 insertions(+), 268 deletions(-) create mode 100644 source/screens/demo/pages/error/304.liquid delete mode 100644 source/screens/demo/pages/error/304.njk create mode 100644 source/screens/demo/pages/error/400.liquid delete mode 100644 source/screens/demo/pages/error/400.njk create mode 100644 source/screens/demo/pages/error/401.liquid delete mode 100644 source/screens/demo/pages/error/401.njk create mode 100644 source/screens/demo/pages/error/403.liquid delete mode 100644 source/screens/demo/pages/error/403.njk create mode 100644 source/screens/demo/pages/error/404.liquid delete mode 100644 source/screens/demo/pages/error/404.njk create mode 100644 source/screens/demo/pages/error/408.liquid delete mode 100644 source/screens/demo/pages/error/408.njk create mode 100644 source/screens/demo/pages/error/500.liquid delete mode 100644 source/screens/demo/pages/error/500.njk create mode 100644 source/screens/demo/pages/error/503.liquid delete mode 100644 source/screens/demo/pages/error/503.njk create mode 100644 source/screens/demo/pages/maintenance.liquid delete mode 100644 source/screens/demo/pages/maintenance.njk delete mode 100644 source/templates/demo/_maintenance.njk delete mode 100644 source/templates/hippie/_maintenance.njk create mode 100644 source/templates/hippie/partials/footer-status.liquid create mode 100644 source/templates/hippie/status.liquid diff --git a/source/screens/demo/pages/error/304.liquid b/source/screens/demo/pages/error/304.liquid new file mode 100644 index 0000000..eb3b98c --- /dev/null +++ b/source/screens/demo/pages/error/304.liquid @@ -0,0 +1,20 @@ +--- +title: 304 +--- +{% assign pageBase = "../../../" -%} +{% assign bodyClass = "body_status" %} +{%- layout "hippie/status.liquid" %} + +{% block main %} +{{ block.super -}} +

    Umleitung

    +

    Unverändert Not Modified

    +
    +

    Der Inhalt der angeforderten Ressource hat sich seit der letzten Abfrage des Clients nicht verändert und wird + deshalb nicht übertragen. Zu den Einzelheiten siehe Browser-Cache-Versionsvergleich. +

    +

    Wikipedia

    +
    +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/pages/error/304.njk b/source/screens/demo/pages/error/304.njk deleted file mode 100644 index 1d47451..0000000 --- a/source/screens/demo/pages/error/304.njk +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: 304 ---- -{% set pageBase = "../../" %} -{% set pageId = page.fileSlug %} -{% set bodyClass = "body_status" %} - -{% extends "demo/_maintenance.njk" %} - -{% block title %}{{ title }}{% endblock %} -{% block head %} -{{ super() }} -{% endblock %} - -{% block body %} -
    -

    {{ title }}

    -

    Umleitung

    -

    Unverändert Not Modified

    -
    -

    Der Inhalt der angeforderten Ressource hat sich seit der letzten Abfrage des Clients nicht verändert und wird deshalb nicht übertragen. Zu den Einzelheiten siehe Browser-Cache-Versionsvergleich.

    -

    Wikipedia

    -
    -
    -{{ super() }} -{% endblock %} diff --git a/source/screens/demo/pages/error/400.liquid b/source/screens/demo/pages/error/400.liquid new file mode 100644 index 0000000..6d480e8 --- /dev/null +++ b/source/screens/demo/pages/error/400.liquid @@ -0,0 +1,17 @@ +--- +title: 400 +--- +{% assign pageBase = "../../../" -%} +{% assign bodyClass = "body_status" %} +{%- layout "hippie/status.liquid" %} + +{% block main %} +{{ block.super -}} +

    Client-Fehler

    +

    Fehlerhafte Anfrage! Bad Request

    +
    +

    Die Anfrage-Nachricht war fehlerhaft aufgebaut.

    +

    Wikipedia +

    +
    +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/pages/error/400.njk b/source/screens/demo/pages/error/400.njk deleted file mode 100644 index 087b9a8..0000000 --- a/source/screens/demo/pages/error/400.njk +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: 400 ---- -{% set pageBase = "../../" %} -{% set pageId = page.fileSlug %} -{% set bodyClass = "body_status" %} - -{% extends "demo/_maintenance.njk" %} - -{% block title %}{{ title }}{% endblock %} -{% block head %} -{{ super() }} -{% endblock %} - -{% block body %} -
    -

    {{ title }}

    -

    Client-Fehler

    -

    Fehlerhafte Anfrage! Bad Request

    -
    -

    Die Anfrage-Nachricht war fehlerhaft aufgebaut.

    -

    Wikipedia

    -
    -
    -{{ super() }} -{% endblock %} diff --git a/source/screens/demo/pages/error/401.liquid b/source/screens/demo/pages/error/401.liquid new file mode 100644 index 0000000..3bef772 --- /dev/null +++ b/source/screens/demo/pages/error/401.liquid @@ -0,0 +1,18 @@ +--- +title: 401 +--- +{% assign pageBase = "../../../" -%} +{% assign bodyClass = "body_status" %} +{%- layout "hippie/status.liquid" %} + +{% block main %} +{{ block.super -}} +

    Client-Fehler

    +

    Nicht autorisiert! Unauthorized

    +
    +

    Die Anfrage kann nicht ohne gültige Authentifizierung durchgeführt werden. Wie die Authentifizierung durchgeführt + werden soll, wird im „WWW-Authenticate“-Header-Feld der Antwort übermittelt.

    +

    Wikipedia +

    +
    +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/pages/error/401.njk b/source/screens/demo/pages/error/401.njk deleted file mode 100644 index f38c3f9..0000000 --- a/source/screens/demo/pages/error/401.njk +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: 401 ---- -{% set pageBase = "../../" %} -{% set pageId = page.fileSlug %} -{% set bodyClass = "body_status" %} - -{% extends "demo/_maintenance.njk" %} - -{% block title %}{{ title }}{% endblock %} -{% block head %} -{{ super() }} -{% endblock %} - -{% block body %} -
    -

    {{ title }}

    -

    Client-Fehler

    -

    Nicht autorisiert! Unauthorized

    -
    -

    Die Anfrage kann nicht ohne gültige Authentifizierung durchgeführt werden. Wie die Authentifizierung durchgeführt werden soll, wird im „WWW-Authenticate“-Header-Feld der Antwort übermittelt.

    -

    Wikipedia

    -
    -
    -{{ super() }} -{% endblock %} diff --git a/source/screens/demo/pages/error/403.liquid b/source/screens/demo/pages/error/403.liquid new file mode 100644 index 0000000..94a245f --- /dev/null +++ b/source/screens/demo/pages/error/403.liquid @@ -0,0 +1,18 @@ +--- +title: 403 +--- +{% assign pageBase = "../../../" -%} +{% assign bodyClass = "body_status" %} +{%- layout "hippie/status.liquid" %} + +{% block main %} +{{ block.super -}} +

    Client-Fehler

    +

    Nicht erlaubt! Forbidden

    +
    +

    Die Anfrage wurde mangels Berechtigung des Clients nicht durchgeführt, bspw. weil der authentifizierte Benutzer + nicht berechtigt ist, oder eine als HTTPS konfigurierte URL nur mit HTTP aufgerufen wurde.

    +

    Wikipedia +

    +
    +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/pages/error/403.njk b/source/screens/demo/pages/error/403.njk deleted file mode 100644 index 03904e4..0000000 --- a/source/screens/demo/pages/error/403.njk +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: 403 ---- -{% set pageBase = "../../" %} -{% set pageId = page.fileSlug %} -{% set bodyClass = "body_status" %} - -{% extends "demo/_maintenance.njk" %} - -{% block title %}{{ title }}{% endblock %} -{% block head %} -{{ super() }} -{% endblock %} - -{% block body %} -
    -

    {{ title }}

    -

    Client-Fehler

    -

    Nicht erlaubt! Forbidden

    -
    -

    Die Anfrage wurde mangels Berechtigung des Clients nicht durchgeführt, bspw. weil der authentifizierte Benutzer nicht berechtigt ist, oder eine als HTTPS konfigurierte URL nur mit HTTP aufgerufen wurde.

    -

    Wikipedia

    -
    -
    -{{ super() }} -{% endblock %} diff --git a/source/screens/demo/pages/error/404.liquid b/source/screens/demo/pages/error/404.liquid new file mode 100644 index 0000000..eadf7ee --- /dev/null +++ b/source/screens/demo/pages/error/404.liquid @@ -0,0 +1,19 @@ +--- +title: 404 +--- +{% assign pageBase = "../../../" -%} +{% assign bodyClass = "body_status" %} +{%- layout "hippie/status.liquid" %} + +{% block main %} +{{ block.super -}} +

    Client-Fehler

    +

    Hier ist nichts. Not Found

    +
    +

    Die angeforderte Ressource wurde nicht gefunden. Dieser Statuscode kann ebenfalls verwendet werden, um eine + Anfrage ohne näheren Grund abzuweisen. Links, welche auf solche Fehlerseiten verweisen, werden auch als Tote + Links bezeichnet.

    +

    Wikipedia +

    +
    +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/pages/error/404.njk b/source/screens/demo/pages/error/404.njk deleted file mode 100644 index bebd4f5..0000000 --- a/source/screens/demo/pages/error/404.njk +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: 404 ---- -{% set pageBase = "../../" %} -{% set pageId = page.fileSlug %} -{% set bodyClass = "body_status" %} - -{% extends "demo/_maintenance.njk" %} - -{% block title %}{{ title }}{% endblock %} -{% block head %} -{{ super() }} -{% endblock %} - -{% block body %} -
    -

    {{ title }}

    -

    Client-Fehler

    -

    Hier ist nichts. Not Found

    -
    -

    Die angeforderte Ressource wurde nicht gefunden. Dieser Statuscode kann ebenfalls verwendet werden, um eine Anfrage ohne näheren Grund abzuweisen. Links, welche auf solche Fehlerseiten verweisen, werden auch als Tote Links bezeichnet.

    -

    Wikipedia

    -
    -
    -{{ super() }} -{% endblock %} diff --git a/source/screens/demo/pages/error/408.liquid b/source/screens/demo/pages/error/408.liquid new file mode 100644 index 0000000..0e50541 --- /dev/null +++ b/source/screens/demo/pages/error/408.liquid @@ -0,0 +1,17 @@ +--- +title: 408 +--- +{% assign pageBase = "../../../" -%} +{% assign bodyClass = "body_status" %} +{%- layout "hippie/status.liquid" %} + +{% block main %} +{{ block.super -}} +

    Client-Fehler

    +

    Zeitüberschreitung der Anforderung. Request Timeout

    +
    +

    Innerhalb der vom Server erlaubten Zeitspanne wurde keine vollständige Anfrage des Clients empfangen.

    +

    Wikipedia +

    +
    +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/pages/error/408.njk b/source/screens/demo/pages/error/408.njk deleted file mode 100644 index c5e10e0..0000000 --- a/source/screens/demo/pages/error/408.njk +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: 408 ---- -{% set pageBase = "../../" %} -{% set pageId = page.fileSlug %} -{% set bodyClass = "body_status" %} - -{% extends "demo/_maintenance.njk" %} - -{% block title %}{{ title }}{% endblock %} -{% block head %} -{{ super() }} -{% endblock %} - -{% block body %} -
    -

    {{ title }}

    -

    Client-Fehler

    -

    Zeitüberschreitung der Anforderung. Request Timeout

    -
    -

    Innerhalb der vom Server erlaubten Zeitspanne wurde keine vollständige Anfrage des Clients empfangen.

    -

    Wikipedia

    -
    -
    -{{ super() }} -{% endblock %} diff --git a/source/screens/demo/pages/error/500.liquid b/source/screens/demo/pages/error/500.liquid new file mode 100644 index 0000000..96489d3 --- /dev/null +++ b/source/screens/demo/pages/error/500.liquid @@ -0,0 +1,17 @@ +--- +title: 500 +--- +{% assign pageBase = "../../../" -%} +{% assign bodyClass = "body_status" %} +{%- layout "hippie/status.liquid" %} + +{% block main %} +{{ block.super -}} +

    Server-Fehler

    +

    Allgemeiner Server Fehler!!! Internal Server Error

    +
    +

    Dies ist ein „Sammel-Statuscode“ für unerwartete Serverfehler.

    +

    Wikipedia +

    +
    +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/pages/error/500.njk b/source/screens/demo/pages/error/500.njk deleted file mode 100644 index d04c5c8..0000000 --- a/source/screens/demo/pages/error/500.njk +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: 500 ---- -{% set pageBase = "../../" %} -{% set pageId = page.fileSlug %} -{% set bodyClass = "body_status" %} - -{% extends "demo/_maintenance.njk" %} - -{% block title %}{{ title }}{% endblock %} -{% block head %} -{{ super() }} -{% endblock %} - -{% block body %} -
    -

    {{ title }}

    -

    Server-Fehler

    -

    Allgemeiner Server Fehler!!! Internal Server Error

    -
    -

    Dies ist ein „Sammel-Statuscode“ für unerwartete Serverfehler.

    -

    Wikipedia

    -
    -
    -{{ super() }} -{% endblock %} diff --git a/source/screens/demo/pages/error/503.liquid b/source/screens/demo/pages/error/503.liquid new file mode 100644 index 0000000..46647d9 --- /dev/null +++ b/source/screens/demo/pages/error/503.liquid @@ -0,0 +1,19 @@ +--- +title: 503 +--- +{% assign pageBase = "../../../" -%} +{% assign bodyClass = "body_status" %} +{%- layout "hippie/status.liquid" %} + +{% block main %} +{{ block.super -}} +

    Server-Fehler

    +

    Dienst nicht verfügbar. Service Unavailable

    +
    +

    Der Server steht temporär nicht zur Verfügung, zum Beispiel wegen Überlastung oder Wartungsarbeiten. Ein + „Retry-After“-Header-Feld in der Antwort kann den Client auf einen Zeitpunkt hinweisen, zu dem die Anfrage + eventuell bearbeitet werden könnte.

    +

    Wikipedia +

    +
    +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/pages/error/503.njk b/source/screens/demo/pages/error/503.njk deleted file mode 100644 index f215a54..0000000 --- a/source/screens/demo/pages/error/503.njk +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: 503 ---- -{% set pageBase = "../../" %} -{% set pageId = page.fileSlug %} -{% set bodyClass = "body_status" %} - -{% extends "demo/_maintenance.njk" %} - -{% block title %}{{ title }}{% endblock %} -{% block head %} -{{ super() }} -{% endblock %} - -{% block body %} -
    -

    {{ title }}

    -

    Server-Fehler

    -

    Dienst nicht verfügbar. Service Unavailable

    -
    -

    Der Server steht temporär nicht zur Verfügung, zum Beispiel wegen Überlastung oder Wartungsarbeiten. Ein „Retry-After“-Header-Feld in der Antwort kann den Client auf einen Zeitpunkt hinweisen, zu dem die Anfrage eventuell bearbeitet werden könnte.

    -

    Wikipedia

    -
    -
    -{{ super() }} -{% endblock %} diff --git a/source/screens/demo/pages/maintenance.liquid b/source/screens/demo/pages/maintenance.liquid new file mode 100644 index 0000000..d713f9e --- /dev/null +++ b/source/screens/demo/pages/maintenance.liquid @@ -0,0 +1,13 @@ +--- +title: Maintenance +--- +{% assign pageBase = "../../" -%} +{% assign pageClass = "h_full_view" %} +{%- layout "hippie/status.liquid" %} + +{% block body %} +
    +

    HIPPIE

    +

    Diese Seite wird gerade gewartet.

    +
    +{% endblock %} diff --git a/source/screens/demo/pages/maintenance.njk b/source/screens/demo/pages/maintenance.njk deleted file mode 100644 index b9cd3fe..0000000 --- a/source/screens/demo/pages/maintenance.njk +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Maintenance ---- -{% set pageBase = "../" %} -{% set pageId = page.fileSlug %} -{% set pageClass = "h_full_view" %} - -{% extends "demo/_maintenance.njk" %} - -{% block title %}{{ title }}{% endblock %} - -{% block head %} -{{ super() }} -{% endblock %} - -{% block body %} - -
    -

    HIPPIE

    -
    -{% endblock %} diff --git a/source/templates/demo/_maintenance.njk b/source/templates/demo/_maintenance.njk deleted file mode 100644 index da94505..0000000 --- a/source/templates/demo/_maintenance.njk +++ /dev/null @@ -1,12 +0,0 @@ - -{% extends "hippie/_maintenance.njk" %} - -{% block meta %} - {% include "demo/partials/_meta.njk" %} - -{% endblock %} - -{% block links %} - {{ super() }} - -{% endblock %} \ No newline at end of file diff --git a/source/templates/hippie/_maintenance.njk b/source/templates/hippie/_maintenance.njk deleted file mode 100644 index 0741534..0000000 --- a/source/templates/hippie/_maintenance.njk +++ /dev/null @@ -1,27 +0,0 @@ - -{% import "hippie/macros/_footer.njk" as footer %} - - - - - - {% block head %} - {{ hippie.titlePrefix }} - {%- block title %}{% endblock %}{{ hippie.titlePostfix }} - - {% block meta %} - {% include "hippie/partials/_head_meta.njk" %} - {% endblock %} - - {% block links %} - - {% endblock %} - {% endblock %} - - - - {% block body %} - {{ footer.status() }} - {% endblock %} - - \ No newline at end of file diff --git a/source/templates/hippie/partials/footer-status.liquid b/source/templates/hippie/partials/footer-status.liquid new file mode 100644 index 0000000..b46ecf2 --- /dev/null +++ b/source/templates/hippie/partials/footer-status.liquid @@ -0,0 +1,9 @@ +
    +
    Kontakt: + {{ email | default: 'admin@domain.tld' }} + · Server: + {{ app | default: 'Application' }}/{{ version | default: 'ver.s.ion' }} + ({{ system | default: 'System name' }}) · Domain: + {{ domain | default: 'domain.tld:port' }} +
    +
    \ No newline at end of file diff --git a/source/templates/hippie/status.liquid b/source/templates/hippie/status.liquid new file mode 100644 index 0000000..6189ca9 --- /dev/null +++ b/source/templates/hippie/status.liquid @@ -0,0 +1,36 @@ + +{% if pageClass %} + {%- capture classAttr %} class="{{ pageClass }}"{% endcapture -%} +{% endif -%} +{% if bodyClass %} + {%- capture bodyClassAttr %} class="{{ bodyClass }}"{% endcapture -%} +{% endif -%} + + + + {% block head %} + + {{- hippie.titlePrefix -}} + {% block title %}{{ title }}{% endblock -%} + {{ hippie.titlePostfix -}} + + {% block meta -%} + {% render "hippie/partials/meta.liquid" %} + {% endblock -%} + {% block links -%} + + + {% endblock -%} + {% endblock -%} + + + +{%- block body %} +
    +

    {{ title }}

    + {% block main %}{% endblock -%} +
    +{% render 'hippie/partials/footer-status' %} +{% endblock -%} + + \ No newline at end of file From 5663813ecfe7d53082a4622952c01ab9c4562724 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 9 Nov 2025 12:58:41 +0100 Subject: [PATCH 141/296] feat: Replace index screen with liquid version - _default.njk is now a single full.liquid - Simplify structure - Add log partials as liquid --- source/screens/demo/index.liquid | 78 ++++++++++++ source/screens/demo/index.njk | 82 ------------- source/templates/hippie/full.liquid | 49 ++++++++ .../hippie/partials/log-assets.liquid | 3 + .../templates/hippie/partials/log-log.liquid | 3 + .../hippie/partials/log-setup.liquid | 6 + .../hippie/partials/log-start.liquid | 4 + .../hippie/partials/script-log.liquid | 113 ++++++++++++++++++ 8 files changed, 256 insertions(+), 82 deletions(-) create mode 100644 source/screens/demo/index.liquid delete mode 100644 source/screens/demo/index.njk create mode 100644 source/templates/hippie/full.liquid create mode 100644 source/templates/hippie/partials/log-assets.liquid create mode 100644 source/templates/hippie/partials/log-log.liquid create mode 100644 source/templates/hippie/partials/log-setup.liquid create mode 100644 source/templates/hippie/partials/log-start.liquid create mode 100644 source/templates/hippie/partials/script-log.liquid diff --git a/source/screens/demo/index.liquid b/source/screens/demo/index.liquid new file mode 100644 index 0000000..0b7c221 --- /dev/null +++ b/source/screens/demo/index.liquid @@ -0,0 +1,78 @@ +--- +permalink: "/" +title: Index +tags: +- demoIndex +--- +{% assign pageBase = hippie.pageBase -%} +{% assign pageId = page.fileSlug -%} +{% assign pageClass = "h_full_view" -%} +{%- layout "hippie/full.liquid" %} + +{% block title %}Index{% endblock %} + +{% block body %} +
    +
    +

    This is {{ hippie.brand | upcase }}

    +

    You can start using it by replacing this file with your own index page.

    +

    To do this you need to create a file + /index.njk + inside the + source/screens + folder. You can also create a + data.json + file inside the + source/templates + folder as a data source for your nunjucks files.

    +

    For a very basic start you can make a copy of the demo page + blank.njk. You can find it at + /source/screens/demo.

    +

    The + source/demo + folder contains an overview of all HTML elements and also examples for CSS style combinations and even whole + page layouts.
    Follow the white rabbit.

    +
    +
      ()()
    (..)
    c(")(")
    +

    Overview

    +
    + +

    Page

    + +

    Example

    + +
    +
    +{% endblock %} + +{% block script %} +{{ block.super -}} +{% 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 'Application ready... or is it?' as msg -%} +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/index.njk b/source/screens/demo/index.njk deleted file mode 100644 index c50c516..0000000 --- a/source/screens/demo/index.njk +++ /dev/null @@ -1,82 +0,0 @@ ---- -permalink: "/" -title: Index -tags: - - demoIndex ---- -{% set pageBase = hippie.pageBase %} -{% set pageId = page.fileSlug %} -{% set pageClass = "h_full_view" %} - -{% extends "demo/_default.njk" %} - -{% block title %}Index{% endblock %} -{% block head %} - {{ super() }} -{% endblock %} - -{% block body %} - -
    -
    -

    This is - {{ hippie.brand | upper }}

    -

    You can start using it by replacing this file with your own index page.

    -

    To do this you need to create a file - /index.njk - inside the - source/screens - folder. You can also create a - data.json - file inside the - source/templates - folder as a data source for your nunjucks files.

    -

    For a very basic start you can make a copy of the demo page - blank.njk. You can find it at - /source/screens/demo.

    -

    The - source/demo - folder contains an overview of all HTML elements and also examples for CSS style combinations and even whole page layouts.
    Follow the white rabbit.

    -
    -
      ()()
    (..)
    c(")(")
    -

    Overview

    -
    - -

    Page

    - -

    Example

    - -
    -
    -{% endblock %} - -{% block script %} - {{ super() }} - -{% endblock %} \ No newline at end of file diff --git a/source/templates/hippie/full.liquid b/source/templates/hippie/full.liquid new file mode 100644 index 0000000..7167a5f --- /dev/null +++ b/source/templates/hippie/full.liquid @@ -0,0 +1,49 @@ + +{% if pageId %} +{%- capture idAttr %} id="{{ pageId }}"{% endcapture -%} +{% endif -%} +{% if pageClass %} + {%- capture classAttr %} class="{{ pageClass }}"{% endcapture -%} +{% endif -%} +{% if bodyClass %} + {%- capture bodyClassAttr %} class="{{ bodyClass }}"{% endcapture -%} +{% endif -%} + + + + {% block head %} + + {{- hippie.titlePrefix -}} + {% block title %}{% endblock -%} + {{ hippie.titlePostfix -}} + + {% block meta -%} + {% render "hippie/partials/meta.liquid" %} + {% comment %}{% endcomment %} + {% endblock -%} + {% render "hippie/partials/script-log.liquid" %} + {% render 'hippie/partials/log-setup', hippie: hippie, state: true -%} + {% render 'hippie/partials/log-start' -%} + {% block links -%} + {% render "hippie/partials/links.liquid" %} + {% comment %}{% endcomment %} + {% comment %}{% endcomment %} + + {% endblock -%} + {% render 'hippie/partials/log-log' with 'HEAD end :: Links parsed, starting to load.' as msg -%} + {% endblock -%} + + + +{% render 'hippie/partials/log-log' with 'BODY start' as msg -%} +{%- block body %}{% endblock -%} +{% block script -%} +{% render 'hippie/partials/log-log' with 'BODY :: Loading script assets...' as msg -%} + + +{% endblock -%} +{% render 'hippie/partials/log-log' with 'BODY end :: Page script might still be loading.' as msg -%} + + \ No newline at end of file diff --git a/source/templates/hippie/partials/log-assets.liquid b/source/templates/hippie/partials/log-assets.liquid new file mode 100644 index 0000000..a34b417 --- /dev/null +++ b/source/templates/hippie/partials/log-assets.liquid @@ -0,0 +1,3 @@ + diff --git a/source/templates/hippie/partials/log-log.liquid b/source/templates/hippie/partials/log-log.liquid new file mode 100644 index 0000000..ba21f2a --- /dev/null +++ b/source/templates/hippie/partials/log-log.liquid @@ -0,0 +1,3 @@ + diff --git a/source/templates/hippie/partials/log-setup.liquid b/source/templates/hippie/partials/log-setup.liquid new file mode 100644 index 0000000..04fd9b2 --- /dev/null +++ b/source/templates/hippie/partials/log-setup.liquid @@ -0,0 +1,6 @@ +{% comment %}{% assign hippie.debugMode = state %}{% endcomment %} + diff --git a/source/templates/hippie/partials/log-start.liquid b/source/templates/hippie/partials/log-start.liquid new file mode 100644 index 0000000..e137e33 --- /dev/null +++ b/source/templates/hippie/partials/log-start.liquid @@ -0,0 +1,4 @@ + diff --git a/source/templates/hippie/partials/script-log.liquid b/source/templates/hippie/partials/script-log.liquid new file mode 100644 index 0000000..7e270c7 --- /dev/null +++ b/source/templates/hippie/partials/script-log.liquid @@ -0,0 +1,113 @@ + \ No newline at end of file From 1b7e4f4888f48e6afbce84956a5abca42baafa58 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 9 Nov 2025 14:33:44 +0100 Subject: [PATCH 142/296] feat: Replace blank screen with liquid version - Add title to full template - Remove unnecessary title from screens - Change CRLF to LF --- source/screens/demo/index.liquid | 2 -- source/screens/demo/pages/blank.liquid | 10 +++++++++ source/screens/demo/pages/blank.njk | 22 -------------------- source/screens/demo/pages/default.liquid | 2 +- source/screens/demo/pages/maintenance.liquid | 2 +- source/templates/hippie/full.liquid | 2 +- source/templates/hippie/status.liquid | 5 +++-- 7 files changed, 16 insertions(+), 29 deletions(-) create mode 100644 source/screens/demo/pages/blank.liquid delete mode 100644 source/screens/demo/pages/blank.njk diff --git a/source/screens/demo/index.liquid b/source/screens/demo/index.liquid index 0b7c221..1f19b26 100644 --- a/source/screens/demo/index.liquid +++ b/source/screens/demo/index.liquid @@ -9,8 +9,6 @@ tags: {% assign pageClass = "h_full_view" -%} {%- layout "hippie/full.liquid" %} -{% block title %}Index{% endblock %} - {% block body %}
    diff --git a/source/screens/demo/pages/blank.liquid b/source/screens/demo/pages/blank.liquid new file mode 100644 index 0000000..b6914e5 --- /dev/null +++ b/source/screens/demo/pages/blank.liquid @@ -0,0 +1,10 @@ +--- +title: Blank +--- +{% assign pageBase = "../../" -%} +{% assign pageId = page.fileSlug -%} +{%- layout "hippie/full.liquid" %} + +{% block body %} + +{% endblock %} diff --git a/source/screens/demo/pages/blank.njk b/source/screens/demo/pages/blank.njk deleted file mode 100644 index 3ff646f..0000000 --- a/source/screens/demo/pages/blank.njk +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Blank ---- -{% set pageBase = "../" %} -{% set pageId = page.fileSlug %} -{% set pageClass = "h_full_view" %} - -{% extends "demo/_default.njk" %} - -{% block title %}{{ title }}{% endblock %} - -{% block head %} -{{ super() }} -{% endblock %} - -{% block body %} - -{% endblock %} - -{% block script %} -{{ super() }} -{% endblock %} diff --git a/source/screens/demo/pages/default.liquid b/source/screens/demo/pages/default.liquid index 026c6da..5da6a7c 100644 --- a/source/screens/demo/pages/default.liquid +++ b/source/screens/demo/pages/default.liquid @@ -1,5 +1,5 @@ --- -title: "Default" +title: Default --- {% assign pageBase = "../" -%} {% assign pageId = page.fileSlug -%} diff --git a/source/screens/demo/pages/maintenance.liquid b/source/screens/demo/pages/maintenance.liquid index d713f9e..a4943f2 100644 --- a/source/screens/demo/pages/maintenance.liquid +++ b/source/screens/demo/pages/maintenance.liquid @@ -2,7 +2,7 @@ title: Maintenance --- {% assign pageBase = "../../" -%} -{% assign pageClass = "h_full_view" %} +{% assign pageClass = "h_full_view" -%} {%- layout "hippie/status.liquid" %} {% block body %} diff --git a/source/templates/hippie/full.liquid b/source/templates/hippie/full.liquid index 7167a5f..89ba267 100644 --- a/source/templates/hippie/full.liquid +++ b/source/templates/hippie/full.liquid @@ -14,7 +14,7 @@ {% block head %} {{- hippie.titlePrefix -}} - {% block title %}{% endblock -%} + {% block title %}{{ title }}{% endblock -%} {{ hippie.titlePostfix -}} {% block meta -%} diff --git a/source/templates/hippie/status.liquid b/source/templates/hippie/status.liquid index 6189ca9..f2e0ce1 100644 --- a/source/templates/hippie/status.liquid +++ b/source/templates/hippie/status.liquid @@ -1,6 +1,6 @@ {% if pageClass %} - {%- capture classAttr %} class="{{ pageClass }}"{% endcapture -%} +{%- capture classAttr %} class="{{ pageClass }}"{% endcapture -%} {% endif -%} {% if bodyClass %} {%- capture bodyClassAttr %} class="{{ bodyClass }}"{% endcapture -%} @@ -18,7 +18,8 @@ {% render "hippie/partials/meta.liquid" %} {% endblock -%} {% block links -%} - + {% endblock -%} {% endblock -%} From 432af47d2c086ae18d84c37ba1a20e497902dc25 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 16 Nov 2025 12:13:57 +0100 Subject: [PATCH 143/296] feat: Add start screen - Rename existing ui start screen to tile - Add start screen - Search input for DuckDuckGo - Unfinished portal content --- source/screens/demo/examples/start.liquid | 84 +++++++++++++++++++ .../examples/ui/{start.liquid => tile.liquid} | 2 +- source/style/demo.scss | 1 + source/style/modules/_start.scss | 15 ++++ 4 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 source/screens/demo/examples/start.liquid rename source/screens/demo/examples/ui/{start.liquid => tile.liquid} (96%) create mode 100644 source/style/modules/_start.scss diff --git a/source/screens/demo/examples/start.liquid b/source/screens/demo/examples/start.liquid new file mode 100644 index 0000000..b4b1d98 --- /dev/null +++ b/source/screens/demo/examples/start.liquid @@ -0,0 +1,84 @@ +--- +title: Start +tags: +- demoExample +--- +{% assign pageBase = "../../" -%} +{% assign pageId = page.fileSlug -%} +{% assign bodyClass = "body_start" -%} +{% layout "hippie/full.liquid" %} + +{% block body %} +
    + +
    + + +
    +
    +{% endblock %} + +{% block script %} +{{ block.super -}} + +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/ui/start.liquid b/source/screens/demo/examples/ui/tile.liquid similarity index 96% rename from source/screens/demo/examples/ui/start.liquid rename to source/screens/demo/examples/ui/tile.liquid index 261cb16..4bcd8c4 100644 --- a/source/screens/demo/examples/ui/start.liquid +++ b/source/screens/demo/examples/ui/tile.liquid @@ -1,5 +1,5 @@ --- -title: Start +title: Tile tags: - ui --- diff --git a/source/style/demo.scss b/source/style/demo.scss index 73e17c1..98e355e 100644 --- a/source/style/demo.scss +++ b/source/style/demo.scss @@ -13,4 +13,5 @@ @use "modules/portal/portal_module"; @use "modules/songbook/songbook_module"; @use "modules/demo/demo_module"; +@use "modules/start"; // @use "modules/YOUR-MODULE/YOUR-FILES"; diff --git a/source/style/modules/_start.scss b/source/style/modules/_start.scss new file mode 100644 index 0000000..7d790a3 --- /dev/null +++ b/source/style/modules/_start.scss @@ -0,0 +1,15 @@ +@use "../../hippie-style/hippie"; + +.body_start { + main { + @extend .sec_main_center; + } + + #www-search { + input[type="text"] { + flex: 1; + padding: hippie.$padding_basic; + line-height: hippie.$line_text_basic; + } + } +} \ No newline at end of file From fcdbfb41ef7bd5946d9c953f6752ddd6c0bec375 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 16 Nov 2025 12:29:19 +0100 Subject: [PATCH 144/296] feat: Add clock screen - New screen for a ring clock - Add a canvas with the first ring - No functionality yet --- source/screens/demo/examples/clock.liquid | 34 +++++++++++++++++++++++ source/style/demo.scss | 1 + source/style/modules/_clock.scss | 9 ++++++ 3 files changed, 44 insertions(+) create mode 100644 source/screens/demo/examples/clock.liquid create mode 100644 source/style/modules/_clock.scss diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid new file mode 100644 index 0000000..4541525 --- /dev/null +++ b/source/screens/demo/examples/clock.liquid @@ -0,0 +1,34 @@ +--- +title: Clock +tags: +- demoExample +--- +{% assign pageBase = "../../" -%} +{% assign bodyClass = "body_clock" -%} +{% layout "hippie/full.liquid" %} + +{% block body %} +
    + +
    +{% endblock %} + +{% block script %} +{{ block.super -}} + +{% endblock %} \ No newline at end of file diff --git a/source/style/demo.scss b/source/style/demo.scss index 98e355e..fe2b7e8 100644 --- a/source/style/demo.scss +++ b/source/style/demo.scss @@ -14,4 +14,5 @@ @use "modules/songbook/songbook_module"; @use "modules/demo/demo_module"; @use "modules/start"; +@use "modules/clock"; // @use "modules/YOUR-MODULE/YOUR-FILES"; diff --git a/source/style/modules/_clock.scss b/source/style/modules/_clock.scss new file mode 100644 index 0000000..74265da --- /dev/null +++ b/source/style/modules/_clock.scss @@ -0,0 +1,9 @@ +@use "../../hippie-style/hippie"; + +.body_clock { + main { + @extend .sec_main_center; + display: flex; + justify-content: center; + } +} \ No newline at end of file From dfa315310f011d499eb509a4cde8950bc048971a Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 16 Nov 2025 12:35:39 +0100 Subject: [PATCH 145/296] feat: Update clock - Change how the arc is drawn - Update the ring according to seconds --- source/screens/demo/examples/clock.liquid | 28 +++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid index 4541525..1ef49bc 100644 --- a/source/screens/demo/examples/clock.liquid +++ b/source/screens/demo/examples/clock.liquid @@ -20,15 +20,29 @@ tags: const canvas = document.getElementById('clock'); const ctx = canvas.getContext('2d'); - function drawRing(x, y, outerRadius, innerRadius, color) { + function drawRing(seconds) { + const centerX = canvas.width / 2; + const centerY = canvas.height / 2; + const radius = 128; + + ctx.clearRect(0, 0, canvas.width, canvas.height); + + const startAngle = -0.5 * Math.PI; // Start at the top + const endAngle = startAngle + (2 * Math.PI * (seconds / 60)); + ctx.beginPath(); - ctx.arc(x, y, outerRadius, 0, Math.PI * 2); - ctx.arc(x, y, innerRadius, 0, Math.PI * 2, true); - ctx.closePath(); - ctx.fillStyle = color; - ctx.fill(); + ctx.arc(centerX, centerY, radius, startAngle, endAngle, false); + ctx.lineWidth = 16; + ctx.strokeStyle = 'black'; + ctx.stroke(); } - drawRing(256, 256, 128, 96, 'black'); + function updateCircle() { + const currentSeconds = new Date().getSeconds(); + drawRing(currentSeconds); + } + + updateCircle(); + setInterval(updateCircle, 1000); {% endblock %} \ No newline at end of file From 1e874c4ac84af92439524e551fd6035d85fb80a1 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 16 Nov 2025 12:43:10 +0100 Subject: [PATCH 146/296] feat: Add elements to clock Add rings for minutes and hours. --- source/screens/demo/examples/clock.liquid | 31 +++++++++++++++-------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid index 1ef49bc..054b628 100644 --- a/source/screens/demo/examples/clock.liquid +++ b/source/screens/demo/examples/clock.liquid @@ -20,26 +20,37 @@ tags: const canvas = document.getElementById('clock'); const ctx = canvas.getContext('2d'); - function drawRing(seconds) { + function drawCircle(seconds, minutes, hours) { const centerX = canvas.width / 2; const centerY = canvas.height / 2; const radius = 128; ctx.clearRect(0, 0, canvas.width, canvas.height); - const startAngle = -0.5 * Math.PI; // Start at the top - const endAngle = startAngle + (2 * Math.PI * (seconds / 60)); + function drawArc(value, maxValue, radius, strokeStyle) { + const startAngle = -0.5 * Math.PI; // Start at the top + const endAngle = startAngle + (2 * Math.PI * (value / maxValue)); - ctx.beginPath(); - ctx.arc(centerX, centerY, radius, startAngle, endAngle, false); - ctx.lineWidth = 16; - ctx.strokeStyle = 'black'; - ctx.stroke(); + ctx.beginPath(); + ctx.arc(centerX, centerY, radius, startAngle, endAngle, false); + ctx.lineWidth = 16; + ctx.strokeStyle = strokeStyle; + ctx.stroke(); + } + + drawArc(seconds, 60, radius, 'black'); + drawArc(minutes, 60, radius - 20, 'lightgrey'); + // drawArc(hours % 12, 12, radius - 40, 'white'); + drawArc(hours, 24, radius - 40, 'white'); } function updateCircle() { - const currentSeconds = new Date().getSeconds(); - drawRing(currentSeconds); + const currentDate = new Date(); + const currentSeconds = currentDate.getSeconds(); + const currentMinutes = currentDate.getMinutes(); + const currentHours = currentDate.getHours(); + + drawCircle(currentSeconds, currentMinutes, currentHours); } updateCircle(); From 847c4a9f6bad98445761846badd0635867730b6c Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 16 Nov 2025 12:57:43 +0100 Subject: [PATCH 147/296] feat: Update clock Add switch for 12/24-hour format. --- source/screens/demo/examples/clock.liquid | 17 +++++++++++++++-- source/style/modules/_clock.scss | 5 +++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid index 054b628..4e4c8de 100644 --- a/source/screens/demo/examples/clock.liquid +++ b/source/screens/demo/examples/clock.liquid @@ -10,6 +10,9 @@ tags: {% block body %}
    +

    + +

    {% endblock %} @@ -19,6 +22,12 @@ tags: // Page script const canvas = document.getElementById('clock'); const ctx = canvas.getContext('2d'); + let is24HourFormat = true; + + document.getElementById('toggleFormat').addEventListener('click', () => { + is24HourFormat = !is24HourFormat; + document.getElementById('toggleFormat').textContent = is24HourFormat ? '12-Stunden-Format' : '24-Stunden-Format'; + }); function drawCircle(seconds, minutes, hours) { const centerX = canvas.width / 2; @@ -40,8 +49,12 @@ tags: drawArc(seconds, 60, radius, 'black'); drawArc(minutes, 60, radius - 20, 'lightgrey'); - // drawArc(hours % 12, 12, radius - 40, 'white'); - drawArc(hours, 24, radius - 40, 'white'); + drawArc( + is24HourFormat ? hours : hours % 12, + is24HourFormat ? 24 : 12, + radius - 40, + 'white' + ); } function updateCircle() { diff --git a/source/style/modules/_clock.scss b/source/style/modules/_clock.scss index 74265da..537190f 100644 --- a/source/style/modules/_clock.scss +++ b/source/style/modules/_clock.scss @@ -4,6 +4,11 @@ main { @extend .sec_main_center; display: flex; + flex-flow: column nowrap; justify-content: center; } + + p { + text-align: center; + } } \ No newline at end of file From f257a44d890c3ba47c37f58c3b581b6cc6957ff2 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 16 Nov 2025 13:05:25 +0100 Subject: [PATCH 148/296] feat: Add day of week and month to clock --- source/screens/demo/examples/clock.liquid | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid index 4e4c8de..b90b555 100644 --- a/source/screens/demo/examples/clock.liquid +++ b/source/screens/demo/examples/clock.liquid @@ -29,7 +29,7 @@ tags: document.getElementById('toggleFormat').textContent = is24HourFormat ? '12-Stunden-Format' : '24-Stunden-Format'; }); - function drawCircle(seconds, minutes, hours) { + function drawCircle(seconds, minutes, hours, dayOfWeek, month) { const centerX = canvas.width / 2; const centerY = canvas.height / 2; const radius = 128; @@ -55,6 +55,8 @@ tags: radius - 40, 'white' ); + drawArc(dayOfWeek, 7, radius - 60, '#fad803'); + drawArc(month, 12, radius - 80, '#d30a51'); } function updateCircle() { @@ -62,8 +64,10 @@ tags: const currentSeconds = currentDate.getSeconds(); const currentMinutes = currentDate.getMinutes(); const currentHours = currentDate.getHours(); + const currentDayOfWeek = currentDate.getDay(); // Get current day of the week (0-6, where 0 is Sunday) + const currentMonth = currentDate.getMonth() + 1; // Get current month (0-11) - drawCircle(currentSeconds, currentMinutes, currentHours); + drawCircle(currentSeconds, currentMinutes, currentHours, currentDayOfWeek, currentMonth); } updateCircle(); From 9e560d7e62e959a146175ae32316f78d060cab84 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 16 Nov 2025 13:09:16 +0100 Subject: [PATCH 149/296] feat: More clock work Add function to change start of week. --- source/screens/demo/examples/clock.liquid | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid index b90b555..b0bccd8 100644 --- a/source/screens/demo/examples/clock.liquid +++ b/source/screens/demo/examples/clock.liquid @@ -64,12 +64,18 @@ tags: const currentSeconds = currentDate.getSeconds(); const currentMinutes = currentDate.getMinutes(); const currentHours = currentDate.getHours(); - const currentDayOfWeek = currentDate.getDay(); // Get current day of the week (0-6, where 0 is Sunday) + const currentDayOfWeek = getNumericWeekday(currentDate); const currentMonth = currentDate.getMonth() + 1; // Get current month (0-11) drawCircle(currentSeconds, currentMinutes, currentHours, currentDayOfWeek, currentMonth); } + // TODO: Parameter für Wochenstart ergänzen + function getNumericWeekday(date) { + const weekday = date.getDay(); // 0 (Sunday) to 6 (Saturday) + return (weekday === 0) ? 7 : weekday; + } + updateCircle(); setInterval(updateCircle, 1000); From 86fce27554b672e7f046615abf8601593f489ee2 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 16 Nov 2025 13:21:25 +0100 Subject: [PATCH 150/296] feat: More elements for clock and style change - Add day of month - Clock uses maximum canvas size --- source/screens/demo/examples/clock.liquid | 33 +++++++++++++++++------ 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid index b0bccd8..ad98667 100644 --- a/source/screens/demo/examples/clock.liquid +++ b/source/screens/demo/examples/clock.liquid @@ -29,10 +29,12 @@ tags: document.getElementById('toggleFormat').textContent = is24HourFormat ? '12-Stunden-Format' : '24-Stunden-Format'; }); - function drawCircle(seconds, minutes, hours, dayOfWeek, month) { + function drawCircle(seconds, minutes, hours, dayOfWeek, dayOfMonth, month, daysInCurrentMonth) { const centerX = canvas.width / 2; const centerY = canvas.height / 2; - const radius = 128; + const lineWidth = 16; + const lineGap = 8; + const maxSize = canvas.width / 2 - lineWidth; ctx.clearRect(0, 0, canvas.width, canvas.height); @@ -47,16 +49,17 @@ tags: ctx.stroke(); } - drawArc(seconds, 60, radius, 'black'); - drawArc(minutes, 60, radius - 20, 'lightgrey'); + drawArc(seconds, 60, maxSize, 'black'); + drawArc(minutes, 60, maxSize - lineWidth - lineGap, 'lightgrey'); drawArc( is24HourFormat ? hours : hours % 12, is24HourFormat ? 24 : 12, - radius - 40, + maxSize - (lineWidth + lineGap) * 2, 'white' ); - drawArc(dayOfWeek, 7, radius - 60, '#fad803'); - drawArc(month, 12, radius - 80, '#d30a51'); + drawArc(dayOfWeek, 7, maxSize - (lineWidth + lineGap) * 3, '#fad803'); + drawArc(dayOfMonth, daysInCurrentMonth, maxSize - (lineWidth + lineGap) * 4, '#d30a51'); + drawArc(month, 12, maxSize - (lineWidth + lineGap) * 5, '#273f8b'); } function updateCircle() { @@ -65,9 +68,19 @@ tags: const currentMinutes = currentDate.getMinutes(); const currentHours = currentDate.getHours(); const currentDayOfWeek = getNumericWeekday(currentDate); + const currentDayOfMonth = currentDate.getDate(); const currentMonth = currentDate.getMonth() + 1; // Get current month (0-11) + const daysInCurrentMonth = daysInMonth(currentMonth, currentDate.getFullYear()); - drawCircle(currentSeconds, currentMinutes, currentHours, currentDayOfWeek, currentMonth); + drawCircle( + currentSeconds, + currentMinutes, + currentHours, + currentDayOfWeek, + currentDayOfMonth, + currentMonth, + daysInCurrentMonth + ); } // TODO: Parameter für Wochenstart ergänzen @@ -76,6 +89,10 @@ tags: return (weekday === 0) ? 7 : weekday; } + function daysInMonth(month, year) { + return new Date(year, month, 0).getDate(); + } + updateCircle(); setInterval(updateCircle, 1000); From 1a1badc78679657d61928fd87a939ea2ce1af8d5 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 16 Nov 2025 13:27:46 +0100 Subject: [PATCH 151/296] feat: Update clock to use color from CSS --- source/screens/demo/examples/clock.liquid | 9 ++++++--- source/style/modules/_clock.scss | 12 ++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid index ad98667..3a36cbd 100644 --- a/source/screens/demo/examples/clock.liquid +++ b/source/screens/demo/examples/clock.liquid @@ -23,6 +23,9 @@ tags: const canvas = document.getElementById('clock'); const ctx = canvas.getContext('2d'); let is24HourFormat = true; + const colorDayOfWeek = getComputedStyle(document.documentElement).getPropertyValue('--clock-color-yellow').trim(); + const colorDayOfMonth = getComputedStyle(document.documentElement).getPropertyValue('--clock-color-orange').trim(); + const colorMonth = getComputedStyle(document.documentElement).getPropertyValue('--clock-color-pink').trim(); document.getElementById('toggleFormat').addEventListener('click', () => { is24HourFormat = !is24HourFormat; @@ -57,9 +60,9 @@ tags: maxSize - (lineWidth + lineGap) * 2, 'white' ); - drawArc(dayOfWeek, 7, maxSize - (lineWidth + lineGap) * 3, '#fad803'); - drawArc(dayOfMonth, daysInCurrentMonth, maxSize - (lineWidth + lineGap) * 4, '#d30a51'); - drawArc(month, 12, maxSize - (lineWidth + lineGap) * 5, '#273f8b'); + drawArc(dayOfWeek, 7, maxSize - (lineWidth + lineGap) * 3, colorDayOfWeek); + drawArc(dayOfMonth, daysInCurrentMonth, maxSize - (lineWidth + lineGap) * 4, colorDayOfMonth); + drawArc(month, 12, maxSize - (lineWidth + lineGap) * 5, colorMonth); } function updateCircle() { diff --git a/source/style/modules/_clock.scss b/source/style/modules/_clock.scss index 537190f..17a1f88 100644 --- a/source/style/modules/_clock.scss +++ b/source/style/modules/_clock.scss @@ -1,5 +1,17 @@ @use "../../hippie-style/hippie"; +:root { + --clock-color-yellow: rgb(250, 216, 3); + --clock-color-orange: rgb(242, 175, 19); + --clock-color-pink: rgb(211, 10, 81); + --clock-color-purple: rgb(142, 31, 104); + --clock-color-blue: rgb(39, 63, 139); + --clock-color-pblue: rgb(60, 87, 154); + --clock-color-lblue: rgb(183, 224, 240); + --clock-color-lcyan: rgb(107, 199, 217); + --clock-color-cyan: rgb(82, 190, 209); +} + .body_clock { main { @extend .sec_main_center; From 15bfbcc97bf4a11a554d20bb3b0f407f73fe42bd Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 23 Nov 2025 14:17:24 +0100 Subject: [PATCH 152/296] feat: Update clock Display full circle when seconds or minutes turn to 0. --- source/screens/demo/examples/clock.liquid | 24 ++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid index 3a36cbd..da8f5a4 100644 --- a/source/screens/demo/examples/clock.liquid +++ b/source/screens/demo/examples/clock.liquid @@ -32,7 +32,7 @@ tags: document.getElementById('toggleFormat').textContent = is24HourFormat ? '12-Stunden-Format' : '24-Stunden-Format'; }); - function drawCircle(seconds, minutes, hours, dayOfWeek, dayOfMonth, month, daysInCurrentMonth) { + function drawRings(seconds, minutes, hours, dayOfWeek, dayOfMonth, month, daysInCurrentMonth) { const centerX = canvas.width / 2; const centerY = canvas.height / 2; const lineWidth = 16; @@ -52,8 +52,18 @@ tags: ctx.stroke(); } - drawArc(seconds, 60, maxSize, 'black'); - drawArc(minutes, 60, maxSize - lineWidth - lineGap, 'lightgrey'); + drawArc( + (seconds === 0) ? 60 : seconds, + 60, + maxSize, + 'black' + ); + drawArc( + (minutes === 0) ? 60 : minutes, + 60, + maxSize - lineWidth - lineGap, + 'lightgrey' + ); drawArc( is24HourFormat ? hours : hours % 12, is24HourFormat ? 24 : 12, @@ -65,7 +75,7 @@ tags: drawArc(month, 12, maxSize - (lineWidth + lineGap) * 5, colorMonth); } - function updateCircle() { + function updateRings() { const currentDate = new Date(); const currentSeconds = currentDate.getSeconds(); const currentMinutes = currentDate.getMinutes(); @@ -75,7 +85,7 @@ tags: const currentMonth = currentDate.getMonth() + 1; // Get current month (0-11) const daysInCurrentMonth = daysInMonth(currentMonth, currentDate.getFullYear()); - drawCircle( + drawRings( currentSeconds, currentMinutes, currentHours, @@ -96,7 +106,7 @@ tags: return new Date(year, month, 0).getDate(); } - updateCircle(); - setInterval(updateCircle, 1000); + updateRings(); + setInterval(updateRings, 1000); {% endblock %} \ No newline at end of file From 29c705f272cb86d1bea9c52ecd8cdf004932fb3e Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 23 Nov 2025 14:17:46 +0100 Subject: [PATCH 153/296] feat: Add 10print screen --- source/screens/demo/examples/10print.liquid | 73 +++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 source/screens/demo/examples/10print.liquid diff --git a/source/screens/demo/examples/10print.liquid b/source/screens/demo/examples/10print.liquid new file mode 100644 index 0000000..9f2778b --- /dev/null +++ b/source/screens/demo/examples/10print.liquid @@ -0,0 +1,73 @@ +--- +title: 10print +tags: +- demoExample +--- +{% assign pageBase = "../../" -%} +{% layout "hippie/full.liquid" %} + +{% block head %} +{{ block.super -}} + +{% endblock %} + +{% block body %} + +{% endblock %} + +{% block script %} +{{ block.super -}} + +{% endblock %} \ No newline at end of file From 3168d6cb7eb1eb8959528c3d40aa88a5120e6992 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 23 Nov 2025 14:18:20 +0100 Subject: [PATCH 154/296] feat: Add simple blog structure --- source/screens/demo/examples/blog.njk | 51 ++++++++++++++++++++ source/screens/demo/examples/blog/article.md | 11 +++++ 2 files changed, 62 insertions(+) create mode 100644 source/screens/demo/examples/blog.njk create mode 100644 source/screens/demo/examples/blog/article.md diff --git a/source/screens/demo/examples/blog.njk b/source/screens/demo/examples/blog.njk new file mode 100644 index 0000000..0ffe2e8 --- /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 new file mode 100644 index 0000000..0200c08 --- /dev/null +++ b/source/screens/demo/examples/blog/article.md @@ -0,0 +1,11 @@ +--- +tags: + - blog + - article +title: "Artikel" +releaseDate: JJJJ +description: Text +--- +# Titel + +Inhalt From eea7a08e3a6b183318e34cedaf226b61871c0680 Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 1 Dec 2025 17:10:58 +0100 Subject: [PATCH 155/296] chore: Repo maintenance - Change submodule hippie-style to development branch by default - Change hippie-script dependency to https instead of git, because of an error with npm install - Audit dependencies with npm audit fix --- .gitmodules | 2 +- package-lock.json | 127 +++++++++++++++++++++++++++------------------- package.json | 2 +- 3 files changed, 77 insertions(+), 54 deletions(-) diff --git a/.gitmodules b/.gitmodules index 75c5b90..068fd29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "source/style/hippie-style"] path = source/style/hippie-style url = https://quelltext.interaktionsweise.de/interaktionsweise/hippie-style.git - branch = main + branch = development diff --git a/package-lock.json b/package-lock.json index 620aac8..1cb917f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@11ty/eleventy": "^2.0.1", "bootstrap-icons": "^1.13.1", - "hippie-script": "git+ssh://sthag@quelltext.interaktionsweise.de/interaktionsweise/hippie-script.git", + "hippie-script": "git+https://quelltext.interaktionsweise.de/interaktionsweise/hippie-script.git", "jquery": "^3.7.1", "sass": "^1.93.0" }, @@ -643,9 +643,10 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, "node_modules/assert-never": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/assert-never/-/assert-never-1.2.1.tgz", - "integrity": "sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/assert-never/-/assert-never-1.4.0.tgz", + "integrity": "sha512-5oJg84os6NMQNl27T9LnZkvvqzvAnHu03ShCnoj6bsJwS7L8AO4lf+C/XjK/nvzEqQB744moC6V128RucQd1jA==", + "license": "MIT" }, "node_modules/async": { "version": "3.2.5", @@ -656,6 +657,7 @@ "version": "3.0.0-canary-5", "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz", "integrity": "sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==", + "license": "MIT", "dependencies": { "@babel/types": "^7.9.6" }, @@ -732,20 +734,22 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -854,9 +858,10 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -933,7 +938,8 @@ "node_modules/doctypes": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", - "integrity": "sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==" + "integrity": "sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==", + "license": "MIT" }, "node_modules/dom-serializer": { "version": "1.4.1", @@ -1000,9 +1006,10 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/ejs": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", - "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "license": "Apache-2.0", "dependencies": { "jake": "^10.8.5" }, @@ -1133,9 +1140,10 @@ } }, "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -1152,9 +1160,10 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1389,7 +1398,7 @@ }, "node_modules/hippie-script": { "version": "1.2.1", - "resolved": "git+ssh://sthag@quelltext.interaktionsweise.de/interaktionsweise/hippie-script.git#dfc13e61586fbf466a7bbdb5667c5b02f41abd44", + "resolved": "git+https://quelltext.interaktionsweise.de/interaktionsweise/hippie-script.git#dfc13e61586fbf466a7bbdb5667c5b02f41abd44", "license": "MIT" }, "node_modules/htmlparser2": { @@ -1536,6 +1545,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -1599,12 +1609,14 @@ "node_modules/js-stringify": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", - "integrity": "sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==" + "integrity": "sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==", + "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -1777,11 +1789,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -2002,9 +2015,10 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-to-regexp": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", - "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "license": "MIT" }, "node_modules/picomatch": { "version": "2.3.1", @@ -2103,11 +2117,12 @@ "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==" }, "node_modules/pug": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/pug/-/pug-3.0.2.tgz", - "integrity": "sha512-bp0I/hiK1D1vChHh6EfDxtndHji55XP/ZJKwsRqrz6lRia6ZC2OZbdAymlxdVFwd1L70ebrVJw4/eZ79skrIaw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pug/-/pug-3.0.3.tgz", + "integrity": "sha512-uBi6kmc9f3SZ3PXxqcHiUZLmIXgfgWooKWXcwSGwQd2Zi5Rb0bT14+8CJjJgI8AB+nndLaNgHGrcc6bPIB665g==", + "license": "MIT", "dependencies": { - "pug-code-gen": "^3.0.2", + "pug-code-gen": "^3.0.3", "pug-filters": "^4.0.0", "pug-lexer": "^5.0.1", "pug-linker": "^4.0.0", @@ -2121,6 +2136,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-3.0.0.tgz", "integrity": "sha512-azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA==", + "license": "MIT", "dependencies": { "constantinople": "^4.0.1", "js-stringify": "^1.0.2", @@ -2128,24 +2144,26 @@ } }, "node_modules/pug-code-gen": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.2.tgz", - "integrity": "sha512-nJMhW16MbiGRiyR4miDTQMRWDgKplnHyeLvioEJYbk1RsPI3FuA3saEP8uwnTb2nTJEKBU90NFVWJBk4OU5qyg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.3.tgz", + "integrity": "sha512-cYQg0JW0w32Ux+XTeZnBEeuWrAY7/HNE6TWnhiHGnnRYlCgyAUPoyh9KzCMa9WhcJlJ1AtQqpEYHc+vbCzA+Aw==", + "license": "MIT", "dependencies": { "constantinople": "^4.0.1", "doctypes": "^1.1.0", "js-stringify": "^1.0.2", "pug-attrs": "^3.0.0", - "pug-error": "^2.0.0", - "pug-runtime": "^3.0.0", + "pug-error": "^2.1.0", + "pug-runtime": "^3.0.1", "void-elements": "^3.1.0", "with": "^7.0.0" } }, "node_modules/pug-error": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-2.0.0.tgz", - "integrity": "sha512-sjiUsi9M4RAGHktC1drQfCr5C5eriu24Lfbt4s+7SykztEOwVZtbFk1RRq0tzLxcMxMYTBR+zMQaG07J/btayQ==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-2.1.0.tgz", + "integrity": "sha512-lv7sU9e5Jk8IeUheHata6/UThZ7RK2jnaaNztxfPYUY+VxZyk/ePVaNZ/vwmH8WqGvDz3LrNYt/+gA55NDg6Pg==", + "license": "MIT" }, "node_modules/pug-filters": { "version": "4.0.0", @@ -2199,7 +2217,8 @@ "node_modules/pug-runtime": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-3.0.1.tgz", - "integrity": "sha512-L50zbvrQ35TkpHwv0G6aLSuueDRwc/97XdY8kL3tOT0FmhgG7UypU3VztfV/LATAvmUfYi4wNxSajhSAeNN+Kg==" + "integrity": "sha512-L50zbvrQ35TkpHwv0G6aLSuueDRwc/97XdY8kL3tOT0FmhgG7UypU3VztfV/LATAvmUfYi4wNxSajhSAeNN+Kg==", + "license": "MIT" }, "node_modules/pug-strip-comments": { "version": "2.0.0", @@ -2530,6 +2549,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -2571,6 +2591,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2593,6 +2614,7 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz", "integrity": "sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==", + "license": "MIT", "dependencies": { "@babel/parser": "^7.9.6", "@babel/types": "^7.9.6", @@ -2614,9 +2636,10 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index 3da5d70..49351cc 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dependencies": { "@11ty/eleventy": "^2.0.1", "bootstrap-icons": "^1.13.1", - "hippie-script": "git+ssh://sthag@quelltext.interaktionsweise.de/interaktionsweise/hippie-script.git", + "hippie-script": "git+https://quelltext.interaktionsweise.de/interaktionsweise/hippie-script.git", "jquery": "^3.7.1", "sass": "^1.93.0" } From fe8008c5b535166cbbb91a8772a52cea02b6e551 Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 1 Dec 2025 17:12:05 +0100 Subject: [PATCH 156/296] fix: Path to hippie-style --- source/style/modules/_clock.scss | 2 +- source/style/modules/_start.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/style/modules/_clock.scss b/source/style/modules/_clock.scss index 17a1f88..fe361b7 100644 --- a/source/style/modules/_clock.scss +++ b/source/style/modules/_clock.scss @@ -1,4 +1,4 @@ -@use "../../hippie-style/hippie"; +@use "../hippie-style/hippie"; :root { --clock-color-yellow: rgb(250, 216, 3); diff --git a/source/style/modules/_start.scss b/source/style/modules/_start.scss index 7d790a3..031f7f7 100644 --- a/source/style/modules/_start.scss +++ b/source/style/modules/_start.scss @@ -1,4 +1,4 @@ -@use "../../hippie-style/hippie"; +@use "../hippie-style/hippie"; .body_start { main { From 9696442a9159a4231c986f51d3805cf692a869fd Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 9 Feb 2026 19:09:02 +0100 Subject: [PATCH 157/296] feat: Remove cases that cannot happen Optimize HippieTaskBar by removing cases that cannot happen. --- source/code/windows.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/code/windows.js b/source/code/windows.js index c7ab166..32a3484 100644 --- a/source/code/windows.js +++ b/source/code/windows.js @@ -49,8 +49,6 @@ class HippieTaskBar { onMouseMove(event) { if (this.isDragging) { - if (!this.isDragging) return; - const closestEdge = getClosestEdge(this.placeholder); const borderRadius = '4px'; const attributes = { @@ -121,7 +119,6 @@ class HippieTaskBar { if (event.target === this.placeholder) { console.debug('Drag mode disabled'); - if (!this.isDragging) return; this.isDragging = false; this.snapToEdges(); From 7912b002a26347a20a28fb322d13d4ddccda8d6d Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 9 Feb 2026 21:08:30 +0100 Subject: [PATCH 158/296] feat: Change edge detection for HippieTaskBar - Add position to options - New function for edge detection according to mouse position - set and use options.position --- .jshintrc | 3 ++- source/code/hippie/app.js | 27 ++++++++++++++++++++++----- source/code/windows.js | 12 +++++------- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/.jshintrc b/.jshintrc index cfc5480..98b8bf3 100644 --- a/.jshintrc +++ b/.jshintrc @@ -95,7 +95,8 @@ "TimeDisplay": true, "DateDisplay": true, "checkButtonAndTarget": true, - "getClosestEdge": true, + "getClosestEdgeToElement": true, + "getClosestEdgeToMouse": true, "centerElementUnderCursor": true, "setAttributesAccordingToPosition": true, "HippieTaskBar": true diff --git a/source/code/hippie/app.js b/source/code/hippie/app.js index 05b09b3..c93aa7a 100644 --- a/source/code/hippie/app.js +++ b/source/code/hippie/app.js @@ -346,20 +346,37 @@ function checkButtonAndTarget(event, element, button = 0) { ); } -function getClosestEdge(element) { +function getClosestEdgeToElement(element) { + 'use strict'; + const rect = element.getBoundingClientRect(); - const windowWidth = window.innerWidth; - const windowHeight = window.innerHeight; const distances = { top: rect.top, - right: windowWidth - rect.right, - bottom: windowHeight - rect.bottom, + right: window.innerWidth - rect.right, + bottom: window.innerHeight - rect.bottom, left: rect.left }; return Object.keys(distances).reduce((a, b) => distances[a] < distances[b] ? a : b); } +function getClosestEdgeToMouse(event) { + 'use strict'; + + const mouseX = event.clientX; + const mouseY = event.clientY; + const distances = { + left: mouseX, + right: window.innerWidth - mouseX, + top: mouseY, + bottom: window.innerHeight - mouseY + }; + + return Object.keys(distances).reduce((a, b) => + distances[a] < distances[b] ? a : b + ); +} + function centerElementUnderCursor(event, element) { const offsetX = element.getBoundingClientRect().width / 2; const offsetY = element.getBoundingClientRect().height / 2; diff --git a/source/code/windows.js b/source/code/windows.js index 32a3484..8a115a9 100644 --- a/source/code/windows.js +++ b/source/code/windows.js @@ -8,6 +8,7 @@ class HippieTaskBar { // TODO: Erweitern auf allgemeine Möglichkeiten und dann aus JSON-Datei laden this.options = options || { direction: 0, + position: 'bottom', date: { year: 'numeric', month: '2-digit', @@ -30,7 +31,7 @@ class HippieTaskBar { this.element.querySelector('.clock').appendChild(dateElement); this.date = new DateDisplay(dateElement, this.options.date); - this.setOptions('bottom'); + this.setOptions(this.options.position); } onMouseDown(event) { @@ -49,7 +50,7 @@ class HippieTaskBar { onMouseMove(event) { if (this.isDragging) { - const closestEdge = getClosestEdge(this.placeholder); + this.options.position = getClosestEdgeToMouse(event); const borderRadius = '4px'; const attributes = { top: { @@ -110,7 +111,7 @@ class HippieTaskBar { } }; - setAttributesAccordingToPosition(this.placeholder, closestEdge, attributes); + setAttributesAccordingToPosition(this.placeholder, this.options.position, attributes); centerElementUnderCursor(event, this.placeholder); } } @@ -136,11 +137,8 @@ class HippieTaskBar { this.element.style.display = ''; } - // TODO: Prüfung auf Ziel auslagern und schon bei Mausbewegung verfügbar machen snapToEdges() { - const closestEdge = getClosestEdge(this.placeholder); - - this.setOptions(closestEdge); + this.setOptions(this.options.position); this.date.changeFormat(this.options.date, this.options.direction); } From 9ce027285cf62c184332038e9ca543867b0f990b Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 9 Feb 2026 21:17:53 +0100 Subject: [PATCH 159/296] chore: Reformat jshint stuff - Remove comments from jshint - Replace " with ' - Replace var with const --- .jshintrc | 161 +++++++++++++++++--------------------- source/code/hippie/app.js | 67 ++++++++-------- 2 files changed, 106 insertions(+), 122 deletions(-) diff --git a/.jshintrc b/.jshintrc index 98b8bf3..7fe438c 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,93 +1,74 @@ { - // JSHint Default Configuration File (as on JSHint website) - // See http://jshint.com/docs/ for more details - - "maxerr" : 50, // {int} Maximum error before stopping - - // Enforcing - "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) - "camelcase" : false, // true: Identifiers must be in camelCase - "curly" : false, // true: Require {} for every new block or scope - "eqeqeq" : true, // true: Require triple equals (===) for comparison - "forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty() - "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc. - "immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` - "latedef" : true, // true: Require variables/functions to be defined before being used - "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()` - "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` - "noempty" : true, // true: Prohibit use of empty blocks - "nonbsp" : true, // true: Prohibit `non-breaking whitespace` characters. - "nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment) - "plusplus" : false, // true: Prohibit use of `++` and `--` - "quotmark" : true, // Quotation mark consistency: - // false : do nothing (default) - // true : ensure whatever is used is consistent - // "single" : require single quotes - // "double" : require double quotes - "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) - "unused" : true, // Unused variables: - // true : all variables, last function parameter - // "vars" : all variables only - // "strict" : all variables, all function parameters - "strict" : true, // true: Requires all functions run in ES5 Strict Mode - "maxparams" : false, // {int} Max number of formal params allowed per function - "maxdepth" : false, // {int} Max depth of nested blocks (within functions) - "maxstatements" : false, // {int} Max number statements per function - "maxcomplexity" : false, // {int} Max cyclomatic complexity per function - "maxlen" : false, // {int} Max number of characters per line - "varstmt" : false, // true: Disallow any var statements. Only `let` and `const` are allowed. - - // Relaxing - "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons) - "boss" : false, // true: Tolerate assignments where comparisons would be expected - "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. - "eqnull" : false, // true: Tolerate use of `== null` - "esversion" : 9, // {int} Specify the ECMAScript version to which the code must adhere. - "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) - // (ex: `for each`, multiple try/catch, function expression…) - "evil" : false, // true: Tolerate use of `eval` and `new Function()` - "expr" : false, // true: Tolerate `ExpressionStatement` as Programs - "funcscope" : false, // true: Tolerate defining variables inside control statements - "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') - "iterator" : false, // true: Tolerate using the `__iterator__` property - "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block - "laxbreak" : false, // true: Tolerate possibly unsafe line breakings - "laxcomma" : false, // true: Tolerate comma-first style coding - "loopfunc" : false, // true: Tolerate functions being defined in loops - "multistr" : false, // true: Tolerate multi-line strings - "noyield" : false, // true: Tolerate generator functions with no yield statement in them. - "notypeof" : false, // true: Tolerate invalid typeof operator values - "proto" : false, // true: Tolerate using the `__proto__` property - "scripturl" : false, // true: Tolerate script-targeted URLs - "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` - "sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation - "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;` - "validthis" : false, // true: Tolerate using this in a non-constructor function - - // Environments - "browser" : true, // Web Browser (window, document, etc) - "browserify" : false, // Browserify (node.js code in the browser) - "couch" : false, // CouchDB - "devel" : true, // Development/debugging (alert, confirm, etc) - "dojo" : false, // Dojo Toolkit - "jasmine" : false, // Jasmine - "jquery" : true, // jQuery - "mocha" : true, // Mocha - "mootools" : false, // MooTools - "node" : false, // Node.js - "nonstandard" : false, // Widely adopted globals (escape, unescape, etc) - "phantom" : false, // PhantomJS - "prototypejs" : false, // Prototype and Scriptaculous - "qunit" : false, // QUnit - "rhino" : false, // Rhino - "shelljs" : false, // ShellJS - "typed" : false, // Globals for typed array constructions - "worker" : false, // Web Workers - "wsh" : false, // Windows Scripting Host - "yui" : false, // Yahoo User Interface - - // Custom globals - "globals" : { // additional predefined global variables + "maxerr": 50, + "bitwise": true, + "camelcase": false, + "curly": false, + "eqeqeq": true, + "forin": true, + "freeze": true, + "immed": false, + "latedef": true, + "newcap": true, + "noarg": true, + "noempty": true, + "nonbsp": true, + "nonew": false, + "plusplus": false, + "quotmark": true, + "undef": true, + "unused": true, + "strict": true, + "maxparams": false, + "maxdepth": false, + "maxstatements": false, + "maxcomplexity": false, + "maxlen": false, + "varstmt": false, + "asi": false, + "boss": false, + "debug": false, + "eqnull": false, + "esversion": 9, + "moz": false, + "evil": false, + "expr": false, + "funcscope": false, + "globalstrict": false, + "iterator": false, + "lastsemic": false, + "laxbreak": false, + "laxcomma": false, + "loopfunc": false, + "multistr": false, + "noyield": false, + "notypeof": false, + "proto": false, + "scripturl": false, + "shadow": false, + "sub": false, + "supernew": false, + "validthis": false, + "browser": true, + "browserify": false, + "couch": false, + "devel": true, + "dojo": false, + "jasmine": false, + "jquery": true, + "mocha": true, + "mootools": false, + "node": false, + "nonstandard": false, + "phantom": false, + "prototypejs": false, + "qunit": false, + "rhino": false, + "shelljs": false, + "typed": false, + "worker": false, + "wsh": false, + "yui": false, + "globals": { "debugOn": true, "hippie": true, "viewHover": true, @@ -100,5 +81,5 @@ "centerElementUnderCursor": true, "setAttributesAccordingToPosition": true, "HippieTaskBar": true - } + } } diff --git a/source/code/hippie/app.js b/source/code/hippie/app.js index c93aa7a..e1b1634 100644 --- a/source/code/hippie/app.js +++ b/source/code/hippie/app.js @@ -1,5 +1,5 @@ // TODO: Inhalte angleichen nach Zusammenfassung von app.js und function.js. -// Bennung und Beschreibungen verbessern. +// Benennung und Beschreibungen verbessern. // This is called everytime function setup() { @@ -56,7 +56,7 @@ function HippieScroll($tp, $dn) { }); $dn.click(function (event) { event.preventDefault(); - var pos = Math.max(hippie.screen.dh, hippie.body.h) - hippie.screen.vh; + const pos = Math.max(hippie.screen.dh, hippie.body.h) - hippie.screen.vh; $('html').scrollTop(pos); // document.documentElement.scrollTop = pos; console.info('Scrolled down to', pos); @@ -91,7 +91,7 @@ function HippieMeta($ma, $pp) { let metaOn = false; $ma.click(function () { - var $wrap, $pop; + const $wrap, $pop; // if (metaOn !== true) { if (!metaOn) { @@ -162,23 +162,25 @@ function HippieMeta($ma, $pp) { // Sets the href attribute to mailto: with given information function composeMail(tag, name, prov, suffix, text, topic) { - let trigger = tag.indexOf("."); + 'use strict'; + + let trigger = tag.indexOf('.'); let mailString = name + '@' + prov + '.' + suffix; - let textString = mailString.replace(/@/g, "(at)"); - let descString = "Nachricht an " + mailString; + let textString = mailString.replace(/@/g, '(at)'); + let descString = 'Nachricht an ' + mailString; if (!text) { text = mailString; - } else if (text === "at") { + } else if (text === 'at') { text = textString; - } else if (text === "to") { + } else if (text === 'to') { text = descString; } if (topic) { - topic = "?subject=" + topic; + topic = '?subject=' + topic; } else { - topic = ""; + topic = ''; } if (trigger === -1) { @@ -186,7 +188,7 @@ function composeMail(tag, name, prov, suffix, text, topic) { const elContent = el.innerHTML; el.innerHTML = elContent + text; - el.setAttribute("href", "mailto:" + mailString + topic); + el.setAttribute('href', 'mailto:' + mailString + topic); } else { const els = document.getElementsByClassName(tag.slice(1)); @@ -194,7 +196,7 @@ function composeMail(tag, name, prov, suffix, text, topic) { const elContent = el.innerHTML; el.innerHTML = elContent + text; - el.setAttribute("href", "mailto:" + mailString + topic); + el.setAttribute('href', 'mailto:' + mailString + topic); } } } @@ -378,6 +380,8 @@ function getClosestEdgeToMouse(event) { } function centerElementUnderCursor(event, element) { + 'use strict'; + const offsetX = element.getBoundingClientRect().width / 2; const offsetY = element.getBoundingClientRect().height / 2; const x = event.clientX - offsetX; @@ -388,6 +392,8 @@ function centerElementUnderCursor(event, element) { } function setAttributesAccordingToPosition(element, position, attributes) { + 'use strict'; + element.classList.remove(...Object.values(attributes).map(pos => pos.className)); Object.keys(attributes[position].styles).forEach(key => { element.style[key] = ''; @@ -457,17 +463,15 @@ Clock.prototype.formatDigits = function (val) { return val; }; -var floor = Math.floor; - function ongoing() { var now = new Date(); var w = Math.floor(now.getDay()); - var D = new Array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"); + var D = ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag']; var DNumb = Math.floor(now.getDate()); var MNumb = Math.floor(now.getMonth()); - var M = new Array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"); + var M = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'MaiOktober', 'November', 'Dezember']; var y = Math.floor(now.getYear()); if (y < 999) y += 1900; @@ -518,23 +522,22 @@ function ongoing() { var moonPosX = 0; var moonPosY = 0; - var sun = $("#sun").css({ - "left": (s / 60) * travelWidth, - "top": (m / 60) * travelHeight + var sun = $('#sun').css({ + 'left': (s / 60) * travelWidth, + 'top': (m / 60) * travelHeight }); - $("#day").text(D[w]); - $("#dayNumb").text(DNumb); - $("#month").text(M[MNumb]); - $("#year").text(y); - $("#time").text('' + zeroFill(h, 2) + ':' + zeroFill(m, 2) + ':' + zeroFill(s, 2)); - - $("#julian").text(jd.toFixed(6)); - //$("#star").text(stH + ':' + stM + ':' + stS); - $("#star").text(stH + ':' + stM); - $("#star1").text(stGMT); - $("#star2").text(stGMT2); + $('#day').text(D[w]); + $('#dayNumb').text(DNumb); + $('#month').text(M[MNumb]); + $('#year').text(y); + $('#time').text('' + zeroFill(h, 2) + ':' + zeroFill(m, 2) + ':' + zeroFill(s, 2)); + $('#julian').text(jd.toFixed(6)); + //$('#star').text(stH + ':' + stM + ':' + stS); + $('#star').text(stH + ':' + stM); + $('#star1').text(stGMT); + $('#star2').text(stGMT2); } function zeroFill(number, width) { @@ -542,7 +545,7 @@ function zeroFill(number, width) { if (width > 0) { return new Array(width + (/\./.test(number) ? 2 : 1)).join('0') + number; } - return number + ""; // always return a string + return number + ''; // always return a string } //Länge der Balken im Diagram berechnen @@ -562,7 +565,7 @@ String.prototype.transform = function () { } //Array Element erweitern Array.prototype.arrayAdd = function () { - return eval(this.join("+")); + return eval(this.join('+')); } //Speicherplatz in Prozent berechnen From d6827e6dfd1e3f0c068ec4958b495614dc05fbed Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 9 Feb 2026 21:29:00 +0100 Subject: [PATCH 160/296] fix: const to let --- source/code/hippie/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/code/hippie/app.js b/source/code/hippie/app.js index e1b1634..e5a26b8 100644 --- a/source/code/hippie/app.js +++ b/source/code/hippie/app.js @@ -91,7 +91,7 @@ function HippieMeta($ma, $pp) { let metaOn = false; $ma.click(function () { - const $wrap, $pop; + let $wrap, $pop; // if (metaOn !== true) { if (!metaOn) { From 148f4e0a21cb6e5576ecafaa3d381ed5021e5855 Mon Sep 17 00:00:00 2001 From: sthag Date: Thu, 12 Feb 2026 18:36:06 +0100 Subject: [PATCH 161/296] chore: Update jshint Remove unused options and environments. --- .jshintrc | 73 ++++++++----------------------------------------------- 1 file changed, 10 insertions(+), 63 deletions(-) diff --git a/.jshintrc b/.jshintrc index 7fe438c..29388b2 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,78 +1,25 @@ { - "maxerr": 50, "bitwise": true, - "camelcase": false, - "curly": false, + "browser": true, + "curly": true, + "devel": true, "eqeqeq": true, + "esversion": 9, "forin": true, "freeze": true, - "immed": false, - "latedef": true, - "newcap": true, + "jquery": true, + "maxerr": 50, "noarg": true, "noempty": true, - "nonbsp": true, - "nonew": false, - "plusplus": false, - "quotmark": true, - "undef": true, - "unused": true, "strict": true, - "maxparams": false, - "maxdepth": false, - "maxstatements": false, - "maxcomplexity": false, - "maxlen": false, - "varstmt": false, - "asi": false, - "boss": false, - "debug": false, - "eqnull": false, - "esversion": 9, - "moz": false, - "evil": false, - "expr": false, - "funcscope": false, - "globalstrict": false, - "iterator": false, - "lastsemic": false, - "laxbreak": false, - "laxcomma": false, - "loopfunc": false, - "multistr": false, - "noyield": false, - "notypeof": false, - "proto": false, - "scripturl": false, - "shadow": false, - "sub": false, - "supernew": false, - "validthis": false, - "browser": true, - "browserify": false, - "couch": false, - "devel": true, - "dojo": false, - "jasmine": false, - "jquery": true, - "mocha": true, - "mootools": false, - "node": false, - "nonstandard": false, - "phantom": false, - "prototypejs": false, - "qunit": false, - "rhino": false, - "shelljs": false, - "typed": false, - "worker": false, - "wsh": false, - "yui": false, + "undef": true, + "unused": false, "globals": { - "debugOn": true, + "HIPPIE": false, "hippie": true, "viewHover": true, "basicEase": true, + "debugOn": true, "TimeDisplay": true, "DateDisplay": true, "checkButtonAndTarget": true, From ddbd406fc875c39db6711fb0aded668216864d8e Mon Sep 17 00:00:00 2001 From: sthag Date: Fri, 13 Feb 2026 11:27:44 +0100 Subject: [PATCH 162/296] feat: Move function to app scope - Move randomIntFrom() to app.js - Add global entry to jshint configuration --- .jshintrc | 2 ++ source/code/hippie/app.js | 18 ++++++++++++++++++ source/code/intro.js | 18 ------------------ 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.jshintrc b/.jshintrc index 29388b2..cd80937 100644 --- a/.jshintrc +++ b/.jshintrc @@ -27,6 +27,8 @@ "getClosestEdgeToMouse": true, "centerElementUnderCursor": true, "setAttributesAccordingToPosition": true, + "randomIntFrom": false, + "replaceLineBreaks": false, "HippieTaskBar": true } } diff --git a/source/code/hippie/app.js b/source/code/hippie/app.js index e5a26b8..9fa1e9d 100644 --- a/source/code/hippie/app.js +++ b/source/code/hippie/app.js @@ -405,6 +405,24 @@ function setAttributesAccordingToPosition(element, position, attributes) { }); } +/** + * Gibt eine Zahl zwischen und aus. + * Die Werte und sind dabei mit eingeschlossen. + * Mit kann der Exponent für eine 10er-Teilung angegeben werden. + * + * @param {number} min + * @param {number} max + * @param {number} pos + * @returns {number} + */ +function randomIntFrom(min, max, pos = 0) { + pos = Math.pow(10, pos); + min = Math.ceil(min); + max = Math.floor(max); + + return Math.floor((Math.random() * (max - min + 1) + min) / pos) * pos; +} + // CONCEPTS // NOTE: Benutzt private Zuweisungen diff --git a/source/code/intro.js b/source/code/intro.js index 341df5e..bff5a87 100644 --- a/source/code/intro.js +++ b/source/code/intro.js @@ -272,24 +272,6 @@ function loadCore() { }); } -/** - * Gibt eine Zahl zwischen und aus. - * Die Werte und sind dabei mit eingeschlossen. - * Mit kann der Exponent für eine 10er-Teilung angegeben werden. - * - * @param {number} min - * @param {number} max - * @param {number} pos - * @returns {number} - */ -function randomIntFrom(min, max, pos = 0) { - pos = Math.pow(10, pos); - min = Math.ceil(min); - max = Math.floor(max); - - return Math.floor((Math.random() * (max - min + 1) + min) / pos) * pos; -} - /** * Erstellt Kontext für hint-Objekt und ermöglicht das Entfernen des Ereignis. */ From 1b3a320b17dcfca3510681246d01735d58651032 Mon Sep 17 00:00:00 2001 From: sthag Date: Fri, 13 Feb 2026 11:39:52 +0100 Subject: [PATCH 163/296] feat: New table screen for ui - Add table screen to ui examples - Display table with placeholder content - Add global function replaceLineBreaks() --- source/code/hippie/app.js | 14 +++ source/screens/demo/examples/ui/table.liquid | 101 +++++++++++++++++++ source/style/modules/ui/_table_module.scss | 17 ++++ source/style/ui.scss | 1 + 4 files changed, 133 insertions(+) create mode 100755 source/screens/demo/examples/ui/table.liquid create mode 100644 source/style/modules/ui/_table_module.scss diff --git a/source/code/hippie/app.js b/source/code/hippie/app.js index 9fa1e9d..2e69574 100644 --- a/source/code/hippie/app.js +++ b/source/code/hippie/app.js @@ -423,6 +423,20 @@ function randomIntFrom(min, max, pos = 0) { return Math.floor((Math.random() * (max - min + 1) + min) / pos) * pos; } +/** + * Ersetzt \n durch
    . + * + * @param {string} text + * @returns {string} + */ +function replaceLineBreaks(text) { + if (text === '' || !text.includes('\n')) { + return text; + } + + return text.split('\n').join('
    '); +} + // CONCEPTS // NOTE: Benutzt private Zuweisungen diff --git a/source/screens/demo/examples/ui/table.liquid b/source/screens/demo/examples/ui/table.liquid new file mode 100755 index 0000000..654a865 --- /dev/null +++ b/source/screens/demo/examples/ui/table.liquid @@ -0,0 +1,101 @@ +--- +title: Table +tags: +- ui +--- +{% assign bodyClass = "body_frame" -%} +{% layout "hippie/app.liquid" %} + +{% block body %} +{% render 'hippie/partials/frame-header.liquid' %} +
    +
    +
    + + +
    + + + + + + + + + + + +
    #namerandomdescription
    + {% render 'hippie/partials/frame-status.liquid' %} +
    +
    + +{% render 'hippie/partials/frame-mode.liquid' %} +{% endblock %} + +{%- block script %} +{{ block.super -}} + +{% endblock %} \ No newline at end of file diff --git a/source/style/modules/ui/_table_module.scss b/source/style/modules/ui/_table_module.scss new file mode 100644 index 0000000..51896f4 --- /dev/null +++ b/source/style/modules/ui/_table_module.scss @@ -0,0 +1,17 @@ +@use "../../hippie-style/hippie"; + +main.io section > table { + table-layout: auto; + width: 100%; + margin: 0; + background-color: hippie.$color_back_io; + + thead > tr > th:first-child { + width: 1%; + } + + tr > th:first-child { + text-align: center; + } +} + diff --git a/source/style/ui.scss b/source/style/ui.scss index da6ecf7..861adf8 100644 --- a/source/style/ui.scss +++ b/source/style/ui.scss @@ -10,6 +10,7 @@ @use "modules/ui/game_module"; @use "modules/ui/gallery_module"; @use "modules/ui/windows_module"; +@use "modules/ui/table_module"; $color_gui_back: hippie.$color_dark; $space_gui_half: hippie.$space_half; From 57837110804ea49bd7a56b92450e63494f101e2c Mon Sep 17 00:00:00 2001 From: sthag Date: Fri, 13 Feb 2026 11:40:16 +0100 Subject: [PATCH 164/296] chore: Change jshint configuration --- .jshintrc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.jshintrc b/.jshintrc index cd80937..134e601 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,6 +1,5 @@ { "bitwise": true, - "browser": true, "curly": true, "devel": true, "eqeqeq": true, @@ -8,12 +7,12 @@ "forin": true, "freeze": true, "jquery": true, - "maxerr": 50, "noarg": true, "noempty": true, "strict": true, "undef": true, "unused": false, + "browser": true, "globals": { "HIPPIE": false, "hippie": true, @@ -22,11 +21,11 @@ "debugOn": true, "TimeDisplay": true, "DateDisplay": true, - "checkButtonAndTarget": true, - "getClosestEdgeToElement": true, - "getClosestEdgeToMouse": true, - "centerElementUnderCursor": true, - "setAttributesAccordingToPosition": true, + "checkButtonAndTarget": false, + "getClosestEdgeToElement": false, + "getClosestEdgeToMouse": false, + "centerElementUnderCursor": false, + "setAttributesAccordingToPosition": false, "randomIntFrom": false, "replaceLineBreaks": false, "HippieTaskBar": true From 0dfba8e6eecaab1fb4a84a40faadef8a2250d805 Mon Sep 17 00:00:00 2001 From: sthag Date: Fri, 13 Feb 2026 11:41:00 +0100 Subject: [PATCH 165/296] feat: Improve CSS declaration for gallery --- source/style/modules/ui/_gallery_module.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/style/modules/ui/_gallery_module.scss b/source/style/modules/ui/_gallery_module.scss index 4f8a233..06803fb 100644 --- a/source/style/modules/ui/_gallery_module.scss +++ b/source/style/modules/ui/_gallery_module.scss @@ -1,6 +1,6 @@ @use "../../hippie-style/hippie"; -.gallery { +main.io section > .gallery { display: flex; flex-wrap: wrap; justify-content: left; From f83b5aa258520549c07b1956433720158feba065 Mon Sep 17 00:00:00 2001 From: sthag Date: Fri, 13 Feb 2026 17:35:09 +0100 Subject: [PATCH 166/296] feat: Move and add functions - Add global function randomFloatFrom() - Move getRandomColor() to app --- source/code/drag.js | 12 ----------- source/code/hippie/app.js | 22 +++++++++++++++++++++ source/screens/demo/examples/ui/drag.liquid | 1 + 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/source/code/drag.js b/source/code/drag.js index 01a489a..7bdd8e9 100644 --- a/source/code/drag.js +++ b/source/code/drag.js @@ -113,15 +113,3 @@ class NewDiv { space.appendChild(this.element); } } - -// Function to generate a random color -function getRandomColor() { - const letters = '0123456789ABCDEF'; - let color = '#'; - - for (let i = 0; i < 6; i++) { - color += letters[Math.floor(Math.random() * 16)]; - } - - return color; -} diff --git a/source/code/hippie/app.js b/source/code/hippie/app.js index 2e69574..f00f364 100644 --- a/source/code/hippie/app.js +++ b/source/code/hippie/app.js @@ -423,6 +423,12 @@ function randomIntFrom(min, max, pos = 0) { return Math.floor((Math.random() * (max - min + 1) + min) / pos) * pos; } +function randomFloatFrom(min, max, dec = 0) { + dec = Math.pow(10, dec); + + return Math.round((Math.random() * (max - min + 1) + min) * dec) / dec; +} + /** * Ersetzt \n durch
    . * @@ -437,6 +443,22 @@ function replaceLineBreaks(text) { return text.split('\n').join('
    '); } +/** + * Gibt eine zufällige Farbe als HEX-Wert aus. + * + * @returns {string} + */ +function getRandomColor() { + const letters = '0123456789ABCDEF'; + let color = '#'; + + for (let i = 0; i < 6; i++) { + color += letters[Math.floor(Math.random() * 16)]; + } + + return color; +} + // CONCEPTS // NOTE: Benutzt private Zuweisungen diff --git a/source/screens/demo/examples/ui/drag.liquid b/source/screens/demo/examples/ui/drag.liquid index fe8ef43..7b46674 100755 --- a/source/screens/demo/examples/ui/drag.liquid +++ b/source/screens/demo/examples/ui/drag.liquid @@ -22,6 +22,7 @@ tags: {% endblock %} {%- block script %} + +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/ui/cli.njk b/source/screens/demo/examples/ui/cli.njk deleted file mode 100755 index dc0800f..0000000 --- a/source/screens/demo/examples/ui/cli.njk +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: CLI -tags: - - ui ---- -{% set pageId = page.fileSlug %} -{% set bodyClass = "body_cli" %} - -{% extends "hippie/_app_frame.njk" %} - -{% block body %} -
    -
    -
    Previous prompt
    -
    -
    - - -
    -
    -{% endblock %} - -{%- block script %} - {{ super() }} - -{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/ui/tui.liquid b/source/screens/demo/examples/ui/tui.liquid new file mode 100644 index 0000000..cb2434f --- /dev/null +++ b/source/screens/demo/examples/ui/tui.liquid @@ -0,0 +1,13 @@ +--- +title: TUI +tags: +- ui +--- +{% assign bodyClass = "body_frame" -%} +{% layout "hippie/app.liquid" %} + +{% block body %} +{% render 'hippie/partials/frame-header.liquid' %} +
    +{% render 'hippie/partials/frame-mode.liquid' %} +{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/ui/tui.njk b/source/screens/demo/examples/ui/tui.njk deleted file mode 100755 index 8fc0e31..0000000 --- a/source/screens/demo/examples/ui/tui.njk +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: TUI -tags: - - ui ---- -{% set pageId = page.fileSlug %} - -{% extends "hippie/_app_frame.njk" %} - -{% block body %} - {{ io.frameHeader('title-bar') }} -
    - {{ io.frameFooter('mode-bar') }} -{% endblock %} \ No newline at end of file From 0a5bc191d3d88ac379ace5a72899eba5bf2f413d Mon Sep 17 00:00:00 2001 From: sthag Date: Sat, 14 Feb 2026 12:15:18 +0100 Subject: [PATCH 170/296] chore: Set 11 as ECMAScript version in jshint --- .jshintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.jshintrc b/.jshintrc index 134e601..c62bd70 100644 --- a/.jshintrc +++ b/.jshintrc @@ -3,7 +3,7 @@ "curly": true, "devel": true, "eqeqeq": true, - "esversion": 9, + "esversion": 11, "forin": true, "freeze": true, "jquery": true, From 759283fd9f50b1b58b4adeffa341a65510eed1d8 Mon Sep 17 00:00:00 2001 From: sthag Date: Sat, 14 Feb 2026 12:16:55 +0100 Subject: [PATCH 171/296] docs: Update README and TODO - Better structure for TODOs - Add information about JavaScript to README --- README.md | 16 +++- TODO.md | 236 ++++++++++++++++++++++++++++-------------------------- 2 files changed, 136 insertions(+), 116 deletions(-) diff --git a/README.md b/README.md index 7430cb6..5ec206a 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,23 @@ Everything has its default style. CSS classes follow a naming scheme of `_`. -- *Object* usually is the name of the HTML element. If it is not a elemtn directly it is the thing which receives the styling +- *Object* usually is the name of the HTML element. If it is not a element directly it is the thing which receives the styling - *Description* is a name of the style e.g. what it does, how it looks +### JavaScript (JS) + +The codebase uses ECMAScript 2023 Language Specification (14th edition). +However, currently the JSHint configuration only allows 11 as highest version. + +ID values are written in *camelCase*. The scheme further uses parts for specific contexts. + +If the ID is for an interactive element the first part is an abbreviation of the action. + +- `qry` - Query +- `set` - Set +- `slt` - Select +- `tgl` - Toggle + ## Versioning This project uses [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://quelltext.interaktionsweise.de/interaktionsweise/hippie/tags). diff --git a/TODO.md b/TODO.md index 1fea50d..6704e8e 100644 --- a/TODO.md +++ b/TODO.md @@ -11,120 +11,126 @@ - Add build process for normalize.css from github.com/necolas/normalize.css - Add build process for bourbon from https://github.com/thoughtbot/bourbon +# CSS + +- Check style for every basic element +- Uniform spelling of classes and identifiers + # Content -- Complete *Intro* with description for all basic elements, according to [HTML Standard - The elements of HTML](https://html.spec.whatwg.org/multipage/semantics.html#semantics) - - Sections - - [x] body - - [x] article - - [x] section - - [x] nav - - [x] aside - - [x] h1-h6 - - [x] hgroup - - [x] header - - [x] footer - - [x] address (put to grouping content) - - Grouping content - - [x] p - - [x] hr - - [x] pre - - [x] blockquote - - [x] ol - - [x] ul - - [ ] menu (new) - - [x] li - - [x] dl - - [x] dt - - [x] dd - - [x] figure - - [x] figcaption - - [x] main - - [ ] search (new) - - [x] div - - Text-level semantics - - [x] a - - [x] em - - [x] strong - - [x] small - - [x] s - - [x] cite - - [x] q - - [x] dfn - - [x] abbr - - [x] ruby - - [x] rb (deprecated) - - [x] rt - - [x] rtc (deprecated) - - [x] rp - - [x] data - - [x] time - - [x] code - - [x] var - - [x] samp - - [x] kbd - - [x] sub - - [x] sup - - [x] i - - [x] b - - [x] u - - [x] mark - - [x] bdi - - [x] bdo - - [x] span - - [x] br (mentioned in grouping content) - - [x] wbr - - Edits - - [x] ins - - [x] del - - Embedded content - - [x] picture - - [x] source - - [x] img - - [ ] iframe - - [ ] embed - - [ ] object - - [ ] param (deprecated) - - [ ] video - - [ ] audio - - [ ] track - - [ ] map - - [ ] area - - Tabular data - - [ ] table - - [ ] caption - - [ ] colgroup - - [ ] col - - [ ] tbody - - [ ] thead - - [ ] tfoot - - [ ] tr - - [ ] td - - [ ] th - - Forms - - [x] form - - [x] label - - [x] input - - [x] button - - [ ] select - - [ ] datalist - - [ ] optgroup - - [ ] option - - [ ] textarea - - [ ] output - - [ ] progress - - [ ] meter (new) - - [x] fieldset - - [x] legend - - Interactive elements - - [ ] details - - [ ] summary - - [ ] dialog - - Scripting - - [ ] script - - [ ] noscript - - [ ] template - - [ ] slot - - [ ] canvas -- Check style for every basic element -- Uniform spelling of classes and identifiers \ No newline at end of file +- *Intro* + - Complete with description for all basic elements, according to [HTML Standard - The elements of HTML](https://html.spec.whatwg.org/multipage/semantics.html#semantics) + - Sections + - [x] body + - [x] article + - [x] section + - [x] nav + - [x] aside + - [x] h1-h6 + - [x] hgroup + - [x] header + - [x] footer + - [x] address (put to grouping content) + - Grouping content + - [x] p + - [x] hr + - [x] pre + - [x] blockquote + - [x] ol + - [x] ul + - [ ] menu (new) + - [x] li + - [x] dl + - [x] dt + - [x] dd + - [x] figure + - [x] figcaption + - [x] main + - [ ] search (new) + - [x] div + - Text-level semantics + - [x] a + - [x] em + - [x] strong + - [x] small + - [x] s + - [x] cite + - [x] q + - [x] dfn + - [x] abbr + - [x] ruby + - [x] rb (deprecated) + - [x] rt + - [x] rtc (deprecated) + - [x] rp + - [x] data + - [x] time + - [x] code + - [x] var + - [x] samp + - [x] kbd + - [x] sub + - [x] sup + - [x] i + - [x] b + - [x] u + - [x] mark + - [x] bdi + - [x] bdo + - [x] span + - [x] br (mentioned in grouping content) + - [x] wbr + - Edits + - [x] ins + - [x] del + - Embedded content + - [x] picture + - [x] source + - [x] img + - [ ] iframe + - [ ] embed + - [ ] object + - [ ] param (deprecated) + - [ ] video + - [ ] audio + - [ ] track + - [ ] map + - [ ] area + - Tabular data + - [ ] table + - [ ] caption + - [ ] colgroup + - [ ] col + - [ ] tbody + - [ ] thead + - [ ] tfoot + - [ ] tr + - [ ] td + - [ ] th + - Forms + - [x] form + - [x] label + - [x] input + - [x] button + - [ ] select + - [ ] datalist + - [ ] optgroup + - [ ] option + - [ ] textarea + - [ ] output + - [ ] progress + - [ ] meter (new) + - [x] fieldset + - [x] legend + - Interactive elements + - [ ] details + - [ ] summary + - [ ] dialog + - Scripting + - [ ] script + - [ ] noscript + - [ ] template + - [ ] slot + - [ ] canvas +- *Clock* + - Add overlays to better distinguish day, week and year \ No newline at end of file From b1c7f4100e8ef5d76786113a82526c72d4c6d0ad Mon Sep 17 00:00:00 2001 From: sthag Date: Sat, 14 Feb 2026 12:18:07 +0100 Subject: [PATCH 172/296] feat: Unify format for IDs --- source/screens/demo/examples/clock.liquid | 6 +++--- source/screens/demo/examples/start.liquid | 4 ++-- source/screens/demo/examples/ui/gallery.liquid | 8 ++++---- source/screens/demo/examples/ui/windows.liquid | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source/screens/demo/examples/clock.liquid b/source/screens/demo/examples/clock.liquid index da8f5a4..34fb1d5 100644 --- a/source/screens/demo/examples/clock.liquid +++ b/source/screens/demo/examples/clock.liquid @@ -11,7 +11,7 @@ tags:

    - +

    {% endblock %} @@ -27,9 +27,9 @@ tags: const colorDayOfMonth = getComputedStyle(document.documentElement).getPropertyValue('--clock-color-orange').trim(); const colorMonth = getComputedStyle(document.documentElement).getPropertyValue('--clock-color-pink').trim(); - document.getElementById('toggleFormat').addEventListener('click', () => { + document.getElementById('tglFormat').addEventListener('click', () => { is24HourFormat = !is24HourFormat; - document.getElementById('toggleFormat').textContent = is24HourFormat ? '12-Stunden-Format' : '24-Stunden-Format'; + document.getElementById('tglFormat').textContent = is24HourFormat ? '12-Stunden-Format' : '24-Stunden-Format'; }); function drawRings(seconds, minutes, hours, dayOfWeek, dayOfMonth, month, daysInCurrentMonth) { diff --git a/source/screens/demo/examples/start.liquid b/source/screens/demo/examples/start.liquid index b4b1d98..3155921 100644 --- a/source/screens/demo/examples/start.liquid +++ b/source/screens/demo/examples/start.liquid @@ -11,7 +11,7 @@ tags: {% block body %}
    @@ -69,7 +69,7 @@ tags: document.getElementById('www-search').addEventListener('submit', function (e) { e.preventDefault(); - const query = document.getElementById('query').value.trim(); + const query = document.getElementById('qrySearch').value.trim(); if (!query) return; diff --git a/source/screens/demo/examples/ui/gallery.liquid b/source/screens/demo/examples/ui/gallery.liquid index c548374..8128023 100755 --- a/source/screens/demo/examples/ui/gallery.liquid +++ b/source/screens/demo/examples/ui/gallery.liquid @@ -12,9 +12,9 @@ tags:
    - +
    @@ -43,12 +47,12 @@ tags: - +
    #
    {% render 'hippie/partials/frame-status.liquid' %}
    -