From e7fba001e4cfb46f55ac86ec9e635440300a0c65 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Mon, 9 Jun 2025 17:50:58 +0200 Subject: [PATCH] testapp: enhance room creation form with preferences handling and responsive design --- testapp/public/css/home.css | 152 +++++++++++---- testapp/public/views/index.mustache | 213 +++++++++++++++++++--- testapp/src/controllers/homeController.ts | 28 ++- 3 files changed, 333 insertions(+), 60 deletions(-) diff --git a/testapp/public/css/home.css b/testapp/public/css/home.css index 1279ae2..4a6d008 100644 --- a/testapp/public/css/home.css +++ b/testapp/public/css/home.css @@ -6,20 +6,25 @@ body, html { height: 100vh; - margin: 0; width: 100%; - display: flex; - align-items: center; - justify-content: center; + margin: 0; background-color: #f8f9fa; + padding: 0px; + box-sizing: border-box; } .container { width: 100%; - max-width: 1000px; + max-width: 1200px; + margin: 0 auto; display: flex; gap: 25px; - max-height: 450px; + min-height: calc(80vh - 40px); + max-height: calc(80vh - 40px); + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); } .rooms-container { @@ -30,47 +35,130 @@ html { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); display: flex; flex-direction: column; -} - -.rooms-header { - position: sticky; - top: 0; - background: white; - z-index: 10; - padding-bottom: 10px; - border-bottom: 2px solid var(--primary-color); -} - -.rooms-list { - overflow-y: auto; - height: 100%; - max-height: 100%; - padding-right: 10px; + overflow: hidden; } .create-room { flex: 1; background: var(--secondary-color); - padding: 25px; + padding: 15px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); + display: flex; + flex-direction: column; + overflow: hidden; +} +.create-room p, +.create-room h2 { + margin-bottom: 0 !important ; + font-size: 0.9rem; +} +.create-room h2 { + font-size: 1.1rem; /* Smaller title */ } -.btn-primary { +/* Collapsible sections for room creation form */ +.preferences-accordion { + flex: 1; + overflow-y: auto; +} + +.accordion-item { + border: none; + margin-bottom: 0.25rem; +} + +.accordion-button { background-color: var(--primary-color); - border-color: var(--primary-color); + color: white; + border-radius: 0.25rem !important; /* Smaller radius */ + font-weight: 500; /* Less bold */ + font-size: 0.8rem; /* Smaller text */ + padding: 0.4rem 0.8rem; /* Much smaller padding */ + min-height: auto; /* Remove default height */ } -.btn-primary:hover { - background-color: #357abd; +.accordion-button:not(.collapsed) { + background-color: var(--primary-color); + color: white; + box-shadow: none; } -.dropdown-menu { - min-width: 100%; - text-align: center; +.accordion-button:focus { + box-shadow: 0 0 0 0.25rem rgba(74, 144, 226, 0.25); } -.dropdown-item { - cursor: pointer; +.accordion-body { + padding: 0.5rem; /* Much smaller padding */ + background-color: #f8f9fa; + font-size: 0.8rem; /* Smaller text */ } +form-label { + font-size: 0.8rem; /* Smaller labels */ + margin-bottom: 0.25rem; +} + +.form-control, +.form-select { + font-size: 0.8rem; /* Smaller inputs */ + padding: 0.25rem 0.5rem; /* Smaller padding */ +} + +.form-check { + margin-bottom: 0.25rem; /* Smaller spacing */ +} + +.form-check-label { + font-size: 0.8rem; /* Smaller text */ +} + +.form-text { + font-size: 0.7rem !important; /* Much smaller help text */ + margin-top: 0.125rem; +} + +#recording-access-section { + background-color: rgba(13, 110, 253, 0.1); + padding: 0.4rem; /* Smaller padding */ + border-radius: 0.25rem; + border-left: 2px solid var(--primary-color); /* Thinner border */ + margin-top: 0.25rem; +} + +/* Compact button */ +.create-room-btn { + font-size: 0.85rem; /* Smaller button text */ + padding: 0.4rem 0.8rem; /* Smaller button */ + margin-top: 0.5rem; /* Less top margin */ +} + +/* Responsive adjustments */ +@media (max-height: 600px) { + .container { + flex-direction: column; + max-height: none; + min-height: auto; + } + + .create-room { + max-height: 350px; /* Smaller max height */ + } +} + +@media (max-width: 768px) { + .container { + flex-direction: column; + max-height: none; + gap: 15px; + } + + body, + html { + padding: 10px; + } + + .create-room { + padding: 10px; /* Even smaller on mobile */ + } +} diff --git a/testapp/public/views/index.mustache b/testapp/public/views/index.mustache index ae97124..4c51307 100644 --- a/testapp/public/views/index.mustache +++ b/testapp/public/views/index.mustache @@ -23,7 +23,11 @@
Generate a room from scratch
+Generate a room from scratch
-