From cc3733e6d4cb3e259e10e6da806f3ca773f4f7ce Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 11 Aug 2014 00:47:46 -0700 Subject: [PATCH] Various mainly stylistic improvements. --- arvo/eyre.hoon | 1 + main/app/twit/{main.js => app.js} | 0 main/app/twit/core.hook | 36 ++++++++++++++------------- main/app/twit/{main.css => style.css} | 0 main/mar/css/door.hook | 7 +++++- main/mar/js/door.hook | 7 +++++- 6 files changed, 32 insertions(+), 19 deletions(-) rename main/app/twit/{main.js => app.js} (100%) rename main/app/twit/{main.css => style.css} (100%) diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon index 172c37f59..69a6cc413 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -1191,6 +1191,7 @@ if(cb) { xhr.onload = function() { + console.log("response text" + this.responseText); cb(null,{ status:this.status, data:JSON.parse(this.responseText) diff --git a/main/app/twit/main.js b/main/app/twit/app.js similarity index 100% rename from main/app/twit/main.js rename to main/app/twit/app.js diff --git a/main/app/twit/core.hook b/main/app/twit/core.hook index 07c1d9d28..48bfa56a2 100644 --- a/main/app/twit/core.hook +++ b/main/app/twit/core.hook @@ -1,14 +1,23 @@ -:: A simple Twitter proxy. +:: A simple Twitter proxy. :: :::: /hook/core/twit/app :: /? 314 :: need urbit 314 /+ twitter :: use twitter library +/= resource :: resource tree + /. /= style /:/%%/style:/hymn/ :: stylesheet (css) + /= application /:/%%/app:/hymn/ :: application (js) + /= library /:/===/lib/urb:/hymn/ :: library (js) + == :: :: :::: structures :: |% :: structures - ++ axle ,@t :: application state + ++ axle :: application state + ,@t + :: $: %0 :: revision 0 + :: tul=(unit json) :: + :: == ++ gilt :: subscription frame $% [%json p=json] :: json data [%html p=@t] :: html text @@ -51,14 +60,6 @@ |= old=(unit) ~& %hose-state [~ +>] -:: -++ root :: internal location - /(scot %p our.hid)/main/(scot %da lat.hid)/app/[app.hid] -:: -++ incl :: include scripts - |= wal=wall - %+ turn wal - |= tape ;script(type "text/javascript", src +<); :: ++ peer :: accept subscriber |= [ost=bone you=ship pax=path] @@ -79,7 +80,6 @@ ?- -.jop %tweet ~& [%poke-tweet-path /tweet/(scot %ud ost)] - :~ [ost %pass /tweet/(scot %ud ost) %e [%them (some (posl jon))]] [ost %give %nice ~] == @@ -93,11 +93,13 @@ ^- manx ;html ;head - ;style:"{(trip ;;(,@ .^(%cx (welp root /main/css))))}" - ;* %- incl :~ - "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js" - == ;title: Urbit - Twitter Test + ;+ style.resource + ;script + =type "text/javascript" + =src "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js" + ; + == == ;body ;div#c @@ -112,8 +114,8 @@ ;div#time; == == - ;script:"{(trip ;;(,@ .^(cx/(welp (scag 3 `path`root) /lib/urb/js))))}" - ;script:"{(trip ;;(,@ .^(%cx (welp root /main/js))))}" + ;+ library.resource + ;+ application.resource == == :: diff --git a/main/app/twit/main.css b/main/app/twit/style.css similarity index 100% rename from main/app/twit/main.css rename to main/app/twit/style.css diff --git a/main/mar/css/door.hook b/main/mar/css/door.hook index 19aab981b..610a305d7 100644 --- a/main/mar/css/door.hook +++ b/main/mar/css/door.hook @@ -1,3 +1,8 @@ |_ mud=@t -++ grow |% ++ mime [/text/css (taco mud)] -- +++ grow + |% ++ mime [/text/css (taco mud)] + ++ hymn ;style + ;- (trip mud) + == + -- -- diff --git a/main/mar/js/door.hook b/main/mar/js/door.hook index e31dc72fc..98d40b7b8 100644 --- a/main/mar/js/door.hook +++ b/main/mar/js/door.hook @@ -1,3 +1,8 @@ |_ mud=@t -++ grow |% ++ mime [/application/javascript (taco mud)] -- +++ grow + |% ++ mime [/application/javascript (taco mud)] + ++ hymn ;script + ;- (trip mud) + == + -- --