-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #305 from bcgov/feature/innkeeperUiStyle
Innkeeper styling
- Loading branch information
Showing
16 changed files
with
280 additions
and
244 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.27 MB
services/tenant-ui/frontend/public/img/innkeeper/innkeeper-login-image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Specific to form fields, layout, spacing, etc | ||
|
||
.field { | ||
> label { | ||
display: block !important; | ||
> .p-progress-spinner { | ||
height: 1em; | ||
width: 1em; | ||
} | ||
} | ||
> small.p-error { | ||
display: block !important; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
@import 'variables.scss'; | ||
|
||
// General application layout and styles for the 'containing' components (nav, content, etc) | ||
|
||
body { | ||
margin: 0; | ||
} | ||
|
||
// The app layout | ||
.layout-container { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: flex-start; | ||
min-height: 100vh; | ||
width: 100%; | ||
.layout-sidebar { | ||
align-self: stretch; | ||
background-color: $tenant-ui-primary-color; | ||
color: $tenant-ui-text-on-primary; | ||
min-width: 20em; | ||
} | ||
// Innkeeper specifics | ||
&.innkeeper-layout .layout-sidebar { | ||
background-color: $innkeeper-ui-primary-color; | ||
color: $innkeeper-ui-text-on-primary; | ||
} | ||
|
||
.layout-page { | ||
width: 100%; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.layout-header { | ||
flex: 0; | ||
background-color: white; | ||
} | ||
|
||
.layout-content { | ||
flex: 1; | ||
background-color: #e4e4e4; | ||
padding: 0.5em; | ||
} | ||
} | ||
|
||
// The Login screen layout | ||
.traction-login { | ||
.logo { | ||
display: block; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
.logo-bc { | ||
@extend .logo; | ||
width: 18em; | ||
} | ||
.logo-traction { | ||
@extend .logo; | ||
width: 20em; | ||
} | ||
|
||
.cover-image { | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
.copyright { | ||
color: white; | ||
font-size: 0.5em; | ||
background-color: rgba($color: #000000, $alpha: 0.5); | ||
padding: 0 0.5em; | ||
margin: 1em; | ||
position: absolute; | ||
bottom: 0; | ||
right: 0; | ||
} | ||
} | ||
} | ||
|
||
// Sidebar layout styling | ||
.traction-sidebar { | ||
.sidebar-app-title { | ||
font-size: 1.6em; | ||
text-align: center; | ||
padding: 0.5em; | ||
margin: 0.5em; | ||
background-color: $tenant-ui-accent-color; | ||
text-transform: uppercase; | ||
word-wrap: break-word; | ||
} | ||
// Innkeeper specifics | ||
&.innkeeper-sidebar .sidebar-app-title { | ||
background-color: white; | ||
color: $innkeeper-ui-primary-color; | ||
margin: 0.5em 1em; | ||
letter-spacing: 3px; | ||
} | ||
|
||
.p-panelmenu { | ||
.p-panelmenu-panel { | ||
* { | ||
border: none !important; | ||
font-weight: normal !important; | ||
background-color: $tenant-ui-primary-color !important; | ||
color: $tenant-ui-text-on-primary !important; | ||
} | ||
.p-submenu-list { | ||
padding-left: 1.5em !important; | ||
} | ||
// Override the order of the drop down icon | ||
.p-panelmenu-header-link { | ||
display: flex; | ||
span { | ||
&.pi-chevron-right, | ||
&.pi-chevron-down { | ||
order: 2; | ||
margin-left: auto; | ||
} | ||
} | ||
.p-menuitem-icon { | ||
font-size: 1.3em; | ||
} | ||
} | ||
} | ||
} | ||
// Innkeeper specifics | ||
&.innkeeper-sidebar .p-panelmenu .p-panelmenu-panel * { | ||
background-color: $innkeeper-ui-primary-color !important; | ||
color: $innkeeper-ui-text-on-primary !important; | ||
} | ||
} | ||
|
||
// Header Layout Styling | ||
.traction-header { | ||
&.p-toolbar { | ||
background-color: white !important; | ||
border-radius: 0 !important; | ||
} | ||
} | ||
|
||
.row { | ||
display: flex; | ||
flex-direction: row; | ||
margin: 10px; | ||
} |
15 changes: 15 additions & 0 deletions
15
services/tenant-ui/frontend/src/assets/primevueComponents.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Global modifications to PrimeVue components here | ||
// Note if general global theming (colors mostly) needs changing, look to the pulled in _theme file | ||
// Can adjust ALL instances of a PrimeVue component her by just overriding the classes, | ||
// or if you want a component that only sometimes gets modified, can add another .traction class to it | ||
// like if we want a bunch of tables to get overriden style (but still want other customizable or default, | ||
// add .traction-table and nest style from that | ||
|
||
// Dialogs | ||
.p-dialog-content { | ||
input { | ||
min-width: 400px; | ||
} | ||
} | ||
|
||
// TODO: move more customization into here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,4 @@ | ||
@import '_theme.scss'; // copied from '~primevue/resources/themes/nova/theme.css' | ||
|
||
.row { | ||
display: flex; | ||
flex-direction: row; | ||
margin: 10px; | ||
} | ||
.p-dialog-content { | ||
input { | ||
min-width: 400px; | ||
} | ||
} | ||
.field { | ||
>label { | ||
display: block !important; | ||
>.p-progress-spinner { | ||
height: 1em; | ||
width: 1em; | ||
} | ||
} | ||
>small.p-error { | ||
display: block !important; | ||
} | ||
} | ||
|
||
@import 'layout.scss'; | ||
@import 'forms.scss'; | ||
@import 'primevueComponents.scss' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
services/tenant-ui/frontend/src/components/innkeeper/InnkeeperBadge.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<template> | ||
<div class="parent"> | ||
<Button @click="toggleProfile"> | ||
<div class="badge-img" /> | ||
</Button> | ||
</div> | ||
<Menu ref="menu" :model="items" :popup="true" /> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
// Vue | ||
import { ref } from 'vue'; | ||
// PrimeVue | ||
import Button from 'primevue/button'; | ||
import Menu from 'primevue/menu'; | ||
// State | ||
const menu = ref(); | ||
/** | ||
* Toggle the profile menu | ||
*/ | ||
const toggleProfile = (event: any) => { | ||
menu.value.toggle(event); | ||
}; | ||
const items = [ | ||
{ | ||
label: 'Logout', | ||
icon: 'pi pi-sign-out', | ||
url: '/innkeeper', // TODO: this should be a logout route | ||
}, | ||
]; | ||
</script> | ||
|
||
<style scoped> | ||
button { | ||
background-color: rgba(0, 0, 0, 0); | ||
border: 0; | ||
border-radius: 50%; | ||
padding: 0; | ||
transition: all 0.2s ease-in-out; | ||
} | ||
.badge-img { | ||
background-image: url('/img/innkeeper/innkeeper-badge.png'); | ||
width: 45px; | ||
height: 45px; | ||
background-size: cover; | ||
} | ||
button:enabled:hover { | ||
background-color: rgba(0, 0, 0, 0); | ||
border: 0; | ||
transform: scale(1.1); | ||
} | ||
</style> |
35 changes: 19 additions & 16 deletions
35
services/tenant-ui/frontend/src/components/innkeeper/InnkeeperLogin.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,36 @@ | ||
<template> | ||
<div class="grid w-screen h-screen"> | ||
<div class="traction-login grid w-screen h-screen"> | ||
<div class="col-12 md:col-6 xl:col-4"> | ||
<div class="px-8"> | ||
<div class="pt-4 pb-6">Image and text UX TBD</div> | ||
<div class="pt-4 pb-6"> | ||
<img src="/img/bc/bc_logo.png" class="logo-bc" /> | ||
|
||
<img | ||
src="/img/logo/traction-logo-bc-text.svg" | ||
class="logo-traction" | ||
/> | ||
</div> | ||
|
||
<div class="py-8"> | ||
<LoginForm /> | ||
<InnkeeperLoginForm /> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="cover-image hidden md:block col-0 md:col-6 xl:col-8 p-0"> | ||
<span class="copyright"> Photo by Julia Volk on StockSnap </span> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import LoginForm from '@/components/innkeeper/InnkeeperLoginForm.vue'; | ||
import InnkeeperLoginForm from '@/components/innkeeper/InnkeeperLoginForm.vue'; | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.logo { | ||
display: block; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
.logo-bc { | ||
@extend .logo; | ||
width: 18em; | ||
} | ||
.logo-traction { | ||
@extend .logo; | ||
width: 20em; | ||
// See layout.scss for generalized common login layout stuff | ||
// Set the image specific to this component here though | ||
.cover-image { | ||
background-image: url('/img/innkeeper/innkeeper-login-image.jpg'); | ||
} | ||
</style> |
Oops, something went wrong.