From 9b44963ba2a2edb8ac7d9d6e6bee30dbf36c918f Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 8 Mar 2026 17:00:04 +0100 Subject: [PATCH] feat: Make game sub - Move game and intro to own collection - Add index - Add brand placeholder to shortcodes - Add variant of placeholder to menu --- .eleventy.js | 38 +++++++++++++++++++ source/screens/demo/examples/game.liquid | 25 ------------ .../screens/demo/examples/game/index.liquid | 24 ++++++++++++ .../demo/examples/{ => game}/intro.njk | 2 +- source/screens/demo/examples/game/menu.liquid | 29 ++++++++++++++ source/style/modules/_game.scss | 33 ++++++++++++++++ 6 files changed, 125 insertions(+), 26 deletions(-) delete mode 100644 source/screens/demo/examples/game.liquid create mode 100644 source/screens/demo/examples/game/index.liquid rename source/screens/demo/examples/{ => game}/intro.njk (99%) create mode 100644 source/screens/demo/examples/game/menu.liquid diff --git a/.eleventy.js b/.eleventy.js index bd53224..407553c 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -57,6 +57,44 @@ export default async function (eleventyConfig) { return `${text}`; }); + eleventyConfig.addPairedShortcode("brand", function (content, attrClass = 'brand', direction = 'first') { + const logo = ` + + + + + + + +`; + let output = ''; + switch (direction) { + case 'first': + output = logo + `${content}`; + break; + case 'last': + output = `${content}` + logo; + break; + } + + return `
` + output + `
`; + }); + eleventyConfig.addPassthroughCopy({'source/art/images': 'art'}); eleventyConfig.addPassthroughCopy({'source/art/favicons/**/*.+(ico|png|svg)': '.'}); diff --git a/source/screens/demo/examples/game.liquid b/source/screens/demo/examples/game.liquid deleted file mode 100644 index 4b368cb..0000000 --- a/source/screens/demo/examples/game.liquid +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Game - TFW -tags: -- demoExample -- gameExample ---- -{% assign bodyClass = 'body_game' -%} -{% layout 'hippie/simple.liquid' %} - -{% block body %} -
- -
-{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/game/index.liquid b/source/screens/demo/examples/game/index.liquid new file mode 100644 index 0000000..d939850 --- /dev/null +++ b/source/screens/demo/examples/game/index.liquid @@ -0,0 +1,24 @@ +--- +title: Game +tags: +- demoExample +- index +--- +{% layout 'hippie/simple.liquid' %} + +{% block title %}{{ title }}{% endblock %} + +{% block body %} +
+ +
+{% endblock %} \ No newline at end of file diff --git a/source/screens/demo/examples/intro.njk b/source/screens/demo/examples/game/intro.njk similarity index 99% rename from source/screens/demo/examples/intro.njk rename to source/screens/demo/examples/game/intro.njk index 548cc3f..fbcb692 100644 --- a/source/screens/demo/examples/intro.njk +++ b/source/screens/demo/examples/game/intro.njk @@ -1,7 +1,7 @@ --- title: Intro tags: - - demoExample + - game --- {% set pageId = "init" %} diff --git a/source/screens/demo/examples/game/menu.liquid b/source/screens/demo/examples/game/menu.liquid new file mode 100644 index 0000000..7852bdb --- /dev/null +++ b/source/screens/demo/examples/game/menu.liquid @@ -0,0 +1,29 @@ +--- +title: Menu +tags: +- game +--- +{% assign bodyClass = 'body_game' -%} +{% layout 'hippie/simple.liquid' %} + +{% block body %} +
+ +
+ +{% endblock %} \ No newline at end of file diff --git a/source/style/modules/_game.scss b/source/style/modules/_game.scss index 7bb575e..690a4e9 100644 --- a/source/style/modules/_game.scss +++ b/source/style/modules/_game.scss @@ -1,3 +1,36 @@ +@use "../hippie-style/hippie"; + .body_game { + @extend .h_full_view; background-color: hotpink; + + footer { + @extend .pos_abs; + @extend .pin_bottom; + @extend .width_full; + + .brand { + display: flex; + flex-flow: row nowrap; + align-items: center; + justify-content: flex-end; + gap: hippie.$space_half hippie.$space_basic; + + margin: hippie.$space_basic hippie.$space_double; + + & > svg { + height: 32px; + width: 32px; + + rect, circle, path { + stroke: black !important; + } + } + + p { + + } + ; + } + } } \ No newline at end of file