From f0efeb068a30872f2faf1886b681cf8cf6b8d6f6 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Tue, 7 Apr 2015 19:02:54 -0700 Subject: [PATCH 1/2] login / out --- arvo/eyre.hoon | 26 +++++---- main/lib/base.css | 136 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+), 10 deletions(-) create mode 100644 main/lib/base.css diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon index d2f7522a12..6df4a55799 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -316,7 +316,7 @@ }) } urb.away = function(){req("/~/auth.json?DELETE", {}, - function(){document.write("success!")} + function(){document.getElementById("c").innerHTML = "

Goodbye.

" } )} ''' -- @@ -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 diff --git a/main/lib/base.css b/main/lib/base.css new file mode 100644 index 0000000000..f342a53dbf --- /dev/null +++ b/main/lib/base.css @@ -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; +} \ No newline at end of file From 56948115ef2e29a870e578dc1aadbe0932605906 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 8 Apr 2015 14:27:51 -0400 Subject: [PATCH 2/2] added :helm+init --- arvo/dill.hoon | 8 ++++++-- main/app/helm/core.hook | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/arvo/dill.hoon b/arvo/dill.hoon index ef98b32eb3..2fccd64976 100644 --- a/arvo/dill.hoon +++ b/arvo/dill.hoon @@ -142,6 +142,7 @@ == :: ++ note-dill :: note to self, odd $% [%crud p=@tas q=(list tank)] :: + [%init p=ship] :: [%text p=tape] :: [%veer p=@ta q=path r=@t] :: install vane [%vega p=path] :: reboot by path @@ -155,7 +156,7 @@ == :: ++ note :: $% [%a note-ames] :: out request $-> - [%c note-clay] + [%c note-clay] :: [%d note-dill] :: [%g note-gall] :: == :: @@ -375,11 +376,14 @@ :_(..^$ [hen %pass ~ (note %a p.q.hic)]~) ?: ?=(%flog -.q.hic) :: ~& [%dill-flog +.q.hic] + ?: ?=([%crud %hax-init [%leaf *] ~] p.q.hic) + =+ him=(slav %p (crip p.i.q.p.q.hic)) + :_(..^$ ?~(hey.all ~ [u.hey.all %give %init him]~)) :_(..^$ ?~(hey.all ~ [u.hey.all %slip %d p.q.hic]~)) =. hey.all ?^(hey.all hey.all `hen) ?: ?=(%init -.q.hic) ?: =(ore.all `p.q.hic) - [~ ..^$] + [[hen %give q.hic]~ ..^$] =: ore.all `p.q.hic dug.all ~ == diff --git a/main/app/helm/core.hook b/main/app/helm/core.hook index 50e55aa921..088a225a47 100644 --- a/main/app/helm/core.hook +++ b/main/app/helm/core.hook @@ -26,7 +26,8 @@ $% [%reload p=(list term)] :: reload vanes == :: ++ dill-flog :: sent to %dill - $% [%veer p=@ta q=path r=@t] :: install vane + $% [%crud p=%hax-init [%leaf p=tape] ~] :: initialize ship + [%veer p=@ta q=path r=@t] :: install vane [%vega p=path] :: reboot by path [%verb ~] :: verbose mode == :: @@ -122,6 +123,13 @@ :_ moz [ost %pass /verb %d %flog %verb ~] == + ++ he-wish-init + |= him=ship + %_ +>.$ + moz + :_ moz + [ost %pass /init %d %flog %crud %hax-init leaf/(scow %p him) ~] + == -- :: ++ hake :: poke core @@ -139,6 +147,11 @@ ~& %poke-helm-verb he-abet:he-wish-verb:(hake ost her) :: +++ poke-helm-init + |= [ost=bone her=ship him=ship] + ~& %poke-helm-init + he-abet:(he-wish-init:(hake ost her) him) +:: ++ poke-helm-reload |= [ost=bone her=ship all=(list term)] ~& %poke-helm-reload