mirror of
https://github.com/urbit/shrub.git
synced 2024-12-13 16:03:36 +03:00
codemirror tree v1
This commit is contained in:
parent
6c864cbfb8
commit
7e4cf03c93
@ -22,7 +22,9 @@
|
||||
~(has in react-elems)
|
||||
++ react-to-tape
|
||||
|= src=manx ^- tape
|
||||
:: ?: =(%script n.g.src)
|
||||
?: (~(has by (mo a.g.src)) [%urb %codemirror])
|
||||
?> ?=([[%pre *] _:/(**) ~] src)
|
||||
$(src ;codemirror(value "{v.i.a.g.i.c.src}");)
|
||||
;: weld
|
||||
"React.createElement("
|
||||
=* tan n.g.src
|
||||
|
@ -3,8 +3,3 @@
|
||||
}
|
||||
.cm-s-default .cm-atom {color: #70f}
|
||||
.cm-s-default .cm-operator {color: #097}
|
||||
|
||||
#err {
|
||||
background: #fdd;
|
||||
display: none;
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
|%
|
||||
++ mime [/text/hoon (taco own)] :: convert to %mime
|
||||
++ psal :: convert to %html
|
||||
;div:(pre:"{(trip own)}")
|
||||
;div:pre(urb_codemirror ""):"{(trip own)}"
|
||||
:: =+ gen-id="src-{<`@ui`(mug own)>}"
|
||||
:: ;div
|
||||
:: ;textarea(id "{gen-id}"):"{(trip own)}"
|
||||
|
@ -5,6 +5,7 @@ $ ->
|
||||
|
||||
React.initializeTouchEvents(true)
|
||||
|
||||
codemirror = React.createFactory require './components/CodeMirror.coffee'
|
||||
head = React.createFactory require './components/AnchorComponent.coffee'
|
||||
body = React.createFactory require './components/BodyComponent.coffee'
|
||||
list = React.createFactory require './components/ListComponent.coffee'
|
||||
@ -21,7 +22,7 @@ $ ->
|
||||
if path[0] isnt "/" then path = "/"+path
|
||||
window.tree._basepath + path
|
||||
window.tree.fragpath = (path) -> path.replace window.tree._basepath,""
|
||||
window.tree.init({kids:kids,list:list,lost:lost})
|
||||
window.tree.init({kids:kids,list:list,lost:lost, codemirror:codemirror})
|
||||
window.tree.reactify = (str) -> eval str
|
||||
|
||||
TreeActions = require './actions/TreeActions.coffee'
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
::
|
||||
/? 314
|
||||
/= gas /$ fuel
|
||||
/= ral /: /=home= /% /react-js/
|
||||
/= ral /: /=== /% /react-js/
|
||||
::
|
||||
::::
|
||||
::
|
||||
@ -17,12 +17,16 @@
|
||||
;head
|
||||
;title: Tree
|
||||
;meta(name "viewport", content "width=device-width, initial-scale=1");
|
||||
;link(type "text/css", rel "stylesheet", href "/home/pub/tree/src/css/main.css");
|
||||
;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 "/{(trip &2:%)}/pub/tree/src/css/main.css");
|
||||
;link(type "text/css", rel "stylesheet", href "/{(trip &2:%)}/lib/syntax/codemirror.css");
|
||||
::;link(type "text/css", rel "stylesheet", href "http://localhost:8000/docs/pub/tree/src/css/main.css");
|
||||
;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.12.2/react.js");
|
||||
;script(type "text/javascript", src "/home/pub/tree/src/js/main.js");
|
||||
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js");
|
||||
;script(type "text/javascript", src "/{(trip &2:%)}/lib/syntax/hoon.js");
|
||||
;script(type "text/javascript", src "/{(trip &2:%)}/pub/tree/src/js/main.js");
|
||||
::;script(type "text/javascript", src "http://localhost:8000/docs/pub/tree/src/js/main.js");
|
||||
==
|
||||
;body
|
||||
|
Loading…
Reference in New Issue
Block a user