comparison index.Rmd @ 0:c12e291895ff draft

planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
author mingchen0919
date Tue, 01 May 2018 10:45:22 -0400
parents
children 071638eddf9c
comparison
equal deleted inserted replaced
-1:000000000000 0:c12e291895ff
1
2
3 ```{css echo=FALSE}
4 # code chunks scrollable
5 pre code, pre, code {
6 white-space: pre !important;
7 overflow-x: scroll !important;
8 word-break: keep-all !important;
9 word-wrap: initial !important;
10 }
11 ```
12
13
14 ```{r, echo=FALSE}
15 # to make the css theme to work, <link></link> tags cannot be added directly
16 # as <script></script> tags as below.
17 # it has to be added using a code chunk with the htmltool functions!!!
18 css_link = tags$link()
19 css_link$attribs = list(rel="stylesheet", href="vakata-jstree-3.3.5/dist/themes/default/style.min.css")
20 css_link
21 ```
22
23 ```{r, eval=FALSE, echo=FALSE}
24 # this code chunk is purely for adding comments
25 # below is to add jQuery and jstree javascripts
26 ```
27 <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
28 <script src="vakata-jstree-3.3.5/dist/jstree.min.js"></script>
29
30 ```{r, eval=FALSE, echo=FALSE}
31 # this code chunk is purely for adding comments
32 # javascript code below is to build the file tree interface
33 # 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
34 ```
35 <script>
36 $(function () {
37 // create an instance when the DOM is ready
38 $('#jstree').jstree().bind("select_node.jstree", function (e, data) {
39 window.open( data.node.a_attr.href, data.node.a_attr.target )
40 });
41 });
42 </script>
43
44 ## Outputs
45
46 ```{r, echo=FALSE}
47 # create a div container to store the file tree interface
48 library(htmltools)
49 tags$div(
50 id="jstree",
51 file_tree(Sys.getenv('REPORT_FILES_PATH'))
52 )
53 ```