Merge remote-tracking branches 'philipcmonk/vale-short-circuit', 'ohaitch/urle-in-earn' and 'ohaitch/tree-includes'

short circuit validating hoon files from ames
fix #126: url path elements not being escaped
Tree performance improvements
This commit is contained in:
Raymond Pasco 2016-05-12 12:28:23 -04:00
commit 0949b6221f
14 changed files with 10204 additions and 369 deletions

View File

@ -1075,6 +1075,13 @@
!!
==
::
++ vale-page
|= a/page
^- silk
?. ?=($hoon p.a) [%vale a]
?. ?=(@t q.a) [%dude |.(>%weird-hoon<) %ride [%fail ~] %$ *cage]
[%$ p.a [%atom %t ~] q.a]
::
++ validate-x
|= {car/care cas/case pax/path peg/page}
^+ +>
@ -1082,7 +1089,7 @@
:* hen %pass
[%foreign-x (scot %p our) (scot %p her) syd car (scot cas) pax]
%f %exec our ~ [her syd cas]
[%vale peg]
(vale-page peg)
==
::
++ take-foreign-x
@ -1109,8 +1116,9 @@
%+ turn (~(tap in pop))
|= a/plop
?- -.a
$delta [[%$ %blob !>([%delta p.a q.a *page])] [%vale p.r.a q.r.a]]
$direct [[%$ %blob !>([%direct p.a *page])] [%vale p.q.a q.q.a]]
$direct [[%$ %blob !>([%direct p.a *page])] (vale-page p.q.a q.q.a)]
$delta
[[%$ %blob !>([%delta p.a q.a *page])] (vale-page p.r.a q.r.a)]
==
==
::

View File

@ -217,8 +217,8 @@
|= {urb/json jaz/cord} ^- cord
=- (cat 3 (crip -) jaz)
"""
var _urb = {(pojo urb)}
window.urb = window.urb || \{}; for(k in _urb) window.urb[k] = _urb[k]
var _urb = {(pojo urb)};
window.urb = window.urb || \{}; for(k in _urb) window.urb[k] = _urb[k];
"""
::

View File

@ -1287,7 +1287,7 @@
|= pok/pork ^- tape
?~ q.pok ~
|-
=+ seg=(trip i.q.pok)
=+ seg=(urle (trip i.q.pok))
?~ t.q.pok
?~(p.pok seg (welp seg '.' (trip u.p.pok)))
(welp seg '/' $(q.pok t.q.pok))

View File

@ -10,7 +10,8 @@
urb.waspAll = function(sel){
[].map.call(document.querySelectorAll(sel), urb.waspElem)
}
if(urb.wasp){urb.waspAll('script'); urb.waspAll('link')}
urb.waspAll('script'); urb.waspAll('link')
'''
++ grow :: convert to
|%
@ -21,18 +22,22 @@
;html
;head
;meta(charset "utf-8", urb_injected "");
;* ?~ dep ~
:~ ;script@"/~/on/{<dep>}.js"(urb_injected "");
;script(urb_injected "")
;- (trip urb-wasp-data-js)
;- "urb.waspData({(pojo %s (scot %uv dep-bod))})"
==
==
;* hed
==
;body
;* bod
;script(urb_injected ""):"{(trip linked-deps-js)}"
;* ?~ dep ~
:~ ;script@"/~/on/{<dep>}.js"(urb_injected "", async "", onload "setTimeout(urb.onDep,2000)");
;script(urb_injected "")
;- (trip urb-wasp-data-js)
; window.urb = window.urb || \{}
; urb.onDep = function()\{
; urb.waspDeps();
; urb.waspData({(pojo %s (scot %uv dep-bod))});
;- (trip linked-deps-js)
; }
==
==
==
==
--

View File

@ -1,7 +1,10 @@
// debugging
urb.verb = false
urb.sources = {}
urb.deps.map(function(a){urb.sources[a] = "dep"})
urb.waspDeps = function(){
urb.deps.map(function(a){urb.sources[a] = "dep"})
}
urb.waspElem = function(ele){
url = ele.src || ele.href

View File

@ -3,7 +3,10 @@
::
/? 310
/= dat /% /tree-json/ :: default include
/= dat-sen /| /: /%%/ /% /tree-json/ :: default include
/~ ~
==
^- marl
;= ;script(type "text/javascript"): window.tree = {(pojo (joba %data dat))}
;= ;script(type "text/javascript"): window.tree = {(pojo (jobe data+dat sein+dat-sen ~))}
;div#tree;
==

View File

@ -9,31 +9,53 @@
|= gas/epic ^- ? :: check that the fcgi
%+ lien (~(tap in (~(get ju aut.ced.gas) %$))) :: has an identity
|=(a/knot !=(%pawn (clan (slav %p a)))) :: which isn't a comet
/= dbg
/^ {nopack/? nomin/?}
/$ %+ cork fuel :: after parsing params,
|= gas/epic ^- {? ?} :: check if the query
:- (~(has by qix.gas) 'dbg.nopack') :: dictates separate files
(~(has by qix.gas) 'dbg.nomin') :: and/or unminified assets
::
|%
++ cdnjs
|=(a/tape "//cdnjs.cloudflare.com/ajax/libs/{a}{?:(nomin.dbg "" ".min")}.js")
--
!:
::::
::
^- marl
;= ;title: Tree
;meta(name "viewport", content "width=device-width, initial-scale=1");
;link(type "text/css", rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.min.css");
;link(type "text/css", rel "stylesheet", href "/lib/css/fonts.css");
;link(type "text/css", rel "stylesheet", href "/lib/css/bootstrap.css");
;link(type "text/css", rel "stylesheet", href "/lib/css/codemirror.css");
;link(type "text/css", rel "stylesheet", href "/tree/main.css");
:: ;link(type "text/css", rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.min.css");
;* ?. nopack.dbg
:_ ~
;link(type "text/css", rel "stylesheet", href "/tree/main_codemirror_fonts_bootstrap.css");
:: ;link(type "text/css", rel "stylesheet", href "/tree/main_codemirror_bootstrap.css");
;=
;link(type "text/css", rel "stylesheet", href "/lib/css/fonts.css");
;link(type "text/css", rel "stylesheet", href "/lib/css/bootstrap.css");
;link(type "text/css", rel "stylesheet", href "/lib/css/codemirror.css");
;link(type "text/css", rel "stylesheet", href "/tree/main.css");
==
::;link(type "text/css", rel "stylesheet", href "http://localhost:8000/docs/pub/tree/main.css");
;script(type "text/javascript", src "{(cdnjs "jquery/2.1.3/jquery")}");
;script(type "text/javascript", src "{(cdnjs "lodash.js/2.4.1/lodash")}");
;script(type "text/javascript", src "{(cdnjs "react/0.14.6/react")}");
;script(type "text/javascript", src "{(cdnjs "react/0.14.6/react-dom")}");
;script(type "text/javascript", src "{(cdnjs "flux/2.1.1/Flux")}");
:: ;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js");
:: ;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/".
:: "codemirror/4.3.0/mode/markdown/markdown.min.js");
;* ?. nopack.dbg
:_ ~
;script(type "text/javascript", src "{?.(aut "" "/~~")}".
"/~/at/tree/main_urb.js");
:: "/~/at/tree/main_hoon_urb.js");
;=
:: ;script(type "text/javascript", src "/lib/js/hoon.js");
;script(type "text/javascript", src "/tree/main.js");
;script(type "text/javascript", src "{?.(aut "" "/~~")}".
"/~/at/lib/js/urb.js");
==
;link(type "application/rss+xml", rel "alternate", href "{(spud tub)}.rss-xml");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react-dom.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/flux/2.1.1/Flux.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js");
;script(type "text/javascript", src "/lib/js/urb.js");
;script(type "text/javascript", src "/lib/js/hoon.js");
;script(type "text/javascript", src "/tree/main.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/".
"codemirror/4.3.0/mode/markdown/markdown.min.js");
;script(type "text/javascript", src "{?.(aut "" "/~~")}".
"/~/at/lib/js/urb.js");
==

View File

@ -75,7 +75,7 @@
::
[tree .]
^- json
=+ default='spur.t_mime.m_body.r_comt.j_plan.j_beak.t_kids.name.t'
=+ default='spur.t_mime.m_body.r_comt.j_plan.j_beak.t_meta.j_kids_meta.j_head.r'
=+ ^= schem
=+ seh=(fall (~(get by qix.gas) 'q') default)
~|(bad-noun+seh ;;(schema (rash seh read-schem)))

View File

@ -15,26 +15,26 @@ img.logo.first {
margin-bottom: 2rem; }
div.logo {
width: 4rem;
height: 4rem;
background-color: #000;
width: 3rem;
height: 3rem;
background-color: #fff;
display: inline-block;
margin-right: 1rem;
border-radius: 50%;
vertical-align: middle;
margin-top: -.8rem; }
margin-top: -.8rem;
background-color: #000; }
div.logo:before {
content: "~";
color: #FFFFFF;
font-size: 4rem;
color: #B1B7BD;
font-size: 2.6rem;
vertical-align: middle;
line-height: 3rem;
margin-top: .2rem;
text-align: center;
width: 2rem;
display: inline-block;
font-weight: 200; }
display: inline-block; }
div.logo.inverse:before {
color: #fff; }
@ -178,11 +178,7 @@ div.logo.inverse:before {
position: relative;
margin-bottom: 3rem;
padding: 0;
background-color: transparent;
width: auto; }
.ctrl.navbar,
.ctrl.navbar .items {
height: 3rem; }
background-color: transparent; }
.ctrl.navbar .icon,
.ctrl.navbar ul.nav,
.ctrl.navbar li {
@ -234,9 +230,7 @@ div.logo.inverse:before {
width: inherit;
max-width: inherit; }
.ctrl.open {
height: auto;
max-height: 12rem;
min-height: 3rem; }
max-height: 12rem; }
a.nav-link {
font-size: 1rem;
line-height: 1rem;
@ -380,7 +374,8 @@ div.logo.inverse:before {
content: "~";
color: #fff;
line-height: .8rem;
font-size: 1.4rem; }
font-size: 1.4rem;
padding-left: 1px; }
@media (max-width: 991px) {
[data-path^='/docs'] .home:before,
@ -438,6 +433,9 @@ div.logo.inverse:before {
.urbit.navbar.ctrl {
margin-top: 1rem; }
.urbit.navbar.ctrl,
.urbit.navbar.ctrl .items {
height: 3rem; }
.urbit.navbar.ctrl .icon .home {
border-color: #B1B7BD;
background-color: #B1B7BD;
@ -454,16 +452,13 @@ div.logo.inverse:before {
display: inline-block; }
.urbit.navbar.ctrl ul.nav li {
height: 3rem;
vertical-align: middle;
min-width: 0;
margin-right: 2rem; }
vertical-align: middle; }
.urbit.navbar.ctrl ul.nav li a {
text-decoration: none;
color: #000;
color: #B1B7BD;
font-weight: 500;
font-size: 1rem;
border-bottom: 3px solid #000;
margin-top: 1rem; }
line-height: 3rem; }
.urbit.navbar.ctrl ul.nav .btn {
border: 3px solid #000;
margin-top: -3px;
@ -481,8 +476,7 @@ div.logo.inverse:before {
color: #fff; }
.urbit.navbar.ctrl ul.nav li a:hover,
.urbit.navbar.ctrl ul.nav li.selected a {
color: #55595c;
border-color: #55595c; }
color: #000; }
.urbit.navbar.ctrl .subnav ul.nav {
height: 1.5rem; }
.urbit.navbar.ctrl .subnav ul.nav li {
@ -503,60 +497,45 @@ div.logo.inverse:before {
.urbit.home.navbar.ctrl .icon .home:before {
color: #B1B7BD; }
.urbit.home.navbar.ctrl ul li a {
color: #fff;
border-color: #fff; }
.urbit.home.navbar.ctrl ul.nav li a {
color: #f7f7f9; }
@media (max-width: 767px) {
.urbit.home.navbar.ctrl .icon .home {
display: none; }
.urbit.navbar.ctrl {
.urbit.navbar.ctrl .icon {
margin-top: .5rem;
margin-bottom: .5rem; }
.urbit.navbar.ctrl .icon .home {
width: 2rem;
height: 2rem;
margin: 0; }
.urbit.navbar.ctrl .icon .home:before {
font-size: 1.6rem;
line-height: 1.8rem;
width: 1.6rem; }
.urbit.navbar.ctrl .navbar-toggler {
margin-top: .5rem;
margin-left: 1rem; }
.urbit.navbar.ctrl ul.nav,
.urbit.navbar.ctrl .subnav ul.nav {
overflow: visible;
height: auto;
margin: 0;
position: absolute;
border: none; }
.urbit.navbar.ctrl .icon {
margin-top: 1rem;
margin-bottom: .5rem; }
.urbit.navbar.ctrl .icon .home {
width: 18px;
height: 18px;
margin: 0 1rem 0 0; }
.urbit.navbar.ctrl .icon .home:before {
font-size: 1rem;
line-height: .7rem;
width: .6rem; }
.urbit.navbar.ctrl .icon .navbar-toggler {
margin-left: 0; }
.urbit.navbar.ctrl .icon .navbar-toggler,
.urbit.navbar.ctrl .icon .open .navbar-toggler {
opacity: 1; }
.urbit.navbar.ctrl ul.nav,
.urbit.navbar.ctrl .subnav ul.nav {
overflow: visible;
background-color: #fff;
height: auto;
margin-left: -1rem;
padding-left: 1rem;
padding-top: .8rem;
float: left; }
.urbit.navbar.ctrl ul.nav li,
.urbit.navbar.ctrl .subnav ul.nav li {
display: block;
height: 1.5rem; }
.urbit.navbar.ctrl ul.nav li a,
.urbit.navbar.ctrl .subnav ul.nav li a {
line-height: 1.5rem;
margin-top: 0;
color: #000; }
.urbit.navbar.ctrl ul.nav li.btn,
.urbit.navbar.ctrl .subnav ul.nav li.btn {
height: 1.5rem;
border: 0; }
.urbit.navbar.ctrl ul.nav li.btn a,
.urbit.navbar.ctrl .subnav ul.nav li.btn a {
color: #64DE79;
line-height: 1.5rem; } }
margin-left: 3rem;
float: left; }
.urbit.navbar.ctrl ul.nav li,
.urbit.navbar.ctrl .subnav ul.nav li {
display: block;
height: 1.5rem; }
.urbit.navbar.ctrl ul.nav li a,
.urbit.navbar.ctrl .subnav ul.nav li a {
line-height: 1.5rem; }
.urbit.navbar.ctrl ul.nav li.btn,
.urbit.navbar.ctrl .subnav ul.nav li.btn {
height: 1.5rem;
border: 0; }
.urbit.navbar.ctrl ul.nav li.btn a,
.urbit.navbar.ctrl .subnav ul.nav li.btn a {
color: #64DE79;
line-height: 1.5rem; } }
#tree > div > .container {
padding-top: 3rem;
@ -602,26 +581,6 @@ div.logo.inverse:before {
border-bottom: 2px solid #55595c;
margin-left: .6rem; }
ol {
counter-reset: li;
list-style: none;
padding-left: 2rem; }
ol > li {
margin-bottom: 2rem; }
.top ol {
padding-left: 0; }
ol > li:before {
content: counter(li) ".";
counter-increment: li;
text-align: left;
font-weight: 500;
float: left;
margin-right: 1rem;
margin-left: -2rem; }
.body[data-path^='/docs'] h1,
.body[data-path^='/work'] h1 {
color: #000; }
@ -668,199 +627,181 @@ ol > li:before {
padding-top: 0;
margin-bottom: 0; }
.body .urbit {
padding-bottom: 9rem; }
.body .urbit .logo {
background-color: transparent;
border: .3rem solid #fff; }
.body .urbit .logo:before {
line-height: 3.4rem; }
.body .urbit h1 {
color: #000;
line-height: 4rem; }
.body .urbit a.green:hover {
color: #64DE79; }
.body .urbit .container.stack {
margin-bottom: 3rem; }
.body .urbit .container.stack p {
font-size: 1.2rem;
line-height: 2rem; }
.body .urbit .container.stack.six {
margin-top: 12rem;
margin-bottom: 6rem; }
.body .urbit .btn.black {
text-transform: none;
text-decoration: none;
border: 3px solid #000;
letter-spacing: 0;
margin: 0 1rem 1rem 0; }
.body .urbit button.submit:hover,
.body .urbit .btn.black:hover {
background-color: #000;
color: #fff; }
.body .urbit .front {
padding-bottom: 4rem; }
.body .urbit .front h1 {
padding-top: 0; }
.body .urbit .front h1,
.body .urbit .front h1 a {
font-size: 4rem;
line-height: 6rem; }
.body .urbit .image-fs {
height: 44rem;
margin-bottom: 3rem; }
.body .urbit .image-fs .text-container,
.body .urbit .image-fs .image-container {
position: absolute; }
.body .urbit .image-fs .text-container {
display: table;
height: 44rem;
width: 100%;
z-index: 1; }
.body .urbit .image-fs .text-container .text {
display: table-cell;
vertical-align: middle; }
.body .urbit .image-fs .text-container .rect {
margin-left: auto;
margin-right: auto; }
.body .urbit .image-fs .text-container .rect h1 {
padding-bottom: 1rem;
text-align: left; }
@media (min-width: 544px) {
.body .urbit .image-fs .text-container .rect {
width: 480px; } }
@media (min-width: 768px) {
.body .urbit .image-fs .text-container .rect {
width: 600px; } }
@media (min-width: 992px) {
.body .urbit .image-fs .text-container .rect {
width: 783.33333px; } }
@media (min-width: 1200px) {
.body .urbit .image-fs .text-container .rect {
width: 950px; } }
.body .urbit .image-fs .text-container .rect {
padding: 0 30px 0 30px; }
.body .urbit .image-fs .text-container .rect.no-header {
font-weight: 500;
color: #fff;
font-size: 1.4rem; }
.body .urbit .image-fs .text-container .rect.no-header p.email {
font-size: 1rem; }
.body .urbit .image-fs .image-container {
z-index: 0;
height: 44rem;
width: 100%;
overflow: hidden;
background-repeat: no-repeat;
background-position: center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover; }
.body .urbit .image-fs h1 {
text-align: center;
color: #fff; }
.body .urbit .image-fs.first {
margin-top: -9rem; }
.body .urbit .image-fs.first h1 {
padding-bottom: 0; }
.body .urbit .slide {
margin-bottom: 12rem;
position: relative; }
.body .urbit .slide h1 {
padding-bottom: 1rem; }
.body .urbit .slide .pair {
display: table; }
.body .urbit .slide .pair .text,
.body .urbit .slide .pair .image {
display: table-cell;
vertical-align: middle; }
.body .urbit .slide .pair .image.right {
padding-left: 5%; }
.body .urbit .slide .pair .image.left {
padding-right: 5%; }
.body .urbit .slide .pair .text {
width: 75%; }
.body .urbit .slide .pair .image {
width: 20%; }
.body .urbit .slide .pair p:last-child {
margin-bottom: 0; }
.body .urbit .end {
padding: 1rem;
background-color: #64DE79;
color: white;
text-decoration: none;
font-size: 2rem;
font-weight: 500; }
.body .urbit input.email {
font-weight: 500;
background-color: #000;
color: #fff;
font-size: 1rem;
margin-right: 1rem;
border: 3px solid #000;
padding: .375rem 1rem;
margin: 0 1rem 0 0;
line-height: 1.6rem;
vertical-align: top;
margin-bottom: .6rem; }
.body .urbit input.email::-moz-placeholder {
color: #D2D2D2; }
.body .urbit input.email::-webkit-input-placeholder {
color: #D2D2D2; }
.body .urbit button.submit {
text-transform: none;
text-decoration: none;
background-color: #000000;
color: #fff;
font-weight: 500;
letter-spacing: 0; }
.body .urbit .last a {
display: block;
font-weight: 500;
color: #55595c;
.body .urbit .logo {
background-color: #fff; }
.body .urbit h1 {
color: #000;
line-height: 4rem; }
.body .urbit a.green:hover {
color: #64DE79; }
.body .urbit .container.stack {
margin-bottom: 3rem; }
.body .urbit .container.stack p {
font-size: 1.2rem;
line-height: 2rem; }
.body .urbit .last h2 {
padding-top: 0;
padding-bottom: 1rem;
margin-bottom: 0; }
.body .urbit .fade-out {
background: -webkit-linear-gradient(top, rgba(153, 153, 153, 0) 0%, white 100%);
background: linear-gradient(to bottom, rgba(153, 153, 153, 0) 0%, white 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00999999', endColorstr='#ffffff',GradientType=0 );
margin-top: -14rem;
position: absolute;
height: 12rem;
width: 100%; }
.body .urbit .grams {
margin: 2rem 0; }
.body .urbit .grams .gram label {
background-color: #000; }
.body .urbit .grams .gram .speech {
font-size: 1.6rem; }
.body .urbit .grams .gram .iden,
.body .urbit .grams .gram .path {
max-width: 12rem;
white-space: nowrap;
overflow: hidden;
vertical-align: middle; }
.body .urbit .container.stack.six {
margin-top: 12rem;
margin-bottom: 6rem; }
.body .urbit .btn.black {
text-transform: none;
text-decoration: none;
border: 3px solid #000;
letter-spacing: 0;
margin-right: 1rem; }
.body .urbit button.submit:hover,
.body .urbit .btn.black:hover {
background-color: #000;
color: #fff; }
.body .urbit .front {
padding-bottom: 4rem; }
.body .urbit .front h1 {
padding-top: 0; }
.body .urbit .front h1,
.body .urbit .front h1 a {
font-size: 4rem;
line-height: 6rem; }
.body .urbit .image-fs {
height: 44rem;
margin-bottom: 3rem; }
.body .urbit .image-fs .text-container,
.body .urbit .image-fs .image-container {
position: absolute; }
.body .urbit .image-fs .text-container {
display: table;
height: 44rem;
width: 100%;
z-index: 1; }
.body .urbit .image-fs .text-container .text {
display: table-cell;
vertical-align: middle; }
.body .urbit .image-fs .text-container .rect {
width: 60%;
margin-left: auto;
margin-right: auto; }
.body .urbit .image-fs .text-container .rect h1 {
padding-bottom: 1rem;
text-align: left; }
.body .urbit .image-fs .text-container .rect.no-header {
font-weight: 500;
color: #fff;
font-size: 1.4rem; }
.body .urbit .image-fs .text-container .rect.no-header p.email {
font-size: 1rem; }
.body .urbit .image-fs .text-container .rect.no-header button.submit {
background-color: transparent;
border-color: #fff; }
.body .urbit .image-fs .image-container {
z-index: 0;
height: 44rem;
width: 100%;
overflow: hidden; }
.body .urbit .image-fs .image-container img {
position: relative;
left: 50%;
margin-left: -50%;
top: 50%;
margin-top: -50%;
min-height: 44rem;
min-width: 100%; }
.body .urbit .image-fs h1 {
text-align: center;
color: #fff; }
.body .urbit .image-fs.first {
margin-top: -9rem; }
.body .urbit .slide {
margin-bottom: 12rem;
position: relative; }
.body .urbit .slide h1 {
padding-bottom: 1rem; }
.body .urbit .slide .pair {
display: table; }
.body .urbit .slide .pair .text,
.body .urbit .slide .pair .image {
display: table-cell;
vertical-align: middle; }
.body .urbit .slide .pair .image.right {
padding-left: 5%; }
.body .urbit .slide .pair .image.left {
padding-right: 5%; }
.body .urbit .slide .pair .text {
width: 75%; }
.body .urbit .slide .pair .image {
width: 20%; }
.body .urbit .slide .pair p:last-child {
margin-bottom: 0; }
.body .urbit .end {
padding: 1rem;
background-color: #64DE79;
color: white;
text-decoration: none;
font-size: 2rem;
font-weight: 500; }
.body .urbit input.email,
.body .urbit button.submit {
line-height: 1rem;
padding: .6rem;
border: 0; }
.body .urbit input.email {
font-weight: 500;
background-color: #B1B7BD;
color: #fff;
margin-right: 1rem;
border: 3px solid #B1B7BD; }
.body .urbit input.email::-moz-placeholder {
color: #D2D2D2; }
.body .urbit input.email::-webkit-input-placeholder {
color: #D2D2D2; }
.body .urbit button.submit {
text-transform: none;
text-decoration: none;
border: 3px solid #000;
background-color: #fff;
font-weight: 500;
letter-spacing: 0; }
.body .urbit .last a {
display: block;
font-weight: 500;
color: #B1B7BD; }
.body .urbit .last h2 {
padding-top: 0;
padding-bottom: 1rem;
margin-bottom: 0; }
.body .urbit.home p.email {
margin-top: 3rem; }
@media (max-width: 767px) {
.body .urbit .slide .pair,
.body .urbit .slide .pair .text,
.body .urbit .slide .pair .image {
display: block;
width: 100%; }
.body .urbit .slide .pair .image {
text-align: center; }
.body .urbit .slide .pair .image.left {
margin-bottom: 2rem; }
.body .urbit .slide .pair .image.right {
margin-top: 2rem; }
.body .urbit .last .col-md-4 {
margin-top: 2rem; }
.body .urbit .last .col-md-4.col-md-offset-1 {
margin-top: 0; } }
.body .urbit {
margin-top: 4rem; }
.body .urbit .slide .pair,
.body .urbit .slide .pair .text,
.body .urbit .slide .pair .image {
display: block;
width: 100%; }
.body .urbit .slide .pair .image {
text-align: center; }
.body .urbit .slide .pair .image.left {
margin-bottom: 2rem; }
.body .urbit .slide .pair .image.right {
margin-top: 2rem; } }
@media (max-width: 767px) {
#body.plan {
@ -981,7 +922,7 @@ ol > li:before {
padding-right: 0;
position: fixed;
overflow: hidden;
z-index: 101;
z-index: 99;
margin-top: -3rem; }
.menu .contents {
padding-left: 0.9375rem;
@ -1066,10 +1007,6 @@ ol > li:before {
font-weight: 500;
font-size: 1.4rem; }
.list.post .date {
font-family: 'scp';
font-size: .7rem; }
.body[data-path^='/docs'] .list,
.body[data-path^='/work'] .list {
list-style-type: none;
@ -1114,15 +1051,13 @@ ol > li:before {
.body[data-path^='/docs'] .list.runes a h1 {
display: block;
margin-bottom: .3rem;
height: auto;
border-bottom: none; }
height: 1.8rem; }
.body[data-path^='/docs'] .list.runes a h1 code {
background-color: transparent;
font-weight: 500;
font-size: 1.2rem;
padding: 0;
border-bottom: 2px solid #000; }
padding: 0; }
.body[data-path^='/docs'] .list.runes a code {
background-color: #eceeef; }
@ -1135,14 +1070,15 @@ ol > li:before {
padding-left: 0; }
.urbit ul.blog li {
margin-bottom: 12rem; }
.urbit ul.blog .continue {
font-weight: 500;
.urbit ul.blog .btn {
padding: .3rem;
border: 3px solid #64DE79;
color: #64DE79;
text-decoration: none;
border-bottom: 3px solid #000; }
@media (max-width: 767px) {
.urbit ul.blog li {
margin-bottom: 6rem; } }
text-transform: none; }
.urbit ul.blog .btn:hover {
background-color: #64DE79;
color: #fff; }
.kids.runes h1 {
padding-top: 3rem; }
@ -1160,26 +1096,13 @@ ol > li:before {
.kids.runes > div p:first-of-type {
font-weight: 500; }
#body.post .date {
.urbit .post .date,
.urbit.post .date {
font-family: 'scp';
color: #B1B7BD;
font-size: .7rem;
font-weight: 200; }
#body.post .date,
#body.post p.preview,
#body.post h3.author {
margin-bottom: .6rem; }
#body.post h3.author {
padding-top: 0;
font-size: 1rem;
font-weight: 200; }
#body.post h3.author:before {
content: "—";
margin-right: .6rem; }
.urbit .post h1.title,
.urbit .post p.preview,
.urbit.post h1.title,
@ -1198,9 +1121,24 @@ ol > li:before {
width: 100%;
margin-bottom: 2rem; }
.urbit .post img,
.urbit.post img {
border: 12px solid #000; }
.urbit .post .date,
.urbit .post p.preview,
.urbit .post h3.author,
.urbit.post .date,
.urbit.post p.preview,
.urbit.post h3.author {
margin-bottom: .6rem; }
.urbit .post h3.author,
.urbit.post h3.author {
padding-top: 0;
font-size: 1rem;
font-weight: 200; }
.urbit .post h3:before,
.urbit.post h3:before {
content: "—";
margin-right: .6rem; }
.urbit.post .preview {
max-width: 75%; }

View File

@ -13,6 +13,13 @@ module.exports = {
type: "loadPath"
});
},
loadSein: function(path, data) {
return TreeDispatcher.handleServerAction({
path: path,
data: data,
type: "loadSein"
});
},
clearData: function() {
TreePersistence.refresh();
return TreeDispatcher.handleServerAction({
@ -2073,7 +2080,6 @@ ref = React.DOM, ul = ref.ul, li = ref.li, a = ref.a;
module.exports = query({
path: 't',
kids: {
snip: 'r',
head: 'r',
meta: 'j'
}
@ -2354,6 +2360,9 @@ $(function() {
frag = util.fragpath(window.location.pathname.replace(/\.[^\/]*$/, ''));
window.tree.actions.setCurr(frag);
window.tree.actions.loadPath(frag, window.tree.data);
if (window.tree.sein != null) {
window.tree.actions.loadSein(frag, window.tree.sein);
}
window.urb.ondataupdate = function(dep) {
var dat;
for (dat in window.urb.datadeps) {
@ -2516,17 +2525,17 @@ TreeStore = _.extend((new EventEmitter).setMaxListeners(50), {
}
data[k] = have[k];
}
if (query.kids) {
if (have.kids === false) {
data.kids = {};
} else {
for (k in tree) {
sub = tree[k];
if (data.kids == null) {
data.kids = {};
}
data.kids[k] = this.fulfillAt(sub, path + "/" + k, query.kids);
}
if (query.kids) {
if ((have != null ? have.kids : void 0) === false) {
data.kids = {};
} else {
for (k in tree) {
sub = tree[k];
if (data.kids == null) {
data.kids = {};
}
data.kids[k] = this.fulfillAt(sub, path + "/" + k, query.kids);
}
}
}
@ -2574,13 +2583,24 @@ TreeStore = _.extend((new EventEmitter).setMaxListeners(50), {
_data = {};
return _tree = {};
},
loadSein: function(arg) {
var data, path, sein;
path = arg.path, data = arg.data;
sein = this.getPare(path);
if (sein != null) {
return this.loadPath({
path: sein,
data: data
});
}
},
loadPath: function(arg) {
var data, path;
path = arg.path, data = arg.data;
return this.loadValues(this.getTree(path.split('/'), true), path, data);
},
loadValues: function(tree, path, data) {
var k, old, ref, ref1, v;
var _path, k, old, ref, ref1, v;
old = (ref = _data[path]) != null ? ref : {};
for (k in data) {
if (QUERIES[k]) {
@ -2593,7 +2613,11 @@ TreeStore = _.extend((new EventEmitter).setMaxListeners(50), {
if (tree[k] == null) {
tree[k] = {};
}
this.loadValues(tree[k], path + "/" + k, v);
_path = path;
if (_path === "/") {
_path = "";
}
this.loadValues(tree[k], _path + "/" + k, v);
}
if (data.kids && _.isEmpty(data.kids)) {
old.kids = false;
@ -2621,6 +2645,9 @@ TreeStore = _.extend((new EventEmitter).setMaxListeners(50), {
tree = _tree;
for (i = 0, len = _path.length; i < len; i++) {
sub = _path[i];
if (!sub) {
continue;
}
if (tree[sub] == null) {
if (!make) {
return null;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3714
web/tree/main_hoon_urb.js Normal file

File diff suppressed because it is too large Load Diff

3550
web/tree/main_urb.js Normal file

File diff suppressed because it is too large Load Diff