diff --git a/assest-source/logo-inkscape.svg b/assest-source/logo-inkscape.svg new file mode 100644 index 0000000..8a0f274 --- /dev/null +++ b/assest-source/logo-inkscape.svg @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + $ + + + + + + + + + + $ + + + pendSparrow + + + + + + diff --git a/input.css b/input.css index 95e8a08..52482f6 100644 --- a/input.css +++ b/input.css @@ -3,37 +3,34 @@ @source './static/**/*.js'; @source './template/**/*.templ'; -body { - @apply font-garamond text-gray-700; -} -input:focus { - @apply outline-none ring-0; -} - -@font-face { - font-family: "Pirata One"; - src: url("/static/font/PirataOne-Regular.woff2") format("woff2"); -} @font-face { font-family: "EB Garamond"; src: url("/static/font/EBGaramond-VariableFont_wght.woff2") format("woff2"); } -@theme { - --font-pirata: "Pirata One", serif; - --font-garamond: "EB Garamond", serif; +body { + font-family: "EB Garamond", serif; + @apply text-gray-700; +} + +input:focus { + @apply outline-none ring-0; +} + +button { + @apply cursor-pointer; } /* Button */ .button { - transition: all 150ms linear; + transition: all 150ms linear; @apply cursor-pointer border-2 rounded-lg border-transparent; } .button-primary:hover, .button-normal:hover { - transform: translate(-0.25rem, -0.25rem); - box-shadow: 3px 3px 3px var(--color-gray-200); + transform: translate(-0.25rem, -0.25rem); + box-shadow: 3px 3px 3px var(--color-gray-200); } .button-primary { @@ -61,3 +58,5 @@ input:focus { box-shadow: 0 0 0 2px var(--color-gray-200); } + + diff --git a/internal/template/account/account.templ b/internal/template/account/account.templ index 3a3006f..cfdb2fa 100644 --- a/internal/template/account/account.templ +++ b/internal/template/account/account.templ @@ -66,7 +66,9 @@ templ EditAccount(account *types.Account) { hx-swap="outerHTML" class="button button-neglect px-1 flex items-center gap-2" > - @svg.Cancel() + + @svg.Cancel() + Cancel diff --git a/internal/template/auth/sign_in_or_up.templ b/internal/template/auth/sign_in_or_up.templ index 94e29cc..ad39b68 100644 --- a/internal/template/auth/sign_in_or_up.templ +++ b/internal/template/auth/sign_in_or_up.templ @@ -71,10 +71,10 @@ if isSignIn { Don't have an account? Sign Up - Sign In + Sign In } else { Already have an account? Sign In - + Sign Up } diff --git a/internal/template/auth/user.templ b/internal/template/auth/user.templ index 72b8a27..364dda7 100644 --- a/internal/template/auth/user.templ +++ b/internal/template/auth/user.templ @@ -1,7 +1,7 @@ package auth templ UserComp(user string) { - + if user != "" { @@ -37,8 +37,8 @@ templ UserComp(user string) { } else { - Sign Up - Sign In + Sign Up + Sign In } } diff --git a/internal/template/root.templ b/internal/template/index.templ similarity index 72% rename from internal/template/root.templ rename to internal/template/index.templ index ea56545..39c34e6 100644 --- a/internal/template/root.templ +++ b/internal/template/index.templ @@ -3,8 +3,7 @@ package template templ Index() { - - SpendSparrow + Spend your treasure on the important diff --git a/internal/template/layout.templ b/internal/template/layout.templ index 52edb1c..a215db4 100644 --- a/internal/template/layout.templ +++ b/internal/template/layout.templ @@ -1,10 +1,14 @@ package template +import "spend-sparrow/internal/template/svg" + func layoutLinkClass(isActive bool) string { + common := "text-2xl p-2 text-gray-900 decoration-yellow-400 decoration-[0.25rem] hover:bg-gray-200 rounded-lg" if isActive { - return "text-xl hover:bg-gray-100 p-1 duration-100 rounded-xl transition-colors text-gray-900" + return common + " " + "underline" } - return "text-xl hover:bg-gray-100 hover:text-gray-900 p-1 duration-200 rounded-xl transition-colors text-gray-400" + + return common + " " + "hover:underline" } templ Layout(slot templ.Component, user templ.Component, loggedIn bool, path string) { @@ -22,48 +26,69 @@ templ Layout(slot templ.Component, user templ.Component, loggedIn bool, path str "includeIndicatorStyles": false, "selfRequestsOnly": true, "allowScriptTags": false - }' + }' /> + - - // Header - - - - SpendSparrow - - if loggedIn { - Dashboard - Transaction - Treasure Chest - Account - } - - @user + + + + + @svg.Menu() + + + + + + @user + + + // Content + + if loggedIn { + + } + + if slot != nil { + @slot + } + - - - // Content - - if slot != nil { - @slot - } - - // Footer - + + + + + + + + @svg.Cancel() + + + @navigation(path) + - M - + class="transition-all duration-300 + opacity-0 px-4 py-2 text-lg hidden text-bold rounded bg-amber-900 text-white" + > } + +templ navigation(path string) { + + Dashboard + Transaction + Treasure Chest + Account + +} diff --git a/internal/template/svg/default.templ b/internal/template/svg/default.templ index 587dfe3..ddec57a 100644 --- a/internal/template/svg/default.templ +++ b/internal/template/svg/default.templ @@ -31,7 +31,7 @@ templ Save() { } templ Cancel() { - + } @@ -47,3 +47,13 @@ templ Info() { } + +templ Menu() { + + + + + + + +} diff --git a/internal/template/transaction/transaction.templ b/internal/template/transaction/transaction.templ index 8197799..e80fc6b 100644 --- a/internal/template/transaction/transaction.templ +++ b/internal/template/transaction/transaction.templ @@ -188,7 +188,9 @@ templ EditTransaction(transaction *types.Transaction, accounts []*types.Account, hx-swap="outerHTML" class="button button-neglect px-1 flex items-center gap-2" > - @svg.Cancel() + + @svg.Cancel() + Cancel diff --git a/internal/template/transaction_recurring/transaction_recurring.templ b/internal/template/transaction_recurring/transaction_recurring.templ index 696892f..08b5bb1 100644 --- a/internal/template/transaction_recurring/transaction_recurring.templ +++ b/internal/template/transaction_recurring/transaction_recurring.templ @@ -193,7 +193,9 @@ templ EditTransactionRecurring(transactionRecurring *types.TransactionRecurring, hx-swap="outerHTML" class="button button-neglect px-1 flex items-center gap-2" > - @svg.Cancel() + + @svg.Cancel() + Cancel diff --git a/internal/template/treasurechest/treasure_chest.templ b/internal/template/treasurechest/treasure_chest.templ index 2146dcc..5477b21 100644 --- a/internal/template/treasurechest/treasure_chest.templ +++ b/internal/template/treasurechest/treasure_chest.templ @@ -88,7 +88,9 @@ templ EditTreasureChest(treasureChest *types.TreasureChest, parents []*types.Tre hx-swap="outerHTML" class="button button-neglect px-1 flex items-center gap-2" > - @svg.Cancel() + + @svg.Cancel() + Cancel diff --git a/static/favicon.svg b/static/favicon.svg index f3a9ca5..fc4f319 100644 --- a/static/favicon.svg +++ b/static/favicon.svg @@ -1 +1,53 @@ - + + + + + + + + + + + + + $ + + diff --git a/static/font/PirataOne-Regular.woff2 b/static/font/PirataOne-Regular.woff2 deleted file mode 100644 index af0d934..0000000 Binary files a/static/font/PirataOne-Regular.woff2 and /dev/null differ diff --git a/static/js/layout.js b/static/js/layout.js new file mode 100644 index 0000000..afa6118 --- /dev/null +++ b/static/js/layout.js @@ -0,0 +1,11 @@ + +document.addEventListener("DOMContentLoaded", () => { + menuButton.addEventListener("click", function (e) { + menu.showModal(); + }); + menuButtonClose.addEventListener("click", function (e) { + menu.close(); + }); + +}) + diff --git a/static/logo.svg b/static/logo.svg new file mode 100644 index 0000000..71c486c --- /dev/null +++ b/static/logo.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + $ + + + pendSparrow + + +