From 9179563f395f5ffb41433ffdccccecf378e6191f Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Sat, 17 Feb 2024 20:01:29 -0800 Subject: [PATCH] some stuff with button styeling --- web/sass/buttons.scss | 73 ++++++++++++++++++++++++ web/sass/mixins.scss | 10 +--- web/sass/site.scss | 1 + web/sass/utility-classes.scss | 71 +++++------------------ web/templates/new_transaction_pane.templ | 58 +++++++++++++++---- web/templates/transactions.templ | 19 ++++-- 6 files changed, 149 insertions(+), 83 deletions(-) create mode 100644 web/sass/buttons.scss diff --git a/web/sass/buttons.scss b/web/sass/buttons.scss new file mode 100644 index 0000000..465630c --- /dev/null +++ b/web/sass/buttons.scss @@ -0,0 +1,73 @@ + +@mixin btn() { + display: flex; + font-size: 1em; + border: none; + padding: 10px 15px 10px 15px; + border-radius: 20px; + transition: all 0.1s linear; + cursor: pointer; +} + +.btn { + @include btn; +} + +.btn.invert { + color: var(--#{$prefix}-base) !important; +} +.btn.invert:hover { + color: var(--#{$prefix}-text) !important; +} + +.btn-sm { + @include btn; + padding: 4px 8px 4px 8px; + svg { + width: 20px; + height: 20px; + } +} + +.btn.btn-sm { + padding: 4px 8px 4px 8px; + svg { + width: 20px; + height: 20px; + } +} + +.borderless-btn { + @include btn; + color: var(--#{$prefix}-text); + background-color: var(--#{$prefix}-surface2); +} +.borderless-btn:hover { + background-color: var(--#{$prefix}-overlay1); + color: var(--#{$prefix}-nav-active-color); +} + +.exit-btn { + @include btn; + color: var(--#{$prefix}-text); + padding: 11px 11px 11px 11px; + border-radius: $border-radius; + background-color: var(--#{$prefix}-crust); + height: fit-content; + width: fit-content; +} +.exit-btn:hover { + background-color: var(--#{$prefix}-surface0); +} + + +$colors: ( + "green", +); + +@each $color in $colors { + .btn.#{$color} { + background-color: var(--#{$prefix}-#{$color}); + } +} + diff --git a/web/sass/mixins.scss b/web/sass/mixins.scss index 396459e..8b13789 100644 --- a/web/sass/mixins.scss +++ b/web/sass/mixins.scss @@ -1,9 +1 @@ -@mixin button_link() { - cursor: pointer; - background-color: transparent; - background-repeat: no-repeat; - border: none; - overflow: hidden; - outline: none; - border-radius: 5px; -} + diff --git a/web/sass/site.scss b/web/sass/site.scss index 851c4ce..359620b 100644 --- a/web/sass/site.scss +++ b/web/sass/site.scss @@ -9,6 +9,7 @@ $border-radius: 8px; @import 'utility-classes'; @import 'mixins'; @import 'nav'; +@import 'buttons'; body { diff --git a/web/sass/utility-classes.scss b/web/sass/utility-classes.scss index 8c27164..fb67e72 100644 --- a/web/sass/utility-classes.scss +++ b/web/sass/utility-classes.scss @@ -106,13 +106,6 @@ $w_h_sizes: ( text-align: center; } -.btn-c-invert { - color: var(--#{$prefix}-base) !important; -} -.btn-c-invert:hover { - color: var(--#{$prefix}-text) !important; -} - .positive { color: var(--#{$prefix}-green); } @@ -120,43 +113,6 @@ $w_h_sizes: ( color: var(--#{$prefix}-red); } -.borderless-btn.btn-sm { - padding: 4px 8px 4px 8px; -} - -.borderless-btn { - display: flex; - color: var(--#{$prefix}-text); - font-size: 1em; - border: none; - padding: 10px 15px 10px 15px; - border-radius: 20px; - background-color: var(--#{$prefix}-surface2); - transition: all 0.1s linear; - cursor: pointer; -} -.borderless-btn:hover { - background-color: var(--#{$prefix}-overlay1); - color: var(--#{$prefix}-nav-active-color); -} - -.exit-btn { - display: flex; - color: var(--#{$prefix}-text); - font-size: 1em; - border: none; - padding: 11px 11px 11px 11px; - border-radius: $border-radius; - background-color: var(--#{$prefix}-crust); - transition: all 0.1s linear; - cursor: pointer; - height: fit-content; - width: fit-content; -} -.exit-btn:hover { - background-color: var(--#{$prefix}-surface0); -} - table.table { color: var(--#{$prefix}-text); td { @@ -214,29 +170,28 @@ table.table-striped { border-width: thin; transition: max-height 0.2s linear; - input { - width: 5em; - font-size: 1em; - margin-left: 10px; - margin-right: 10px; - border-radius: $border-radius; - border-style: solid; - border-color: var(--#{$prefix}-text); - } +} + +.input { + width: 10em; + font-size: 1em; + margin-left: 10px; + margin-right: 10px; + border-radius: $border-radius; + border-style: solid; + border-color: var(--#{$prefix}-text); + padding-top: 2px; + padding-bottom: 3px; } .select { border: none; font-size: 1em; border-radius: $border-radius; - background-color: var(--#{$prefix}-mantle); + background-color: var(--#{$prefix}-base); color: var(--#{$prefix}-text); } .select.border { border: 2pt solid var(--#{$prefix}-text); } - -.select.light { - background-color: var(--#{$prefix}-base); -} diff --git a/web/templates/new_transaction_pane.templ b/web/templates/new_transaction_pane.templ index c203108..ef18e62 100644 --- a/web/templates/new_transaction_pane.templ +++ b/web/templates/new_transaction_pane.templ @@ -19,18 +19,54 @@ templ NewTransactionPane(entry_types *[]types.QuickTransactionType, acnts *[]typ } -
-
- - +
+
+
+ + +
+
+ +
+
+ +
-
- - +
+
+ +
+
+
+
+

Breakdown

+ + +
+
+
+
diff --git a/web/templates/transactions.templ b/web/templates/transactions.templ index 0117c9d..ce75e96 100644 --- a/web/templates/transactions.templ +++ b/web/templates/transactions.templ @@ -19,25 +19,25 @@ templ TransactionsPage(userID int, accounts *[]string) {
+