Mercurial > repos > mingchen0919 > aurora_star_site
annotate index.Rmd @ 4:804fe260ee6c draft default tip
planemo upload commit 841d8b22bf9f1aaed6bfe8344b60617f45b275b2-dirty
author | mingchen0919 |
---|---|
date | Sun, 30 Dec 2018 14:04:22 -0500 |
parents | 071638eddf9c |
children |
rev | line source |
---|---|
0
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
1 |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
2 |
3
071638eddf9c
planemo upload commit 841d8b22bf9f1aaed6bfe8344b60617f45b275b2-dirty
mingchen0919
parents:
0
diff
changeset
|
3 ```{css, echo=FALSE} |
0
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
4 pre code, pre, code { |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
5 white-space: pre !important; |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
6 overflow-x: scroll !important; |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
7 word-break: keep-all !important; |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
8 word-wrap: initial !important; |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
9 } |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
10 ``` |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
11 |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
12 ```{r, echo=FALSE} |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
13 # to make the css theme to work, <link></link> tags cannot be added directly |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
14 # as <script></script> tags as below. |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
15 # it has to be added using a code chunk with the htmltool functions!!! |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
16 css_link = tags$link() |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
17 css_link$attribs = list(rel="stylesheet", href="vakata-jstree-3.3.5/dist/themes/default/style.min.css") |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
18 css_link |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
19 ``` |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
20 |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
21 ```{r, eval=FALSE, echo=FALSE} |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
22 # this code chunk is purely for adding comments |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
23 # below is to add jQuery and jstree javascripts |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
24 ``` |
3
071638eddf9c
planemo upload commit 841d8b22bf9f1aaed6bfe8344b60617f45b275b2-dirty
mingchen0919
parents:
0
diff
changeset
|
25 |
0
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
26 <script src="vakata-jstree-3.3.5/dist/jstree.min.js"></script> |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
27 |
3
071638eddf9c
planemo upload commit 841d8b22bf9f1aaed6bfe8344b60617f45b275b2-dirty
mingchen0919
parents:
0
diff
changeset
|
28 |
0
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
29 ```{r, eval=FALSE, echo=FALSE} |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
30 # this code chunk is purely for adding comments |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
31 # javascript code below is to build the file tree interface |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
32 # see this for how to implement opening hyperlink: https://stackoverflow.com/questions/18611317/how-to-get-i-get-leaf-nodes-in-jstree-to-open-their-hyperlink-when-clicked-when |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
33 ``` |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
34 <script> |
3
071638eddf9c
planemo upload commit 841d8b22bf9f1aaed6bfe8344b60617f45b275b2-dirty
mingchen0919
parents:
0
diff
changeset
|
35 jQuery(function () { |
0
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
36 // create an instance when the DOM is ready |
3
071638eddf9c
planemo upload commit 841d8b22bf9f1aaed6bfe8344b60617f45b275b2-dirty
mingchen0919
parents:
0
diff
changeset
|
37 jQuery('#jstree').jstree().bind("select_node.jstree", function (e, data) { |
0
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
38 window.open( data.node.a_attr.href, data.node.a_attr.target ) |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
39 }); |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
40 }); |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
41 </script> |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
42 |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
43 ## Outputs |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
44 |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
45 ```{r, echo=FALSE} |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
46 # create a div container to store the file tree interface |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
47 library(htmltools) |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
48 tags$div( |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
49 id="jstree", |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
50 file_tree(Sys.getenv('REPORT_FILES_PATH')) |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
51 ) |
c12e291895ff
planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff
changeset
|
52 ``` |