update compiled code, login look and feel

This commit is contained in:
Galen Wolfe-Pauly 2016-01-27 15:01:05 -08:00
parent 0c9da59537
commit 02b069d94a
5 changed files with 843 additions and 1475 deletions

View File

@ -421,12 +421,15 @@
{ship:urb.ship,code:null},
function(){urb.redir()})
}
urb.submit = function(){
if(urb.ship !== $ship.text().toLowerCase())
return urb.redir($ship.text().toLowerCase()) // XX redundant?
urb.is_me = function(ship) {
return (urb.ship === ship)
}
urb.submit = function(ship,pass){
if(!urb.is_me(ship))
return urb.redir(ship)
req(
"/~/auth.json?PUT",
{ship:$ship.text().toLowerCase(), code:pass.value},
{ship:ship, code:pass},
function(){
if(urb.foreign) urb.redir()
else document.location.reload()
@ -457,15 +460,23 @@
++ xml
|%
++ login-page
%+ titl 'Log in :urbit'
;= ;h1: Please log in
;p.ship
;div.sig: ~
;span#ship(contenteditable "");
%+ titl 'Sign in - Urbit'
;= ;div.container
;div.row
;div.col-md-2
;h1.sign: Sign in
==
;input#pass(type "password");
;h2.advice: (Your login code has been printed to your console.)
;div.col-md-8
;p.ship
;label.sig: ~
;input#ship.mono(contenteditable "", placeholder "planet");
==
;input#pass.mono(type "password", placeholder "passcode");
;h2.advice: Your passcode code has been printed to your console.
;pre:code#err;
==
==
==
;script@"/~/at/~/auth.js";
;script:'''
$(function() {
@ -473,8 +484,8 @@
$pass = $('#pass')
$ship.on('keydown', function(e) {
if(e.keyCode === 13 || e.keyCode === 9) {
if(urb.ship !== $ship.text().toLowerCase())
urb.redir($ship.text().toLowerCase())
if(!urb.is_me($ship.val().toLowerCase()))
urb.redir($ship.val().toLowerCase())
$pass.show()
$pass.focus()
e.preventDefault()
@ -485,11 +496,11 @@
})
$pass.on('keydown', function(e) {
if(e.keyCode === 13) {
urb.submit()
urb.submit($ship.val().toLowerCase(),$pass.val())
}
})
if(window.ship) {
$ship.text(urb.ship)
$ship.val(urb.ship)
$pass.focus()
} else {
$pass.hide()
@ -530,7 +541,8 @@
;title:"{(trip a)}"
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/".
"libs/jquery/2.1.1/jquery.min.js");
;link(rel "stylesheet", href "/home/lib/base.css");
;link(rel "stylesheet", href "/home/lib/css/fonts.css");
;link(rel "stylesheet", href "/home/lib/css/bootstrap.css");
==
;body:div#c:"*{b}"
==

880
lib/css/bootstrap.css vendored

File diff suppressed because it is too large Load Diff

View File

@ -9,38 +9,51 @@ ul.grams {
list-style-type: none;
padding: 0; }
label.public {
background-color: #A100FE;
div.meta label {
background-color: #B1B7BD;
margin-right: 1rem;
height: 1rem;
width: 1rem;
text-align: center; }
label.public:before {
content: '%';
div.meta label:before {
content: attr(data-glyph);
color: #fff;
font-family: 'scp';
font-size: .8rem;
font-weight: 500;
line-height: 1rem;
vertical-align: middle; }
div.meta > label,
div.meta > h2,
div.meta > div {
div.meta label,
div.meta h2,
div.meta h3 {
display: inline-block; }
h2.author {
div.meta h2,
div.meta h3 {
font-family: 'scp';
font-size: .8rem;
font-weight: 400;
margin-top: 0; }
margin-top: 0;
padding-top: 0; }
div.meta h3 {
margin-left: 2rem; }
div.meta .time {
padding-right: 2rem; }
.gram.same div.meta {
li.gram.same div.meta {
display: none; }
li.gram.same:hover div.meta {
display: block;
position: absolute;
background-color: #fff;
margin-top: -2.5rem;
padding-top: 1rem; }
.speech {
margin-left: 2rem; }
@media (max-width: 767px) {
label.public {
div.meta > label {
margin-right: 9px; } }
.input {
border-bottom: 3px solid #000;
@ -49,20 +62,34 @@ h2.author {
font-size: 1rem;
padding: 0 .2rem;
min-width: 1rem;
min-height: 1rem; }
min-height: 1rem;
outline: none; }
.audience,
.message {
margin-left: 2rem; }
.audience {
margin-bottom: 2rem; }
.audience .input {
border-color: #373a3c;
border-color: #B1B7BD;
font-family: 'scp'; }
.message {
display: inline-block; }
.message .input {
border-color: #B1B7BD;
border-color: #373a3c;
font-family: 'bau'; }
.message {
margin-bottom: 6rem; }
.length {
display: inline-block;
margin-left: 2rem;
line-height: 2rem;
font-family: 'bau';
font-size: .7rem;
font-weight: 500;
letter-spacing: 1px; }
/*# sourceMappingURL=main.css.map */

View File

@ -1,403 +1,3 @@
a {
cursor: pointer; }
ul {
padding: 0; }
button:focus {
outline: none; }
h1,
h2,
h3 {
padding-top: 2rem; }
h1:first-of-type {
padding-top: 0; }
pre {
background-color: #f7f7f7;
margin-left: -.3rem;
padding-left: .3rem; }
.container {
padding-top: 3rem;
padding-bottom: 9rem; }
@media (max-width: 767px) {
.container {
padding-top: 0; } }
.close {
font-weight: 300;
font-size: 1rem;
text-shadow: none;
opacity: 1; }
@media (max-width: 767px) {
h1 {
font-size: 2rem;
line-height: 3rem; }
h2 {
font-size: 1.6rem; } }
.planet,
.room {
font-family: 'scp'; }
.body {
padding-left: 0; }
@media (max-width: 767px) {
.body {
padding-left: 0.9375rem;
margin-top: 4rem; } }
.action {
margin-top: 1rem;
font-weight: 500;
letter-spacing: 1px; }
.action > label {
margin-right: 0.9375rem;
line-height: 1rem; }
.action.create > label {
width: 16px;
height: 16px;
border-radius: 50%;
background-color: transparent;
border: 3px solid #000;
vertical-align: middle; }
.action.add > label:before {
content: "+";
font-size: 1.3rem;
font-weight: 500; }
.nav.container {
position: fixed;
left: 50%;
width: 100%;
padding-top: 0;
z-index: 100; }
@media (min-width: 544px) {
.nav.container {
margin-left: -288px; } }
@media (min-width: 768px) {
.nav.container {
margin-left: -360px; } }
@media (min-width: 992px) {
.nav.container {
margin-left: -470px; } }
@media (min-width: 1200px) {
.nav.container {
margin-left: -570px; } }
@media (max-width: 767px) {
.nav.container {
left: 0;
top: 0; } }
.ctrl,
.menu .contents {
padding-top: 3rem; }
.ctrl {
padding-left: 1.875rem; }
.ctrl ul.nav {
margin-top: 2rem;
overflow: hidden; }
.ctrl ul.nav:hover {
overflow: visible; }
.ctrl a.nav-link:hover {
text-decoration: underline; }
.ctrl a.nav-link {
letter-spacing: 1px; }
.ctrl .selected a.nav-link {
font-weight: 500;
letter-spacing: 0; }
@media (max-width: 991px) {
ul.nav {
line-height: 1.3rem; }
a.nav-link {
font-size: .8rem; } }
@media (max-width: 767px) {
.ctrl {
position: relative;
max-height: 3rem;
padding-top: 1rem;
background-color: #fff;
overflow: hidden;
border-bottom: 1px solid #000;
-webkit-transition: max-height 0.6s ease-in-out;
-moz-transition: max-height 0.6s ease-in-out;
transition: max-height 0.6s ease-in-out; }
ul.nav {
line-height: 2rem;
margin-bottom: 2rem; }
a.nav-link {
font-size: 1rem; }
.ctrl.open {
max-height: 25rem; }
.ctrl.open ul.nav {
max-height: 9rem;
overflow-y: scroll; }
ul.nav {
margin-top: 1rem; } }
.navbar-toggler {
transition: opacity .2s, transform .3s;
-webkit-transition: opacity .2s, transform .3s; }
.navbar-toggler.open {
transform: rotate(0.25turn);
opacity: .2; }
@media (min-width: 768px) {
.ctrl .navbar-toggler {
display: none; }
.ctrl .navbar-toggler.show {
display: inherit;
padding: 0;
margin-left: 2px; } }
@media (max-width: 991px) {
.navbar-toggler {
font-size: 1rem;
margin-left: 0; } }
@media (max-width: 767px) {
.navbar-toggler {
padding: 0; } }
.icon div {
display: inline-block;
margin-right: .6rem; }
.icon .home {
margin: 6px 9px 12px 0;
width: 24px;
height: 24px;
border-radius: 50%;
background-color: transparent;
border: 6px solid #B1B7BD; }
.icon .dpad {
display: block; }
.icon .up {
width: 1px;
height: 1px;
border: 12.0006px solid transparent;
border-bottom: 18px solid #000;
border-top: 0 solid transparent; }
.icon .prev {
width: 1px;
height: 1px;
border: 12.0006px solid transparent;
border-right: 18px solid #000;
border-left: 0 solid transparent;
margin-right: 0.6rem; }
.icon .next {
width: 1px;
height: 1px;
border: 12.0006px solid transparent;
border-left: 18px solid #000;
border-right: 0 solid transparent; }
@media (max-width: 991px) {
.icon > div {
display: inline-block;
margin-right: .6rem;
vertical-align: middle; }
.icon .dpad {
display: inline; }
.icon .home {
width: 18px;
height: 18px;
border-radius: 50%;
background-color: transparent;
border-width: 4px; }
.icon .up {
width: 1px;
height: 1px;
border: 8.0004px solid transparent;
border-bottom: 12px solid #000;
border-top: 0 solid transparent;
margin-left: 1px; }
.icon .prev {
width: 1px;
height: 1px;
border: 8.0004px solid transparent;
border-right: 12px solid #000;
border-left: 0 solid transparent;
margin-right: 0.6rem; }
.icon .next {
width: 1px;
height: 1px;
border: 8.0004px solid transparent;
border-left: 12px solid #000;
border-right: 0 solid transparent; } }
@media (max-width: 767px) {
.icon {
margin-left: 0; }
.icon .home {
margin-top: 0;
margin-bottom: 0; } }
.menu {
padding-left: 0;
padding-right: 0;
overflow: hidden; }
.menu .contents {
padding-left: 0.9375rem;
padding-right: 0.9375rem;
padding-bottom: 6rem;
position: relative;
left: -100%;
-webkit-transition: left 0.3s ease-in-out;
-moz-transition: left 0.3s ease-in-out;
transition: left 0.3s ease-in-out; }
.menu .close {
margin-top: -2rem; }
.menu h2 {
font-size: 1rem;
padding-top: 3rem; }
.menu h2:first-of-type {
padding-top: 0; }
.menu label.sum {
font-family: 'scp';
margin-left: 0.9375rem;
font-size: 1.2rem; }
.menu .name,
.menu .planet {
display: inline-block; }
.menu .name,
.menu .planet,
.menu .room {
font-size: .8rem; }
.menu .name {
min-width: 33.333%;
font-size: .9rem; }
.menu .planet {
min-width: 66.667%; }
.menu.depth-1 .contents {
background-color: #f7f7f9;
border-left: 2px solid #B1B7BD; }
.menu.depth-2 .contents {
background-color: #eceeef;
border-left: 2px solid #B1B7BD; }
.menu.open .contents {
left: 0; }
@media (max-width: 767px) {
.menu {
height: 100%;
padding-left: 0.9375rem; }
.menu .contents {
left: inherit;
top: -100%;
padding-top: 0.9375rem;
-webkit-transition: top 0.3s ease-in-out;
-moz-transition: top 0.3s ease-in-out;
transition: top 0.3s ease-in-out; }
.menu .close {
margin-top: 0; }
.menu.open .contents {
top: 0; } }
.app {
vertical-align: top;
font-size: 1.3rem;
font-weight: 500;
line-height: 1.3rem;
margin-top: 9px; }
@media (max-width: 991px) {
.app {
font-size: 1rem;
margin-top: 6px; } }
@media (max-width: 767px) {
.app {
margin-top: 0;
line-height: 1rem; } }
.context {
margin-top: 1rem; }
.context .name {
font-weight: 300;
font-size: 1.2rem;
font-family: 'scp'; }
@media (max-width: 991px) {
.context .name {
font-size: 1rem; } }
@media (max-width: 767px) {
.context {
line-height: 1rem;
margin-bottom: 1rem; } }
div.meta {
display: inline-block; }
ul.grams {
list-style-type: none;
padding: 0; }
label.public {
background-color: #A100FE;
margin-right: 1rem;
height: 1rem;
width: 1rem;
text-align: center; }
label.public:before {
content: '%';
color: #fff;
font-family: 'scp';
font-size: .8rem;
font-weight: 500;
line-height: 1rem;
vertical-align: middle; }
div.meta > label,
div.meta > h2,
div.meta > div {
display: inline-block; }
h2.author {
font-family: 'scp';
font-size: .8rem;
font-weight: 400;
margin-top: 0; }
.gram.same div.meta {
display: none; }
@media (max-width: 767px) {
label.public {
margin-right: 9px; } }
.input {
border-bottom: 3px solid #000;
display: inline-block;
line-height: 2rem;
font-size: 1rem;
padding: 0 .2rem;
min-width: 1rem;
min-height: 1rem; }
.audience {
margin-bottom: 2rem; }
.audience .input {
border-color: #373a3c;
font-family: 'scp'; }
.message .input {
border-color: #B1B7BD;
font-family: 'bau'; }
.message {
margin-bottom: 6rem; }
img.logo {
height: 2rem;
width: 2rem; }
@ -408,13 +8,18 @@ img.logo.first {
.short {
width: 75%; }
.loading {
.loading:before {
font-family: 'scp';
background-color: #000;
color: #fff;
padding: .6rem;
font-size: 1rem;
padding: 0;
margin: 0;
width: 1.6rem;
height: 1.6rem;
text-align: center;
font-size: .8rem;
display: block;
font-weight: 600;
letter-spacing: 0.1rem;
z-index: 3; }
.loading.state-0:before {
@ -433,8 +38,7 @@ img.logo.first {
position: fixed;
left: 50%;
width: 100%;
padding-top: 0;
z-index: 100; }
padding-top: 0; }
@media (min-width: 544px) {
.nav.container {
margin-left: -288px; } }
@ -450,14 +54,26 @@ img.logo.first {
@media (max-width: 767px) {
.nav.container {
left: 0;
top: 0; } }
top: 0; }
.nav.container.m-down,
.nav.container.m-up {
position: absolute; }
.nav.container.m-down.m-fixed {
position: fixed; } }
@media (max-width: 543px) {
.nav.container {
left: 0; } }
.ctrl,
.menu .contents {
padding-top: 3rem; }
.ctrl {
padding-left: 0.9375rem; }
padding-left: 0.9375rem;
background-color: #fff;
max-width: 16.66667%;
transition: max-width .2s ease-in-out; }
.ctrl ul.nav {
margin-top: 2rem;
overflow: hidden; }
@ -475,6 +91,11 @@ img.logo.first {
font-weight: 500;
letter-spacing: 0; }
.ctrl.open,
.ctrl:hover {
max-width: 33.33333%;
width: auto; }
@media (max-width: 991px) {
ul.nav {
line-height: 1.3rem; }
@ -485,13 +106,19 @@ img.logo.first {
.ctrl {
position: relative;
max-height: 3rem;
max-width: 100%;
padding-top: 1rem;
background-color: #fff;
overflow: hidden;
border-bottom: 1px solid #000;
-webkit-transition: max-height 0.6s ease-in-out;
-moz-transition: max-height 0.6s ease-in-out;
transition: max-height 0.6s ease-in-out; }
-webkit-transition: max-height 0.2s ease-in-out;
-moz-transition: max-height 0.2s ease-in-out;
transition: max-height 0.2s ease-in-out; }
.ctrl.open,
.ctrl:hover {
width: inherit;
max-width: inherit; }
ul.nav {
line-height: 2rem;
@ -501,36 +128,32 @@ img.logo.first {
font-size: 1rem; }
.ctrl.open {
max-height: 25rem; }
max-height: 36rem; }
.ctrl.open ul.nav {
max-height: 9rem;
overflow-y: scroll; }
ul.nav {
margin-top: 1rem; } }
@media (max-width: 543px) {
.ctrl {
padding-left: 1.875rem; } }
.navbar-toggler {
font-size: 24px;
transition: opacity .2s, transform .3s;
-webkit-transition: opacity .2s, transform .3s; }
.navbar-toggler.open {
.open .navbar-toggler {
transform: rotate(0.25turn);
opacity: .2; }
@media (min-width: 768px) {
.ctrl .navbar-toggler {
display: none; }
.ctrl .navbar-toggler.show {
display: inherit;
padding: 0;
margin-left: 2px; } }
@media (max-width: 991px) {
.navbar-toggler {
font-size: 1rem;
margin-left: 0; } }
display: none; } }
@media (max-width: 767px) {
.navbar-toggler {
padding: 0; } }
padding: 0;
margin-left: 2rem; } }
.icon div, .icon a {
display: inline-block; }
.icon a {
@ -594,6 +217,8 @@ img.logo.first {
@media (max-width: 767px) {
.icon {
margin-left: 0; }
.icon .dpad {
display: inline; }
.icon .home {
margin-top: 0;
margin-bottom: 0; } }

File diff suppressed because it is too large Load Diff