Replace Nunjucks with Liquid #2

Merged
sthag merged 20 commits from development into main 2026-03-15 09:40:22 +01:00
3 changed files with 148 additions and 149 deletions
Showing only changes of commit 30fcd22a7b - Show all commits

View file

@ -25,7 +25,7 @@ class UI {
msgNo: 'No agreement today.' msgNo: 'No agreement today.'
} }
}; };
this.intro = document.getElementById('intro'); this.intro = document.getElementById('init');
this.agreement = this.steps.agreement.element; this.agreement = this.steps.agreement.element;
this.hint = { this.hint = {
element: document.getElementById('hint'), element: document.getElementById('hint'),
@ -61,7 +61,7 @@ class UI {
} else { } else {
reject('No intro available.'); reject('No intro available.');
} }
}) });
} }
showHint() { showHint() {
@ -100,7 +100,7 @@ class UI {
} else { } else {
reject(); reject();
} }
}) });
} }
init() { init() {

View file

@ -4,7 +4,6 @@ tags:
- game - game
--- ---
{% assign pageId = "init" %}
{% assign bodyClass = 'body_intro' -%} {% assign bodyClass = 'body_intro' -%}
{% layout 'hippie/app.liquid' %} {% layout 'hippie/app.liquid' %}
@ -20,7 +19,7 @@ tags:
<div id="status">0%</div> <div id="status">0%</div>
</div> </div>
</div> </div>
<div id="intro" class="step op_hide"> <div id="init" class="step op_hide">
<div id="hint" class="toast di_none" role="alert" aria-live="assertive" aria-atomic="true"> <div id="hint" class="toast di_none" role="alert" aria-live="assertive" aria-atomic="true">
<p>Hold <p>Hold
<kbd>space</kbd> <kbd>space</kbd>
@ -74,7 +73,7 @@ tags:
msgNo: 'No agreement today.' msgNo: 'No agreement today.'
} }
}; };
const intro = document.getElementById('intro'); const intro = document.getElementById('init');
const agreement = steps.agreement.element; const agreement = steps.agreement.element;
const hint = { const hint = {
element: document.getElementById('hint'), element: document.getElementById('hint'),

View file

@ -33,39 +33,38 @@ $space_gui_half: hippie.$space_half;
.body_intro { .body_intro {
background-color: black; background-color: black;
}
.step { .step {
@extend %full_parent; @extend %full_parent;
} }
#loader { #loader {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: white; background-color: white;
} }
#bar { #bar {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 50%; width: 50%;
} }
#wrap { #wrap {
flex: 1; flex: 1;
background-color: hippie.$color_back_basic; background-color: hippie.$color_back_basic;
} }
#progress { #progress {
width: 0; width: 0;
height: 100%; height: 100%;
background-color: black; background-color: black;
} }
#status, #status,
#spinner { #spinner {
@extend %basic; @extend %basic;
display: flex; display: flex;
@ -77,15 +76,15 @@ $space_gui_half: hippie.$space_half;
padding-block: calc($space_gui_half - 1px) $space_gui_half; padding-block: calc($space_gui_half - 1px) $space_gui_half;
line-height: hippie.$line_basic; line-height: hippie.$line_basic;
text-align: center; text-align: center;
} }
#status { #status {
width: 4em; width: 4em;
background-color: black; background-color: black;
color: white; color: white;
} }
#spinner { #spinner {
width: 2.5em; width: 2.5em;
background-color: hippie.$color_back_basic; background-color: hippie.$color_back_basic;
color: black; color: black;
@ -93,9 +92,9 @@ $space_gui_half: hippie.$space_half;
span { span {
animation: rotate 1s linear infinite; animation: rotate 1s linear infinite;
} }
} }
@keyframes rotate { @keyframes rotate {
from { from {
transform: rotate(0deg); transform: rotate(0deg);
} }
@ -103,9 +102,9 @@ $space_gui_half: hippie.$space_half;
to { to {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
#intro { #init {
z-index: map.get(hippie.$z-indexes, "content-top"); z-index: map.get(hippie.$z-indexes, "content-top");
overflow: hidden; overflow: hidden;
display: flex; display: flex;
@ -119,9 +118,9 @@ $space_gui_half: hippie.$space_half;
li { li {
color: white; color: white;
} }
} }
.brand { .brand {
text-align: center; text-align: center;
svg { svg {
@ -144,9 +143,9 @@ $space_gui_half: hippie.$space_half;
margin-top: hippie.$space_small; margin-top: hippie.$space_small;
margin-bottom: hippie.$space_large; margin-bottom: hippie.$space_large;
} }
} }
.tech-stack { .tech-stack {
display: flex; display: flex;
padding-left: 0; padding-left: 0;
@ -154,17 +153,17 @@ $space_gui_half: hippie.$space_half;
list-style: none; list-style: none;
padding-inline: hippie.$space_double; padding-inline: hippie.$space_double;
} }
} }
#agreement, #agreement,
#idle { #idle {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
height: 100vh; height: 100vh;
} }
#agreement { #agreement {
flex-direction: column; flex-direction: column;
background-color: map.get(hippie.$color_palette, bravo); background-color: map.get(hippie.$color_palette, bravo);
user-select: none; user-select: none;
@ -173,9 +172,9 @@ $space_gui_half: hippie.$space_half;
margin-top: 0; margin-top: 0;
color: hippie.$color_brightest; color: hippie.$color_brightest;
} }
} }
#idle { #idle {
background-color: hippie.$color_back_basic; background-color: hippie.$color_back_basic;
transition: background-color 4s; transition: background-color 4s;
@ -183,6 +182,14 @@ $space_gui_half: hippie.$space_half;
background-color: transparent !important; background-color: transparent !important;
transition: background-color hippie.$duration_basic hippie.$timing_basic 0s !important; transition: background-color hippie.$duration_basic hippie.$timing_basic 0s !important;
} }
.hello {
flex: 0 1 auto;
padding: 1em 2em;
background-color: rgba(hippie.$color_bright, .5);
font-family: hippie.$family_text_mono;
}
}
} }
.toast { .toast {
@ -200,10 +207,3 @@ $space_gui_half: hippie.$space_half;
color: hippie.$color_back_io; color: hippie.$color_back_io;
} }
} }
.hello {
flex: 0 1 auto;
padding: 1em 2em;
background-color: rgba(hippie.$color_bright, .5);
font-family: hippie.$family_text_mono;
}