diff --git a/source/screens/demo/examples/card.njk b/source/screens/demo/examples/card.njk index ee7011a..7db860b 100644 --- a/source/screens/demo/examples/card.njk +++ b/source/screens/demo/examples/card.njk @@ -9,100 +9,91 @@ tags: {% extends "demo/_default.njk" %} {% import "hippie/macros/_placeholder.njk" as ph %} -{% block title %}{{ title }}{% endblock %} +{% block title %}{{ title }} +{% endblock %} {% block head %} - {{ super() }} + {{ super() }} {% endblock %} {% block body %} - -
-
- - {# - - - - - - - - - - - #} - - - - - - - - - - - {# Background flag dithered #} -
-
-
-

Titel
und Beschreibung

-

{{ ph.name() }}

-

- {{ ph.email('card_address') }}
- {{ ph.link('decent', 'site.tld') }} - · - {{ ph.address('decent') }}

-
-
+ + +
+
+ + {# + + + + + + + + + + + #} + + + + + + + + + + + {# Background flag dithered #} +
+
+
+

Titel
und Beschreibung

+

{{ ph.name() }}

+

+ {{ ph.email('card_address') }}
+ {{ ph.link('decent', 'site.tld') }} + · + {{ ph.address('decent') }}

+
+
{% endblock %} {% block script %} - {{ super() }} - + document.getElementById('js_content').addEventListener('mouseenter', () => { + iId = setInterval(() => { + for (let i = 1; i <= colors.length; i++) { + position++; + + if (position >= colors.length) { + position = 0; + } + + document.getElementById("triangle-" + i).setAttribute("fill", colors[position]); + } + + position++; + + if (position >= colors.length) { + position = 0; + } + }, 600); + }); + + document.getElementById('js_content').addEventListener('mouseleave', () => { + iId && clearInterval(iId); + }); + {% endblock %} \ No newline at end of file