Skip to content

Commit

Permalink
improve directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
yutannihilation committed Jul 4, 2015
1 parent 5be2b6d commit 606d767
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 56 deletions.
35 changes: 16 additions & 19 deletions chunk_options.html → README.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
</style>
<link href='libs/fluidbox/css/fluidbox.css' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'>
<style type="text/css">
pre code {
font-family: 'Source Code Pro', monospace;
}
</style>
<link href='include/css/style.css' rel='stylesheet' type='text/css'>

<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet"
Expand Down Expand Up @@ -76,22 +72,23 @@




<div id="r-markdown-website-template" class="section level1">
<h1>R Markdown Website Template</h1>
<p>A lightweight version of this: <a href="https://github.com/rstudio/rmarkdown/tree/gh-pages" class="uri">https://github.com/rstudio/rmarkdown/tree/gh-pages</a></p>
<p>Official Document is avaialbe here: <a href="http://rmarkdown.rstudio.com/html_document_format.html#creating-a-website" class="uri">http://rmarkdown.rstudio.com/html_document_format.html#creating-a-website</a></p>
</div>
<div id="how-to-use" class="section level1">
<h1>How To Use</h1>
<ol style="list-style-type: decimal">
<li>Folk this repo</li>
<li>Open the <code>.Rproj</code> file with Rstudio</li>
<li>Build locally</li>
<li>Push results to remote</li>
</ol>
</div>

<script type="text/javascript" src="libs/fluidbox/jquery.fluidbox.min.js"></script>
<script>
$(function () {
$('p img')
.wrap(
function() {
return "<a class='fld' href='" + $( this ).attr("src") + "'></a>";
}
)
.parents()
.filter('a.fld')
.fluidbox();
});
</script>
<script type="text/javascript" src="include/js/enable-fluidbox.js"></script>

</div>

Expand Down
File renamed without changes.
14 changes: 1 addition & 13 deletions include/after_body.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,2 @@
<script type="text/javascript" src="libs/fluidbox/jquery.fluidbox.min.js"></script>
<script>
$(function () {
$('p img')
.wrap(
function() {
return "<a class='fld' href='" + $( this ).attr("src") + "'></a>";
}
)
.parents()
.filter('a.fld')
.fluidbox();
});
</script>
<script type="text/javascript" src="include/js/enable-fluidbox.js"></script>
3 changes: 3 additions & 0 deletions include/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pre code, p code {
font-family: 'Source Code Pro', monospace;
}
6 changes: 1 addition & 5 deletions include/in_header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<link href='libs/fluidbox/css/fluidbox.css' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'>
<style type="text/css">
pre code {
font-family: 'Source Code Pro', monospace;
}
</style>
<link href='include/css/style.css' rel='stylesheet' type='text/css'>
18 changes: 18 additions & 0 deletions include/js/enable-fluidbox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/******************************************************************************
* Fluidbox is applied to <a> elements which contains <img> element,
* while img tags are not wrapped in HTML files generated by usual knit.
*
* So, this script wraps <img> with <a> and then fluidbox().
*****************************************************************************/

$(function () {
$('p img')
.wrap(
function() {
return "<a class='fld' href='" + $( this ).attr("src") + "'></a>";
}
)
.parents()
.filter('a.fld')
.fluidbox();
});
2 changes: 1 addition & 1 deletion test.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ date: "2015年7月3日"
output: html_document
---

```{r child="chunk_options.Rmd"}
```{r child="children/chunk_options.Rmd"}
```

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
Expand Down
20 changes: 2 additions & 18 deletions test.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@
</style>
<link href='libs/fluidbox/css/fluidbox.css' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'>
<style type="text/css">
pre code {
font-family: 'Source Code Pro', monospace;
}
</style>
<link href='include/css/style.css' rel='stylesheet' type='text/css'>

<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet"
Expand Down Expand Up @@ -97,19 +93,7 @@ <h4 class="date"><em>2015年7月3日</em></h4>
<p>Note that the <code>echo = FALSE</code> parameter was added to the code chunk to prevent printing of the R code that generated the plot.</p>

<script type="text/javascript" src="libs/fluidbox/jquery.fluidbox.min.js"></script>
<script>
$(function () {
$('p img')
.wrap(
function() {
return "<a class='fld' href='" + $( this ).attr("src") + "'></a>";
}
)
.parents()
.filter('a.fld')
.fluidbox();
});
</script>
<script type="text/javascript" src="include/js/enable-fluidbox.js"></script>

</div>

Expand Down

0 comments on commit 606d767

Please sign in to comment.