mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-29 12:15:43 +03:00
no more hook files!
- index factored into index ren - paste json assigned new %paste-new mark - /!mark/ horn added to execute hoon as generating said mark + app front pages moved accordingly - 404 moved to md
This commit is contained in:
parent
e94312333a
commit
ca1502ed77
@ -672,7 +672,6 @@
|
||||
%+ knee *^horn |. ~+
|
||||
;~ pfix fas
|
||||
;~ pose
|
||||
(stag %toy ;~(sfix sym fas))
|
||||
(stag %ape ;~(pfix sig ape:read))
|
||||
(stag %arg ;~(pfix buc ape:read))
|
||||
(stag %alt ;~(pfix bar alt:read))
|
||||
@ -687,6 +686,7 @@
|
||||
(stag %saw ;~(pfix sem saw:read))
|
||||
(stag %see ;~(pfix col see:read))
|
||||
(stag %sic ;~(pfix ket sic:read))
|
||||
(stag %toy ;~(sfix toy:read fas))
|
||||
==
|
||||
==
|
||||
::
|
||||
@ -745,6 +745,8 @@
|
||||
%+ rail
|
||||
;~(plug ;~(sfix toil:vez ket) day)
|
||||
;~(pfix gap ;~(plug howl:vez day))
|
||||
::
|
||||
++ toy ;~(plug ;~(pose (cold | zap) (easy &)) sym)
|
||||
--
|
||||
::
|
||||
--
|
||||
@ -1547,8 +1549,13 @@
|
||||
(fine cof [p.tug q.vax])
|
||||
::
|
||||
%toy
|
||||
=+ [%bake p.hon ?:(lit many/~ arg) how]
|
||||
(cope (cope (make cof -) furl) feel)
|
||||
?: p.hon
|
||||
=. arg ?.(lit arg many/~)
|
||||
(cope (cope (make cof %bake q.hon arg how) furl) feel)
|
||||
%+ cool |.(leaf/"ford: hook {<q.hon>} {<(tope how)>}")
|
||||
%+ cope (fade cof %hoon how)
|
||||
|= [cof=cafe hyd=hood]
|
||||
(cope (abut:(meow how arg) cof hyd) (lake q.hon))
|
||||
==
|
||||
::
|
||||
++ head :: consume structures
|
||||
|
@ -2504,7 +2504,7 @@
|
||||
[%saw p=twig q=horn] :: /; operate on
|
||||
[%see p=beam q=horn] :: /: relative to
|
||||
[%sic p=tile q=horn] :: /^ cast
|
||||
[%toy p=mark] :: /mark/ static
|
||||
[%toy p=? q=mark] :: /mark/ static/hook
|
||||
== ::
|
||||
++ milk (trel ship desk silk) :: sourced silk
|
||||
++ silk :: construction layer
|
||||
|
23
mar/paste-new.hoon
Normal file
23
mar/paste-new.hoon
Normal file
@ -0,0 +1,23 @@
|
||||
::
|
||||
:::: /hoon/core/json/mar
|
||||
::
|
||||
/? 314
|
||||
::
|
||||
:::: compute
|
||||
::
|
||||
|_ jon=json
|
||||
::
|
||||
++ grow :: convert to
|
||||
|%
|
||||
++ mime [/text/'paste-new+json' (taco txt)] :: convert to %mime
|
||||
++ txt (crip (pojo jon))
|
||||
--
|
||||
++ grab
|
||||
|% :: convert from
|
||||
:: ++ mime |=([p=mite q=octs] (fall (rush (,@t q.q) apex:poja) *json))
|
||||
++ noun json :: clam from %noun
|
||||
++ numb jone
|
||||
++ time jode
|
||||
--
|
||||
++ grad %mime
|
||||
--
|
1
pub/404.md
Normal file
1
pub/404.md
Normal file
@ -0,0 +1 @@
|
||||
<list data-source="default" is404="true"/>
|
@ -1 +0,0 @@
|
||||
;list(data-source "default", is404 "true");
|
@ -1,13 +0,0 @@
|
||||
/+ tree
|
||||
/: /%%/ /%
|
||||
/^ [tip=marl sub=(map span marl) ~]
|
||||
/. /; (getall:tree %h1 ~) /elem/
|
||||
/_ /; (getall:tree %h1 ~) /elem/
|
||||
==
|
||||
!:
|
||||
::::
|
||||
::
|
||||
^- (map path marl)
|
||||
=- [[/ (zing -)] ~ ~]
|
||||
^- (list marl)
|
||||
[tip (turn (~(tap by sub)) tail)]
|
44
pub/paste.hoon
Normal file
44
pub/paste.hoon
Normal file
@ -0,0 +1,44 @@
|
||||
/= all /; flop /^ (list (pair time ,*)) /: /%%/ /& /mime/
|
||||
;html
|
||||
;head:title:"Pastebin"
|
||||
;body
|
||||
;link(rel "stylesheet", href "/home/lib/base.css");
|
||||
;link(rel "stylesheet", href "/home/pub/paste/main.css");
|
||||
;script@"//code.jquery.com/jquery-2.1.4.min.js";
|
||||
;script@"/~/as/own/~/at/home/lib/urb.js";
|
||||
;script:'''
|
||||
document.title = 'pastebin - urbit'
|
||||
urb.appl = 'hood'
|
||||
urb.send.mark = 'write-paste'
|
||||
submit = function(){
|
||||
if($("select :selected").attr('value')===undefined) {
|
||||
$("select").addClass('err')
|
||||
return false
|
||||
}
|
||||
$("select").removeClass('err')
|
||||
$("textarea,button").attr('disabled', true)
|
||||
urb.send({
|
||||
txt:$("textarea").val(),
|
||||
typ:$("select :selected").val()
|
||||
}, function(){
|
||||
$.getJSON('paste.paste-new',null,function(resp){
|
||||
if(!resp) throw "No paste"
|
||||
window.location = "paste/"+resp.u
|
||||
})})
|
||||
}
|
||||
'''
|
||||
::
|
||||
;h1: New
|
||||
;p:textarea;
|
||||
;select
|
||||
;option(): Type
|
||||
;option(value "md"): Markdown
|
||||
;option(value "txt"): Text
|
||||
;option(value "hoon"): Hoon
|
||||
==
|
||||
;button(onclick "submit()"):"Submit"
|
||||
;hr;
|
||||
;h1: Recent
|
||||
;* (turn all |=([a=time *] ;p:a/"paste/{<a>}":"{<a>}"))
|
||||
==
|
||||
==
|
@ -1,41 +0,0 @@
|
||||
/= all /; flop /^ (list (pair time ,*)) /: /%%/ /& /mime/
|
||||
;div
|
||||
;link(rel "stylesheet", href "/home/lib/base.css");
|
||||
;link(rel "stylesheet", href "/home/pub/paste/main.css");
|
||||
;script@"//code.jquery.com/jquery-2.1.4.min.js";
|
||||
;script@"/~/as/own/~/at/home/lib/urb.js";
|
||||
;script:'''
|
||||
document.title = 'pastebin - urbit'
|
||||
urb.appl = 'hood'
|
||||
urb.send.mark = 'write-paste'
|
||||
submit = function(){
|
||||
if($("select :selected").attr('value')===undefined) {
|
||||
$("select").addClass('err')
|
||||
return false
|
||||
}
|
||||
$("select").removeClass('err')
|
||||
$("textarea,button").attr('disabled', true)
|
||||
urb.send({
|
||||
txt:$("textarea").val(),
|
||||
typ:$("select :selected").val()
|
||||
}, function(){
|
||||
$.getJSON('paste/new.json',null,function(resp){
|
||||
if(!resp) throw "No paste"
|
||||
window.location = "paste/"+resp.u
|
||||
})})
|
||||
}
|
||||
'''
|
||||
::
|
||||
;h1: New
|
||||
;p:textarea;
|
||||
;select
|
||||
;option(): Type
|
||||
;option(value "md"): Markdown
|
||||
;option(value "txt"): Text
|
||||
;option(value "hoon"): Hoon
|
||||
==
|
||||
;button(onclick "submit()"):"Submit"
|
||||
;hr;
|
||||
;h1: Recent
|
||||
;* (turn all |=([a=time *] ;p:a/"paste/{<a>}":"{<a>}"))
|
||||
==
|
@ -1,2 +0,0 @@
|
||||
/= all /^ (list (pair time ,*)) /: /%%%/ /& /mime/
|
||||
?~(all ~ (joba %u |-(?~(t.all s/(scot %da p.i.all) $(all t.all)))))
|
@ -1,7 +1,14 @@
|
||||
/+ tree
|
||||
/elem/
|
||||
/, /
|
||||
/; (getall:tree /h1/h2/h3/h4/h5/h6) /elem/
|
||||
::
|
||||
/pub/docs/dev/hoon/runes
|
||||
/; |= [tip=marl sub=(map span marl) ~]
|
||||
(zing `(list marl)`[tip (turn (~(tap by sub)) tail)])
|
||||
/. /; (getall:tree %h1 ~) /elem/
|
||||
/_ /; (getall:tree %h1 ~) /elem/
|
||||
== ==
|
||||
::
|
||||
::::
|
||||
::
|
||||
^- (map path marl)
|
||||
[[/ ((getall:tree /h1/h2/h3/h4/h5/h6) -.-)] ~ ~]
|
||||
`(map path marl)`[[/ -.-] ~ ~]
|
||||
|
3
ren/paste-new.hoon
Normal file
3
ren/paste-new.hoon
Normal file
@ -0,0 +1,3 @@
|
||||
/= all /; flop /^ (list (pair time ,*)) /& /mime/
|
||||
^- json
|
||||
?~(all ~ (joba %u s/(scot %da p.i.all)))
|
@ -1,5 +1,6 @@
|
||||
/% /,
|
||||
/talk /talklog-hymn/
|
||||
/pub /|(/!hymn/ /tree-hymn/)
|
||||
/ /tree-hymn/
|
||||
==
|
||||
`manx`-<
|
||||
`manx`-.-
|
||||
|
Loading…
Reference in New Issue
Block a user