Merge branch 'master' of ssh.dev.azure.com:v3/HackKu/HackKu%202020/backend
This commit is contained in:
@@ -2,27 +2,40 @@
|
||||
--input-padding-x: 1.5rem;
|
||||
--input-padding-y: 0.75rem;
|
||||
}
|
||||
|
||||
body {
|
||||
background-image: url('https://images.unsplash.com/photo-1501618669935-18b6ecb13d6d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1464&q=80');
|
||||
background-position: 60% 20%;
|
||||
}
|
||||
@media all and (max-width: 768px) {
|
||||
body {
|
||||
background-image: none;
|
||||
background-color: #F1EFE7;
|
||||
}
|
||||
}
|
||||
.login,
|
||||
.image {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.bg-image {
|
||||
background-image: url('https://source.unsplash.com/4812YdII6W0/2592x1728');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
.name-banner{
|
||||
font-family: 'Merienda', cursive;
|
||||
}
|
||||
|
||||
.login-heading {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.btn-login {
|
||||
font-size: 0.9rem;
|
||||
letter-spacing: 0.05rem;
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: 2rem;
|
||||
border: solid 7px #41403E;
|
||||
align-self: center;
|
||||
background: transparent;
|
||||
padding: 1rem 1rem;
|
||||
-webkit-transition: all .5s ease;
|
||||
transition: all .5s ease;
|
||||
color: #41403E;
|
||||
font-size: 2rem;
|
||||
letter-spacing: 1px;
|
||||
outline: none;
|
||||
box-shadow: 20px 38px 34px -26px rgba(0, 0, 0, 0.2);
|
||||
border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
|
||||
}
|
||||
|
||||
.form-label-group {
|
||||
@@ -92,7 +105,7 @@
|
||||
}
|
||||
|
||||
.form-submit-button {
|
||||
margin-top: 50px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,12 +7,15 @@ const Controller = require('libflitter/controller/Controller')
|
||||
* are used as handlers for routes specified in the route files.
|
||||
*/
|
||||
class Home extends Controller {
|
||||
static get services(){
|
||||
return [...super.services, 'configs']
|
||||
}
|
||||
|
||||
/*
|
||||
* Serve the main welcome page.
|
||||
*/
|
||||
welcome(req, res){
|
||||
|
||||
|
||||
/*
|
||||
* Return the welcome view.
|
||||
* The page() method is added by Flitter and passes some
|
||||
@@ -20,6 +23,10 @@ class Home extends Controller {
|
||||
*/
|
||||
return res.page('welcome', {user: req.user})
|
||||
}
|
||||
async get_login(req, res){
|
||||
const app_name = this.configs.get('app.name')
|
||||
return res.page('login', {app_name})
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Home
|
||||
|
||||
@@ -26,7 +26,6 @@ const index = {
|
||||
* handler's exec() method.
|
||||
*/
|
||||
middleware: [
|
||||
['HomeLogger', {note: 'arguments can be specified as the second element in this array'}],
|
||||
// 'MiddlewareName', // Or without arguments
|
||||
],
|
||||
|
||||
@@ -46,6 +45,7 @@ const index = {
|
||||
// Placeholder for auth dashboard. You'd replace this with
|
||||
// your own route protected by 'middleware::auth:UserOnly'
|
||||
'/dash': [ 'controller::Home.welcome' ],
|
||||
'/login': [ 'middleware::auth:GuestOnly', 'controller::Home.get_login' ],
|
||||
},
|
||||
|
||||
/*
|
||||
|
||||
@@ -4,14 +4,16 @@ html
|
||||
meta(name='viewport' content='width=device-width initial-scale=1')
|
||||
link(rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css')
|
||||
link(rel='stylesheet' href='/assets/auth/forms.css')
|
||||
link(href="https://fonts.googleapis.com/css?family=Merienda:700&display=swap" rel="stylesheet")
|
||||
body
|
||||
.container-fluid
|
||||
.row.no-gutter
|
||||
.d-none.d-md-flex.col-md-6.col-lg-8.bg-image
|
||||
.col-md-6.col-lg-4
|
||||
.d-none.d-md-flex.col-md-5
|
||||
.col-md-5
|
||||
.login.d-flex.align-items-center.py-5
|
||||
.container
|
||||
.row
|
||||
.col-md-9.col-lg-8.mx-auto
|
||||
h2.name-banner #{_app.name}
|
||||
block content
|
||||
script(src='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css')
|
||||
|
||||
87
app/views/login.pug
Normal file
87
app/views/login.pug
Normal file
@@ -0,0 +1,87 @@
|
||||
html
|
||||
head
|
||||
title Flitter
|
||||
meta(name="viewport" content="width=device-width, initial-scale=1")
|
||||
link(rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous")
|
||||
script(src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous")
|
||||
script(src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous")
|
||||
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous")
|
||||
script(src="https://kit.fontawesome.com/5043ba9cc5.js" crossorigin="anonymous")
|
||||
link(href="https://fonts.googleapis.com/css?family=Merienda:700&display=swap" rel="stylesheet")
|
||||
|
||||
style(type="text/css").
|
||||
@import url('https://fonts.googleapis.com/css?family=Rajdhani');
|
||||
html,
|
||||
body {
|
||||
background-color:#343a40;
|
||||
}
|
||||
#intro {
|
||||
margin-top: 10px;
|
||||
color: #cccccc;
|
||||
text-align: center;
|
||||
}
|
||||
#name {
|
||||
font-family: 'Merienda', cursive;
|
||||
}
|
||||
#login {
|
||||
width: 50em;
|
||||
}
|
||||
.login-container {
|
||||
display: grid;
|
||||
color: #cccccc;
|
||||
border: solid 7px #cccccc;
|
||||
align-self: center;
|
||||
background: transparent;
|
||||
-webkit-transition: all .5s ease;
|
||||
transition: all .5s ease;
|
||||
outline: none;
|
||||
box-shadow: 20px 38px 34px -26px rgba(0, 0, 0, 0.2);
|
||||
border-radius: 82px 65px 185px 1085px/72px 225px 58px 15px;
|
||||
}
|
||||
.btn-login {
|
||||
color: #cccccc;
|
||||
border: solid 7px #cccccc;
|
||||
align-self: center;
|
||||
background: transparent;
|
||||
-webkit-transition: all .5s ease;
|
||||
transition: all .5s ease;
|
||||
outline: none;
|
||||
box-shadow: 20px 38px 34px -26px rgba(0, 0, 0, 0.2);
|
||||
border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
|
||||
}
|
||||
.login-container div a {
|
||||
width: 100%;
|
||||
}
|
||||
.icons {
|
||||
font-size: 1.8em;
|
||||
padding: 1em 1em 1em 1em;
|
||||
}
|
||||
|
||||
body
|
||||
.container#intro
|
||||
h1 Hi, Welcome to
|
||||
span#name #{app_name}.
|
||||
h2 Choose your login method.
|
||||
|
||||
.container#login
|
||||
.login-container
|
||||
div
|
||||
a.btn.btn-login.btn-light(href="/auth/flitter/login")
|
||||
i.icons.fas.fa-sign-in-alt
|
||||
span Local Login
|
||||
div
|
||||
a.btn.btn-login.btn-light(href="/auth/github_oauth/login")
|
||||
i.icons.fab.fa-github
|
||||
span Login with GitHub
|
||||
div
|
||||
a.btn.btn-login.btn-light.disabled(href="google.com")
|
||||
i.icons.fab.fa-google
|
||||
span Login with Google
|
||||
div
|
||||
a.btn.btn-login.btn-light.disabled(href="microsoft.com")
|
||||
i.icons.fab.fa-microsoft
|
||||
span Login with Microsoft
|
||||
div
|
||||
a.btn.btn-login.btn-light.disabled(href="apple.com")
|
||||
i.icons.fab.fa-apple
|
||||
span Login with Apple
|
||||
@@ -34,7 +34,7 @@ html
|
||||
font-size: 24pt;
|
||||
color: #00323d;
|
||||
}
|
||||
body
|
||||
body
|
||||
.flitter-container
|
||||
img.flitter-image(src="/assets/flitter.png")
|
||||
a.flitter-name(href="https://flitter.garrettmills.dev/" target="_blank") powered by flitter
|
||||
|
||||
Reference in New Issue
Block a user