This commit is contained in:
Philip C Monk 2015-04-08 14:28:02 -04:00
commit 41cb6dcb76
2 changed files with 152 additions and 10 deletions

View File

@ -316,7 +316,7 @@
})
}
urb.away = function(){req("/~/auth.json?DELETE", {},
function(){document.write("success!")}
function(){document.getElementById("c").innerHTML = "<p>Goodbye.</p>" }
)}
'''
--
@ -324,20 +324,26 @@
|%
++ login-page
%+ titl 'Log in'
;= ;p: Identify yourself, ~;{span#ship(contenteditable "")}?
;style:'#ship {background: lightgray} #ship br {display: none}'
;= ;div#c
;p: Please log in.
;p.mono: ~;{span#ship(contenteditable "")}
;input#pass(onchange "urb.submit()");
;pre:code#err;
;script@"/~/at/~/auth.js";
==
;link(rel "stylesheet", href "/main/lib/base.css");
==
::
++ logout-page
%+ titl 'Log out'
;= ;p: Goodbye ~;{span#ship}.
;= ;div#c
;p: Goodbye ~;{span#ship}.
;button#act(onclick "urb.away()"): Log out
;pre:code#err;
;script@"/~/at/~/auth.js";
==
;link(rel "stylesheet", href "/main/lib/base.css");
==
::
++ poke-test
%+ titl 'Poke'

136
main/lib/base.css Normal file
View File

@ -0,0 +1,136 @@
@font-face {
font-family: "bau";
src: url("http://storage.googleapis.com/urbit-extra/bau.woff");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "bau";
src: url("http://storage.googleapis.com/urbit-extra/bau-italic.woff");
font-weight: 400;
font-style: italic;
}
@font-face {
font-family: "bau";
src: url("http://storage.googleapis.com/urbit-extra/bau-medium.woff");
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: "bau";
src: url("http://storage.googleapis.com/urbit-extra/bau-mediumitalic.woff");
font-weight: 500;
font-style: italic;
}
@font-face {
font-family: "bau";
src: url("http://storage.googleapis.com/urbit-extra/bau-bold.woff");
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: "bau";
src: url("http://storage.googleapis.com/urbit-extra/bau-bolditalic.woff");
font-weight: 600;
font-style: italic;
}
@font-face {
font-family: "bau";
src: url("http://storage.googleapis.com/urbit-extra/bau-super.woff");
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: "bau";
src: url("http://storage.googleapis.com/urbit-extra/bau-superitalic.woff");
font-weight: 600;
font-style: italic;
}
@font-face {
font-family: "scp";
src: url("http://storage.googleapis.com/urbit-extra/scp-extralight.woff");
font-weight: 200;
font-style: normal;
}
@font-face {
font-family: "scp";
src: url("http://storage.googleapis.com/urbit-extra/scp-light.woff");
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: "scp";
src: url("http://storage.googleapis.com/urbit-extra/scp-regular.woff");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "scp";
src: url("http://storage.googleapis.com/urbit-extra/scp-medium.woff");
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: "scp";
src: url("http://storage.googleapis.com/urbit-extra/scp-bold.woff");
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: "scp";
src: url("http://storage.googleapis.com/urbit-extra/scp-black.woff");
font-weight: 700;
font-style: normal;
}
html,
input,
button,
body {
font-family: "bau";
font-size: 18px;
}
pre,
code,
.mono {
font-family:"scp";
}
#c {
width: 24rem;
position: absolute;
left: 50%;
margin-left: -12rem;
}
#c pre {
font-size: .6rem;
}
#pass {
width: 24rem;
}
button {
border: .3rem solid #000;
background-color: #fff;
font-size: 1rem;
padding: .3rem;
font-weight: 500;
}
#ship,
input {
font-family: "scp";
display: inline;
border: none;
background-color: #f5f5f5;
padding: .3rem;
outline: none;
}
#ship:focus,
input:focus {
background-color: #eee;
}