landscape sign in page

This commit is contained in:
Anthony Arroyo 2019-03-16 19:06:40 -07:00
parent 2092ee3cba
commit 516052c750

View File

@ -518,28 +518,52 @@
==
::
++ login-page
%+ titl 'Sign in - Urbit'
;= ;div.container.top
%+ titl 'Login - Landscape'
;=
;div.header-container.container
;div.row
;div.flex-col-x.header-breadcrumbs;
==
;div.row.align-center.header-mainrow
;div.flex-col-2.justify-end;
;h1.flex-col-x.header-title: Login
==
==
;div.container
;div.row
;div.flex-col-2;
;div.flex-col-x
;div.row.mt-10
;h3.col-md-12: Ship
==
;div.row
;div.col-md-4
;h1.sign: Sign in
==
;div.col-md-8
;p.ship
;label.sig: ~
;input#ship.mono(contenteditable "", placeholder "your-urbit");
==
;input#pass.mono(type "password", placeholder "passcode");
;h2.advice: Type +{;code:("+code")} in your dojo for your passcode.
;pre:code#err;
;input#ship.col-md-10.h3.text-500.collection-title(placeholder "your-ship", contenteditable "");
==
;div.row.mt-5
;h3.col-md-12
; Type
;span.text-mono.mr-1: +code
; in your terminal and press enter
==
==
;div.row
;input#pass.col-md-10.h3.mono.text-500.collection-title(type "password", placeholder "passcode");
==
;div.row.mt-5
;button#login.btn-primary.btn(disabled "true"): Login
==
;div.row.mt-5
;pre#err;
==
==
==
==
;script@"/~/at/~/auth.js";
;script:'''
$(function() {
$ship = $('#ship')
$pass = $('#pass')
$login = $('#login')
$ship.on('keydown', function(e) {
if(e.keyCode === 13 || e.keyCode === 9) {
if(!urb.is_me($ship.val().toLowerCase()))
@ -549,14 +573,23 @@
e.preventDefault()
}
})
$ship.on('focus', function(e) {
$pass.hide()
})
$pass.on('keydown', function(e) {
if(e.keyCode === 13) {
urb.submit($ship.val().toLowerCase(),$pass.val())
$pass.on('keypress', function(e) {
if($pass.val().length > -1) {
$login.prop('disabled', false)
} else {
$login.prop('disabled', true)
}
})
$pass.on('paste', function(e) {
if($pass.val().length > -1) {
$login.prop('disabled', false)
} else {
$login.prop('disabled', true)
}
})
$login.on('click', function(e) {
urb.submit($ship.val().toLowerCase(),$pass.val())
})
if(window.ship) {
$ship.val(urb.ship)
$pass.focus()
@ -605,8 +638,7 @@
;title:"{(trip a)}"
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/".
"libs/jquery/2.1.1/jquery.min.js");
;link(rel "stylesheet", href "/===/web/lib/css/fonts.css");
;link(rel "stylesheet", href "/===/web/lib/css/bootstrap.css");
;link(rel "stylesheet", href "/===/web/landscape/css/index.css");
==
;body:"*{b}"
==