From c0c87771b644c0f00e92d48a8a25ed66fdb0bc84 Mon Sep 17 00:00:00 2001 From: sthag Date: Mon, 23 Jun 2025 19:33:35 +0200 Subject: [PATCH] feat: Change cli page - New styles and strcture - Add event listeners - Add function to resize prompt according to input - Append prompts to history element --- source/screens/demo/examples/ui/cli.njk | 47 ++++++++++++++++++++-- source/style/modules/ui/_frame_module.scss | 32 +++++++++++++++ 2 files changed, 76 insertions(+), 3 deletions(-) diff --git a/source/screens/demo/examples/ui/cli.njk b/source/screens/demo/examples/ui/cli.njk index 1e59f33..5106fac 100755 --- a/source/screens/demo/examples/ui/cli.njk +++ b/source/screens/demo/examples/ui/cli.njk @@ -4,7 +4,6 @@ tags: - ui --- {% set pageId = page.fileSlug %} -{% set pageClass = "h_full_view" %} {% set bodyClass = "body_frame" %} {% extends "hippie/_app.njk" %} @@ -25,10 +24,52 @@ tags: {% block body %} {{ io.frameHeader('title-bar') }} -

Previous return

- +
+
+
Previous prompt
+
+
+ + +
+
{% endblock %} {%- block script %} {{ super() }} + {% endblock %} \ No newline at end of file diff --git a/source/style/modules/ui/_frame_module.scss b/source/style/modules/ui/_frame_module.scss index c3ba4b4..ff3aab8 100755 --- a/source/style/modules/ui/_frame_module.scss +++ b/source/style/modules/ui/_frame_module.scss @@ -4,6 +4,38 @@ } } +#cli { + @extend %flex-column; + + background-color: black; + + #line { + @extend %flex-row; + } + + #prompt { + flex: 1; + } + + pre { + margin: .5em 0; + color: white; + } + + textarea { + resize: none; + max-height: 128px; + margin: $margin_io; + border: 0; + padding: $space_half; + // color: $color_text_io; + color: white; + // background-color: $color_back_io; + background-color: transparent; + line-height: 1.2; + } +} + .body_frame { @extend %flex-column; @extend .body_ui;