From 95e04603258d629fcaffb4d55d11e44f503660f6 Mon Sep 17 00:00:00 2001 From: sthag Date: Thu, 12 Mar 2026 20:00:24 +0100 Subject: [PATCH] feat: Update portal - Change portal from njk to liquid - Add gate partials as replacement for macro --- source/screens/demo/examples/portal.liquid | 29 +++++++++++++ source/screens/demo/examples/portal.njk | 41 ------------------- .../hippie/partials/gate-list.liquid | 19 +++++++++ .../hippie/partials/gate-simple.liquid | 7 ++++ 4 files changed, 55 insertions(+), 41 deletions(-) create mode 100644 source/screens/demo/examples/portal.liquid delete mode 100644 source/screens/demo/examples/portal.njk create mode 100644 source/templates/hippie/partials/gate-list.liquid create mode 100644 source/templates/hippie/partials/gate-simple.liquid diff --git a/source/screens/demo/examples/portal.liquid b/source/screens/demo/examples/portal.liquid new file mode 100644 index 0000000..545c0c9 --- /dev/null +++ b/source/screens/demo/examples/portal.liquid @@ -0,0 +1,29 @@ +--- +title: Portal +tags: +- demoExample +image: + src: '/art/flag_websafe_128x80.gif' + alt: 'Flag of Interaktionsweise' +links: +- name: '1' + href: 'http://domain.tld' + img: '/art/bullet.gif' +- name: 'Zwei' + href: 'http://domain.tld' + img: '/art/bullet.gif' +--- +{% assign bodyClass = "body_portal" %} +{% layout 'hippie/simple.liquid' %} + +{% block body %} +
+ {% render 'hippie/partials/gate-list', + name: 'Tor mit Symbol und Liste', + url: '../demo', + image: image, + links: links + %} + {% render 'hippie/partials/gate-simple', name: 'Tor', url: '../demo' %} +
+{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/portal.njk b/source/screens/demo/examples/portal.njk deleted file mode 100644 index 68268c7..0000000 --- a/source/screens/demo/examples/portal.njk +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Portal -tags: - - demoExample ---- -{% set pageId = page.fileSlug %} -{% set bodyClass = "body_portal" %} - -{% extends "demo/_default.njk" %} -{% import "hippie/macros/_gate.njk" as gate %} - -{% block title %}{{ title }} -{% endblock %} - -{% block head %} - {{ super() }} -{% endblock %} - -{% block body %} - -
- {{ gate.list( - 'Tor mit Symbol und Liste', - '../demo', { - src: '/art/flag_websafe_128x80.gif', - alt: 'Flag of Interaktionsweise' - }, [ - { - name: '1', - href: 'http://domain.tld', - img: '../art/bullet.gif' - }, { - name: 'Zwei', - href: 'http://domain.tld', - img: '../art/bullet.gif' - } - ] - ) }} - {{ gate.simple('Tor', '../demo') }} -
-{% endblock %} \ No newline at end of file diff --git a/source/templates/hippie/partials/gate-list.liquid b/source/templates/hippie/partials/gate-list.liquid new file mode 100644 index 0000000..8c5fdea --- /dev/null +++ b/source/templates/hippie/partials/gate-list.liquid @@ -0,0 +1,19 @@ +
+
+

+ {{ name }} +

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

+ {{ name }} +

+
+
\ No newline at end of file