Skip to content

Commit

Permalink
Login Page
Browse files Browse the repository at this point in the history
  • Loading branch information
sv2 committed Apr 24, 2020
1 parent 81ec1b9 commit c22b84c
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 8 deletions.
11 changes: 11 additions & 0 deletions src/components/user/userinfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@

<q-separator spaced />

<q-item clickable v-ripple v-close-popup>
<q-item-section avatar>
<q-icon name="mdi-help-box"></q-icon>
</q-item-section>
<q-item-section>
<q-item-label lines="1">
Help
</q-item-label>
</q-item-section>
</q-item>

<q-item clickable v-ripple v-close-popup>
<q-item-section avatar>
<q-icon name="mdi-logout"></q-icon>
Expand Down
8 changes: 7 additions & 1 deletion src/layouts/Default.vue → src/layouts/mainlayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import UserInfo from '../components/user/userinfo.vue';
import Messages from '../components/user/messages.vue';
export default {
name: 'DashblocksTemplateUxLayout',
name: 'MainLayout',
components: {
MenuDrawer,
MenuList,
Expand Down Expand Up @@ -117,6 +117,12 @@ export default {
sideCaption: 'icons'
}
]
},
{
id: 'pages',
title: 'Pages',
icon: 'mdi-link-box-outline',
items: [{ id: '7', title: 'Login', link: '/login', icon: 'mdi-login' }]
}
/*
Expand Down
66 changes: 66 additions & 0 deletions src/pages/login.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<template>
<q-layout>
<q-page-container>
<q-page class="flex flex-center">
<q-card class="ub-login-card">
<q-card-section class="ub-login-hdr text-white">
<q-btn round color="secondary" icon="mdi-google" class="absolute" style="z-index:10; top: 40px; right: 12px; transform: translateY(-50%);">
<q-tooltip>Login With Google</q-tooltip>
</q-btn>
<q-btn round color="secondary" icon="mdi-facebook" class="absolute" style="z-index:10; top: 100px; right: 12px; transform: translateY(-50%);">
<q-tooltip>Login With Facebook</q-tooltip>
</q-btn>
<q-btn round color="secondary" icon="mdi-github" class="absolute" style="z-index:10; top: 160px; right: 12px; transform: translateY(-50%);">
<q-tooltip>Login With GitHub</q-tooltip>
</q-btn>
<div class="text-h5 absolute-bottom text-center" style="margin-bottom: 24px;">dashblocks.io</div>
</q-card-section>

<q-card-section>
<q-card-section>
<q-input v-model="username" debounce="400" clearable label="Username or Email">
<template v-slot:prepend>
<q-icon name="mdi-account" />
</template>
</q-input>
<q-input v-model="password" debounce="400" clearable label="password">
<template v-slot:prepend>
<q-icon name="mdi-lock" />
</template>
</q-input>
</q-card-section>
</q-card-section>

<q-card-actions align="right">
<q-btn flat>Register</q-btn>
<q-btn color="primary" unelevated>Login</q-btn>
</q-card-actions>
</q-card>
</q-page>
</q-page-container>
</q-layout>
</template>

<script>
export default {
data() {
return {
username: '',
password: ''
};
}
};
</script>

<style lang="scss">
.ub-login-card {
width: 100%;
max-width: 400px;
.ub-login-hdr {
height: 200px;
background: #0f2027; /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #2c5364, #203a43, #0f2027); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #2c5364, #203a43, #0f2027); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
}
</style>
10 changes: 8 additions & 2 deletions src/router.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Vue from 'vue';
import Router from 'vue-router';
import DefaultLayout from './layouts/Default.vue';
import MainLayout from './layouts/mainlayout.vue';
import Home from './views/Home.vue';
import About from './views/About.vue';
import DashblocksShowcase from './views/DashblocksShowcase.vue';
Expand All @@ -10,13 +10,15 @@ import ChartJsShowcase from './views/ChartJsShowcase.vue';
import Dygraphs from './views/Dygraphs.vue';
import Mdi from './views/mdi.vue';

import Login from './pages/login.vue';

Vue.use(Router);

export default new Router({
routes: [
{
path: '/',
component: DefaultLayout,
component: MainLayout,
children: [
{
path: '',
Expand Down Expand Up @@ -49,6 +51,10 @@ export default new Router({
component: MaterialIcons
}
]
},
{
path: '/login',
component: Login
}
]
});
5 changes: 0 additions & 5 deletions src/styles/ubbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@

.ub-row.ub-box-fixed {
flex: 0 0 auto;
/* The above is shorthand for:
flex-grow: 0,
flex-shrink: 0,
flex-basis: auto
*/
width: 100%;
}

Expand Down

0 comments on commit c22b84c

Please sign in to comment.