From 8b7071af9d81e0437c0dae9e05c0a23f9552cf9f Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:07:37 +1200 Subject: [PATCH] feat(ui): update settings modal style --- public/css/styles.css | 48 ++++++++++++++++++++++++++++++++++++++++ views/settings.templ | 49 +++++++++++++++++++++++------------------ views/settings_templ.go | 24 ++++++++++++++------ 3 files changed, 92 insertions(+), 29 deletions(-) diff --git a/public/css/styles.css b/public/css/styles.css index 5394dc4..beabf5d 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -192,6 +192,43 @@ nav:hover .caret-rotate { transform: rotate(-90deg); } +.settings-container { + display: flex; + flex-direction: column; +} + +.setting { + margin-bottom: 10px; +} + +.tooltip-container { + position: relative; + display: inline-block; +} + +.tooltip-text { + visibility: hidden; + width: 250px; + background-color: #555; + color: #fff; + text-align: center; + border-radius: 6px; + padding: 10px; + position: absolute; + z-index: 1; + bottom: 125%; + left: 50%; + margin-left: -60px; + opacity: 0; + transition: opacity 0.3s; + font-size: 0.75rem; +} + +.tooltip-container:hover .tooltip-text { + visibility: visible; + opacity: 1; +} + /*modal styles*/ #modal { /* Underlay covers entire screen. */ @@ -313,6 +350,17 @@ nav:hover .caret-rotate { color: #fff; } +#modal select { + padding: 8px !important; + font-size: inherit; + width: 100%; + border-radius: 5px; + background-color: #444; + outline: none; + border: none; + color: #fff; +} + .table-actions { white-space: nowrap; padding: 3px 0; diff --git a/views/settings.templ b/views/settings.templ index 60ef762..c5ede4b 100644 --- a/views/settings.templ +++ b/views/settings.templ @@ -7,28 +7,33 @@ import ( templ Settings(user goth.User, settings *data.UserSettings) { @Modal("Settings") { -
- - -
-
- - -
-
- - -
-
- +
+
+ + +
+
+ + +
+
+ + +
+
+ +
} } diff --git a/views/settings_templ.go b/views/settings_templ.go index 3d6b843..acdc657 100644 --- a/views/settings_templ.go +++ b/views/settings_templ.go @@ -43,14 +43,14 @@ func Settings(user goth.User, settings *data.UserSettings) templ.Component { }() } ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }