From 8014e70a6c57becd4afa9a85701b325c5abae0db Mon Sep 17 00:00:00 2001 From: Immanuel Onyeka Date: Mon, 17 May 2021 18:57:05 -0400 Subject: [PATCH] Style summary section of panel --- resources/images/wallet2.svg | 3 +++ resources/js/main.js | 7 +++--- resources/js/panel/panel.vue | 21 +++++++++++++++--- resources/scss/_vars.scss | 6 +++++- resources/scss/main.scss | 41 ++++++++++++++++++++++++++++++++++++ routes/web.php | 4 ++++ 6 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 resources/images/wallet2.svg diff --git a/resources/images/wallet2.svg b/resources/images/wallet2.svg new file mode 100644 index 0000000..e646d94 --- /dev/null +++ b/resources/images/wallet2.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/resources/js/main.js b/resources/js/main.js index ec67fa6..ea204cd 100644 --- a/resources/js/main.js +++ b/resources/js/main.js @@ -46,8 +46,8 @@ function login(event) { "Invalid credentials." } }) + event.preventDefault() event.stopPropogation() - return false } //Attempt to resend the verification link @@ -67,6 +67,7 @@ function resendLink(event) { } }) event.stopPropogation(); + event.preventDefault(); } function toggleNav() { @@ -109,8 +110,8 @@ if (window.location.pathname == '/') { } else if (window.location.pathname == '/verify-email') { document.getElementById('resend_verification').addEventListener("click", resendLink) } else if (window.location.pathname == '/panel') { - const app = createApp(Panel).mount('#panel') if (!token) {getToken(app)} - window.onhashchange = ()=>{app.active = location.hash } + const app = createApp(Panel).mount('#panel') + window.onhashchange = ()=>{app.active = location.hash} } diff --git a/resources/js/panel/panel.vue b/resources/js/panel/panel.vue index bb1f4a7..a3ff12d 100644 --- a/resources/js/panel/panel.vue +++ b/resources/js/panel/panel.vue @@ -1,20 +1,35 @@ diff --git a/resources/scss/_vars.scss b/resources/scss/_vars.scss index ffca216..3860b84 100644 --- a/resources/scss/_vars.scss +++ b/resources/scss/_vars.scss @@ -18,7 +18,11 @@ $theme-colors: ( "faded-text2": #6c757d, "dark-green": #3bb78f, "light-green": #0bab64, - "green": #63b521 + "green": #63b521, + "alt-blue-light": #e2f5ff, + "alt-blue-medium": #2b96cc, + "alt-red-light": #f3beb8, + "alt-red-medium": #f09898, ); @function getColor($col) { diff --git a/resources/scss/main.scss b/resources/scss/main.scss index eca98fd..692191d 100644 --- a/resources/scss/main.scss +++ b/resources/scss/main.scss @@ -720,6 +720,47 @@ main.panel { // opacity: 1; @include vars.hovering3; transition: opacity 0.5s ease; + vertical-align: middle; + // text-align: center; + + section { + padding: 5px; + border-radius: 4px; + min-height: 3em; + margin-bottom: 1em; + } + + h4 { + margin: 4px; + color: vars.getColor("dark-grey"); + } + + p { + margin: 0; + } + + .icon { + width: 25px; + margin: 10px; + } + + .welcome-pane { + text-align: center; + } + + .credits-pane { + border: 3px solid vars.getColor("alt-blue-medium"); + background: vars.getColor("alt-blue-light"); + > * { + display: inline; + vertical-align: middle; + } + } + + .alerts-pane { + border: 3px solid vars.getColor("grey"); + padding: 1em; + } } // .fade-enter-active, .fade-leave-active { diff --git a/routes/web.php b/routes/web.php index a0d9d49..ffa6b1c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -54,3 +54,7 @@ Route::post('/reset-passowrd', [UserController::class, Route::post('/login', [UserController::class, 'login'])->middleware('guest'); + +Route::get('/panel/user', function (Request $request) { + return $request->user(); +});