From 82b3b27ab6ebc2a7101bb2092b3f2a0ca6869390 Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Thu, 23 Oct 2025 20:13:34 +0200 Subject: [PATCH] feat: Add mode selection interface for creator/joiner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Motivations :** - Improve user experience with clear role selection - Add intuitive interface to choose between creator and joiner modes - Provide easy navigation between modes **Modifications :** - Added mode selection screen with two main buttons - Added back buttons to return to mode selection - Enhanced CSS styling for mode buttons and navigation - Added JavaScript logic for mode switching **Pages affectΓ©es :** - src/pages/home/home.html - Added mode selection interface - src/pages/home/home.ts - Added mode selection logic - src/4nk.css - Added styling for mode selection and back buttons --- src/4nk.css | 116 +++++++++++++++++++++++++++++++++++++++ src/pages/home/home.html | 28 ++++++++++ src/pages/home/home.ts | 66 ++++++++++++++++++++++ src/services/service.ts | 4 +- 4 files changed, 212 insertions(+), 2 deletions(-) diff --git a/src/4nk.css b/src/4nk.css index d9a3bf1..53a2968 100644 --- a/src/4nk.css +++ b/src/4nk.css @@ -1080,3 +1080,119 @@ select[data-multi-select-plugin] { .custom-select::-webkit-scrollbar-thumb:hover { background: #555; } + +/* Mode Selection Styles */ +.mode-buttons { + display: flex; + gap: 20px; + margin: 20px 0; + flex-wrap: wrap; +} + +.mode-btn { + flex: 1; + min-width: 250px; + display: flex; + align-items: center; + gap: 15px; + padding: 20px; + border: 2px solid transparent; + border-radius: 12px; + cursor: pointer; + transition: all 0.3s ease; + text-align: left; + background: white; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); +} + +.mode-btn:hover { + transform: translateY(-2px); + box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); +} + +.mode-btn.primary-btn { + border-color: var(--primary-color); +} + +.mode-btn.primary-btn:hover { + background: var(--primary-color); + color: white; +} + +.mode-btn.secondary-btn { + border-color: var(--secondary-color); +} + +.mode-btn.secondary-btn:hover { + background: var(--secondary-color); + color: white; +} + +.mode-icon { + font-size: 32px; + flex-shrink: 0; +} + +.mode-content h3 { + margin: 0 0 8px 0; + font-size: 18px; + font-weight: 600; + color: inherit; +} + +.mode-content p { + margin: 0; + font-size: 14px; + color: #666; + line-height: 1.4; +} + +.mode-btn:hover .mode-content p { + color: inherit; + opacity: 0.9; +} + +/* Back Button Styles */ +.back-btn { + background: transparent; + border: 1px solid #ddd; + color: #666; + padding: 8px 16px; + border-radius: 6px; + cursor: pointer; + font-size: 14px; + transition: all 0.3s ease; + margin-top: 10px; +} + +.back-btn:hover { + background: #f8f9fa; + border-color: var(--primary-color); + color: var(--primary-color); +} + +.card-header { + position: relative; +} + +.card-header .back-btn { + position: absolute; + top: 0; + right: 0; +} + +/* Responsive Design for Mode Selection */ +@media (max-width: 768px) { + .mode-buttons { + flex-direction: column; + } + + .mode-btn { + min-width: auto; + } + + .card-header .back-btn { + position: static; + margin-top: 10px; + } +} diff --git a/src/pages/home/home.html b/src/pages/home/home.html index 5efb34f..bdf3323 100755 --- a/src/pages/home/home.html +++ b/src/pages/home/home.html @@ -1,8 +1,35 @@
+ +
+
+

πŸ” 4NK Pairing

+

Choose your role in the pairing process

+
+ +
+ + + +
+
+