Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/lesson.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rstudio4edu_lesson = function(toc = TRUE, ...) {
code_download = TRUE,
number_sections = FALSE,
css = css,
includes = rmarkdown::includes(after_body = footer),
#includes = rmarkdown::includes(after_body = footer),
...
)
}
12 changes: 9 additions & 3 deletions inst/rmarkdown/templates/lesson/resources/footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<!DOCTYPE html>
<hr>
<div class="footer"> Created with an <a class="rstudio4edu" href="https://rstudio4edu.github.io/rstudio4edu-book/"> <img class = "footer logo" src="rstudio4edu-logo.png" height="25">rstudio4edu</a> template.
<div class="footer">

<hr>

<p> <!--your footer content can go here--> </p>

<p class="rstudio4edu-footer">This site was created with an <a class="rstudio4edu-link" href="https://rstudio4edu.github.io/rstudio4edu-book/"> <img class="rstudio4edu-footer-logo" src="rstudio4edu-logo.png">&nbsp;rstudio4edu</a> template.</p>


</div>
40 changes: 24 additions & 16 deletions inst/rmarkdown/templates/lesson/resources/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -174,36 +174,44 @@ a:hover {
}


/*-------------FOOTER-------------- */
/*------------FOOTER----------*/

/* Divider line above footer */
.footer hr{
width: 100%;
padding-bottom: 1em;
}

.footer {
font-size: .6em;
text-transform: uppercase;
margin: 3em 0 !important;
font-size: 16px;
color: #808080;
text-align: center;
width: 90%;
margin: 3rem auto;
font-weight: 300;
}

/* Divider line above footer */
.footer hr{
margin-top: 7em;
width: 100%;
.rstudio4edu-footer {
font-size: 12px;
text-transform: uppercase;
}

/* rstudio4edu text link */
.rstudio4edu {
.rstudio4edu-link {
color: #3fb5bd;
font-family: "Lora";
font-size: 1.25em;
font-weight: 600;
text-transform: none;
text-decoration: none;
font-weight: 600;
font-size: 1.25em;
display: inline-block;

}

.rstudio4edu-link:hover {
text-decoration: none;
color: #5ebccf;
}

.footer.logo {
width: 40px;
margin-right: 4px;
.rstudio4edu-footer-logo {
width: 25px;
margin: 0px;
}
24 changes: 23 additions & 1 deletion inst/rmarkdown/templates/lesson/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ To add a logo, do one of two things:
knitr::include_graphics("rstudio4edu-logo.png")
```

Pretty, right? We like it. Feel free to use it.
Pretty, right? We like it. Feel free to use it.
\

*\*If you don't want a logo at all--then delete the code chunk or set it to* `eval = FALSE`.

# Adding questions

Expand All @@ -60,8 +63,27 @@ You can add text here too.
1. Your second question here.
</div>

# Add a footer

If you want a custom footer, then add your footer text within the designated `<p>` `</p>` tags at the bottom of this lesson.

# Goodbye!

Check out our online book at [rstudio4edu](https://rstudio4edu.github.io/rstudio4edu-book/).

Don't forget to delete all this text before you release your lesson out into the wild - happy educating!



<!--Footer content below this line -->

<div class="footer">

<hr>

<p> <!--your footer text can go here--> </p>

<p class="rstudio4edu-footer">This site was created with an <a class="rstudio4edu-link" href="https://rstudio4edu.github.io/rstudio4edu-book/"> <img class="rstudio4edu-footer-logo" src="rstudio4edu-logo.png">&nbsp;rstudio4edu</a> template.</p>


</div>
40 changes: 27 additions & 13 deletions inst/rstudio/templates/project/book/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ pre code {
height: 0px;
}

/*____Code Chunks____*/

.sourceCode pre {
margin: 0 !important; /* makes space above and below symmetrical*/
}

.sourceCode {
margin-bottom: 0.85em; /* adds same amount of margin below chunk as a <p> would */
}


/*------------- Body and header text---------------- */

.book.font-family-1 {
Expand All @@ -52,23 +63,23 @@ h1, h2, h3, h4 {


/*--- LOGO ---*/

.toc-logo {
width: 200px !important;
object-fit: contain;
margin: 0 auto;
display: block;
}

.toc-logo img {
max-width: 100%;
margin-bottom: 10px;
}

.summary > li:first-child {
height: auto !important;
height: auto !important;
}


/*-----Body Links-------*/

Expand All @@ -80,8 +91,8 @@ h1, h2, h3, h4 {
color: #1f5386; /* darker color when hovering */
text-decoration: none;
}


/* The next two rules make the horizontal line go straight across in top navbar */

.summary > li:first-child {
Expand Down Expand Up @@ -211,7 +222,7 @@ a.anchor {
}

/* all TOC list items, basically */
.book .book-summary ul.summary li a,
.book .book-summary ul.summary li a,
.book .book-summary ul.summary li span {
padding-top: 8px;
padding-bottom: 8px;
Expand All @@ -222,21 +233,24 @@ a.anchor {

.summary a:hover {
color: #778ca5 !important;
}
}

.book .book-summary ul.summary li.active>a { /*active TOC links*/
color: #5699cc !important;
border-left: solid 4px;
border-color: #5699cc;
padding-left: 11px !important;
}
}

li.appendix span, li.part span { /* for TOC part names */
margin-top: 1em;
color: #778ca5;
opacity: 1 !important;
text-transform: uppercase;
}



/* grabs first .chapter immediately after .part...but only those ch without numbers */
.part + li[data-level=""] {
text-transform: uppercase;
}

2 changes: 1 addition & 1 deletion inst/rstudio/templates/project/rmdsite/_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ output:
toc: true
toc_float: true
includes:
in_header: assets/header.html
after_body: assets/footer.html
css: assets/style.css

10 changes: 6 additions & 4 deletions inst/rstudio/templates/project/rmdsite/assets/footer.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<hr>
<div class="footer">

<div class="footer">
<hr>

<p>Created with an <a class="rstudio4edu" href="https://rstudio4edu.github.io/rstudio4edu-book/"> <img class = "footer logo" src="images/logo-mark-rstudio4edu.png"> rstudio4edu</a> template.</p>
<p> <!--your footer content can go here--> </p>

<p class="rstudio4edu-footer">This site was created with an <a class="rstudio4edu-link" href="https://rstudio4edu.github.io/rstudio4edu-book/"> <img class="rstudio4edu-footer-logo" src="images/logo-mark-rstudio4edu.png">&nbsp;rstudio4edu</a> template.</p>

</div>

</div>
1 change: 1 addition & 0 deletions inst/rstudio/templates/project/rmdsite/assets/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link rel="icon" type="image/png" href="images/favicon.ico"/>
Loading