mirror of
https://github.com/urbit/shrub.git
synced 2024-12-13 16:03:36 +03:00
login / out
This commit is contained in:
parent
9b2ad6358b
commit
f0efeb068a
@ -316,7 +316,7 @@
|
||||
})
|
||||
}
|
||||
urb.away = function(){req("/~/auth.json?DELETE", {},
|
||||
function(){document.write("success!")}
|
||||
function(){document.getElementById("c").innerHTML = "<p>Goodbye.</p>" }
|
||||
)}
|
||||
'''
|
||||
--
|
||||
@ -324,19 +324,25 @@
|
||||
|%
|
||||
++ login-page
|
||||
%+ titl 'Log in'
|
||||
;= ;p: Identify yourself, ~;{span#ship(contenteditable "")}?
|
||||
;style:'#ship {background: lightgray} #ship br {display: none}'
|
||||
;input#pass(onchange "urb.submit()");
|
||||
;pre:code#err;
|
||||
;script@"/~/at/~/auth.js";
|
||||
;= ;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}.
|
||||
;button#act(onclick "urb.away()"): Log out
|
||||
;pre:code#err;
|
||||
;script@"/~/at/~/auth.js";
|
||||
;= ;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
|
||||
|
136
main/lib/base.css
Normal file
136
main/lib/base.css
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user