diff --git a/style-sets/fhdasl/_output.yml b/style-sets/fhdasl/_output.yml new file mode 100644 index 00000000..6155d1d4 --- /dev/null +++ b/style-sets/fhdasl/_output.yml @@ -0,0 +1,15 @@ +bookdown::gitbook: + css: assets/style.css + includes: + before_body: assets/big-image_fhdasl.html + after_body: assets/footer.html + highlight: tango + config: + toc: + collapse: section + before: | + + after: | +

This content was published with bookdown by:

+

The Fred Hutch Data Science Lab

+

Style adapted from: rstudio4edu-book (CC-BY 2.0)

diff --git a/style-sets/fhdasl/copy_to_assets/big-image_fhdasl.html b/style-sets/fhdasl/copy_to_assets/big-image_fhdasl.html new file mode 100644 index 00000000..0a7d7bc8 --- /dev/null +++ b/style-sets/fhdasl/copy_to_assets/big-image_fhdasl.html @@ -0,0 +1,12 @@ + + + + + + + + + +
+ +
diff --git a/style-sets/fhdasl/copy_to_assets/dasl_thin_main_image.png b/style-sets/fhdasl/copy_to_assets/dasl_thin_main_image.png new file mode 100644 index 00000000..9e9183dc Binary files /dev/null and b/style-sets/fhdasl/copy_to_assets/dasl_thin_main_image.png differ diff --git a/style-sets/fhdasl/copy_to_assets/favicon.ico b/style-sets/fhdasl/copy_to_assets/favicon.ico new file mode 100644 index 00000000..541bb8c8 Binary files /dev/null and b/style-sets/fhdasl/copy_to_assets/favicon.ico differ diff --git a/style-sets/fhdasl/copy_to_assets/footer.html b/style-sets/fhdasl/copy_to_assets/footer.html new file mode 100644 index 00000000..0b268e75 --- /dev/null +++ b/style-sets/fhdasl/copy_to_assets/footer.html @@ -0,0 +1,8 @@ +
+
+ +
\ No newline at end of file diff --git a/style-sets/fhdasl/copy_to_assets/logo-fhdasl.png b/style-sets/fhdasl/copy_to_assets/logo-fhdasl.png new file mode 100644 index 00000000..6ceda1ca Binary files /dev/null and b/style-sets/fhdasl/copy_to_assets/logo-fhdasl.png differ diff --git a/style-sets/fhdasl/copy_to_assets/style.css b/style-sets/fhdasl/copy_to_assets/style.css new file mode 100644 index 00000000..26a42f3b --- /dev/null +++ b/style-sets/fhdasl/copy_to_assets/style.css @@ -0,0 +1,470 @@ +@import url('https://fonts.googleapis.com/css?family=Abril+Fatface|Karla:400,400i,700,700i|Lora:400,400i,700,700i&display=swap'); + +p.caption { + color: #777; + margin-top: 10px; +} +p code { + white-space: inherit; +} +pre { + word-break: normal; + word-wrap: normal; +} +pre code { + white-space: inherit; +} + +/*---------------Hero Image------------------*/ + +/* next 3 rules are for setting large image at top of each page and pushing down the book content to appear beneath the image */ + +.hero-image-container { + position: absolute; + top: 0; + left: 0; + right: 0; + height: 200px; + /*background-image: url("images/books.jpg");*/ + /*background-color: #193a5c;*/ +} + +.hero-image { + width: 100%; + height: 80%; + /*object-fit: cover;*/ +} + +.page-inner { + padding-top: 140px !important; +} + + +/* ------------Links------------------ */ + +.book .book-body .page-wrapper .page-inner section.normal a { + color: #89C348; +} + + +/*------------- Body and header text---------------- */ + +.book.font-family-1 { + font-family: 'Karla', arial, sans-serif; +} + +h1, h2, h3, h4 { + font-family: 'Lora', arial, sans-serif; +} + + +.book .book-body .page-wrapper .page-inner section.normal h1, +.book .book-body .page-wrapper .page-inner section.normal h2, +.book .book-body .page-wrapper .page-inner section.normal h3, +.book .book-body .page-wrapper .page-inner section.normal h4, +.book .book-body .page-wrapper .page-inner section.normal h5, +.book .book-body .page-wrapper .page-inner section.normal h6 { + margin-top: 2.275em; + margin-bottom: 1em; +} + +.title { + font-family: 'Lora'; + font-size: 4em !important; + color: #112345; + margin-top: 0.275em !important; + margin-bottom: 0.35em !important; +} + +.subtitle { + font-family: 'Lora'; + color: #0b8d96; +} + + +/*----------DROP CAPS--------------*/ + + +/*p:nth-child(2):first-letter { /* /* DROP-CAP FOR FIRST P BENEATH EACH H1 OR H2*/ /* + color: #3fb5bd; + float: left; + font-family: 'Abril Fatface', serif; + font-size: 7em; + line-height: 65px; + padding-top: 4px; + padding-right: 8px; + padding-left: 3px; + margin-bottom: 9px; +} +*/ + +.section.level1 > p:first-of-type:first-letter { /*drop cap for first p beneath level 1 headers only within class .section*/ + color: #112345; + float: left; + font-family: 'Abril Fatface', serif; + font-size: 7em; + line-height: 65px; + padding-top: 4px; + padding-right: 8px; + padding-left: 3px; + margin-bottom: 9px; +} + +/* add drop cap to first paragraph that follows the first 2nd level header*/ +/* +.section.level2:first-of-type > p:first-of-type:first-letter { + color: #3fb5bd; + float: left; + font-family: 'Abril Fatface', serif; + font-size: 7em; + line-height: 65px; + padding-top: 4px; + padding-right: 8px; + padding-left: 3px; + margin-bottom: 9px; +} +*/ + + + +/*------------ TOC --------------*/ + + +.book .book-summary { + background: white; + border-right: none; +} + +/*---color of links in TOC----*/ + +.book .book-summary a { +color: #112345 +} + +.summary{ + font-family: 'Karla', sans-serif; +} + +/* all TOC list items, basically */ +.book .book-summary ul.summary li a, +.book .book-summary ul.summary li span { + padding-top: 8px; + padding-bottom: 8px; + padding-left: 15px; + padding-right: 15px; + color: #112345; +} + +.summary a:hover { + color: #89C348 !important; +} + +.book .book-summary ul.summary li.active>a { /*active TOC links*/ + color: #89C348 !important; + border-left: solid 4px; + border-color: #89C348; + padding-left: 11px !important; +} + + +li.appendix span, li.part span { /* for TOC part names */ + margin-top: 1em; + color: #000000; + opacity: .9 !important; + text-transform: uppercase; +} + +.part + li[data-level=""] { /* grabs first .chapter immediately after .part...but only those ch without numbers */ + text-transform: uppercase; +} + + +/* The next two rules make the horizontal line go straight across in top navbar */ + +.summary > li:first-child { + height: 50px; + padding-top: 10px; + border-bottom: 1px solid rgba(0,0,0,.07); +} + +.book .book-summary ul.summary li.divider { + height: 0px; +} + + +/*--- LOGO ---*/ + +.toc-logo { + width: 200px !important; + object-fit: contain; + margin: 0 auto; +} + +.toc-logo img { + max-width: 100%; + margin-bottom: 10px; +} + +.summary > li:first-child { + height: auto !important; +} + +/* --------------Two columns--------------- */ + +.col2 { + columns: 2 200px; /* number of columns and width in pixels*/ + -webkit-columns: 2 200px; /* chrome, safari */ + -moz-columns: 2 200px; /* firefox */ +} + + +.side-by-side { + display: flex; +} + +.side1 { + width: 40%; +} + +.side2 { + width: 58%; + margin-left: 1rem; +} + +/* --------------Even split- two columns--------------- */ + +.split { + display: flex; +} + +.split1 { + width: 50%; + padding-right: 20px; +} + +.split2 { + width: 50%; +} + + +/* Sidebar formating --------------------------------------------*/ +/* from r-pkgs.org*/ + +div.notice, div.warning, div.github, div.dictionary, div.reflection { + border-style: solid; + padding: 1em; + margin: 1em 0; + padding-left: 100px; + min-height: 120px; + background-repeat: no-repeat; +} + +div.notice{ + border: 4px #89C348; + background-size: 70px; + background-position: 15px center; + background-color: #e8ebee; + background-image: url("../assets/box_images/note.png"); +} + +div.warning{ + border: 4px #e0471c; + background-size: 70px; + background-position: 15px center; + background-color: #e8ebee; + background-image: url("../assets/box_images/warning.png"); +} + +div.github{ + border: 4px #000000; + background-size: 70px; + background-position: 15px center; + background-color: #e8ebee; + background-image: url("../assets/box_images/github.png"); +} + +div.dictionary{ + border: 4px #89C348; + background-size: 70px; + background-position: 15px center; + background-color: #e8ebee; + background-image: url("../assets/box_images/dictionary.png"); +} + +div.reflection{ + border: 4px #89C348; + background-size: 90px; + background-position: 15px center; + background-color: #e8ebee; + background-image: url("../assets/box_images/thinking_face.png"); +} + + +/* .book .book-body .page-wrapper .page-inner section.normal is needed + to override the styles produced by gitbook, which are ridiculously + overspecified. Goal of the selectors is to ensure internal "margins" + controlled only by padding of container */ + +.book .book-body .page-wrapper .page-inner section.normal div.rstudio-tip > :first-child, +.book .book-body .page-wrapper .page-inner section.normal div.tip > :first-child { + margin-top: 0; +} + +.book .book-body .page-wrapper .page-inner section.normal div.rstudio-tip > :last-child, +.book .book-body .page-wrapper .page-inner section.normal div.tip > :last-child { + margin-bottom: 0; +} + +iframe { + -moz-transform-origin: top left; + -webkit-transform-origin: top left; + -o-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; +} + +.iframe-container { + overflow: auto; + -webkit-overflow-scrolling: touch; + border: #ddd 2px solid; + box-shadow: #888 0px 5px 8px; + margin-bottom: 1em; +} + +.iframe-container > iframe { + border: none; +} + + +/* -------Clipboard copy button --------- */ +.copy { + width: inherit; + background-color: #e2e2e2 ; + border: none; + border-radius: 2px; + float: right; + font-size: 60%; + padding: 4px 4px 4px 4px; +} + +/* for new copy button */ + +.hasCopyButton { + position: relative; +} + +.btn-copy-ex { + position: absolute; + right: 0; + top: 0; + visibility: hidden; +} + +.hasCopyButton:hover button.btn-copy-ex { + visibility: visible; +} + + + +/* -----------Section anchors -------------*/ + +.book .book-body .page-wrapper .page-inner section.normal { + overflow: visible !important; /*so anchor link doesn't get cut off */ +} + +a.anchor { + margin-left: -30px; + padding-right: 3px; + display:inline-block; + width: 30px; + height: 30px; + /*visibility: hidden;*/ + background-image: url(https://image.flaticon.com/icons/svg/34/34735.svg) !important; + background-repeat: no-repeat !important; + background-size: 20px 20px !important; + background-position: center bottom !important; + opacity: 0; +} + + +.hasAnchor:hover a.anchor, +a.anchor:hover { + /*visibility: visible;*/ + opacity: 0.6; +} + +/* disable anchors for headers with "no-anchor" class */ +.no-anchor .hasAnchor:hover a.anchor, +.no-anchor a.anchor:hover { + opacity: 0 !important; +} + +@media (max-width: 1144px) { /* don't show anchor link on small screens */ + .hasAnchor:hover a.anchor { + visibility: hidden; + } +} + + +/*____Code Chunks____*/ + +.sourceCode { + margin-bottom: 0.85em; /* adds same amount of margin as a

would */ +} + +.sourceCode pre { + margin: 0 !important; /* makes space above and below symmetrical*/ +} + +/* Footer */ + +.footer { + font-family: "Lora", serif; + font-size: .85em; + color: #193a5c; +} + +/* AnVIL style */ +/* Things above this comment should be identical to OTTR_Template style.css */ +/* Things below this comment are AnVIL customizations */ + +.hero-image-container { + height: 100px; +} + +.page-inner { + padding-top: 60px !important; +} + +.book .book-body .page-wrapper .page-inner section.normal h1, +.book .book-body .page-wrapper .page-inner section.normal h2, +.book .book-body .page-wrapper .page-inner section.normal h3, +.book .book-body .page-wrapper .page-inner section.normal h4, +.book .book-body .page-wrapper .page-inner section.normal h5, +.book .book-body .page-wrapper .page-inner section.normal h6 { + margin-top: 1em; + margin-bottom: 1em; +} + +/* fix the image urls since our AnVIL style is in a different location */ +/* images paths are relative to the CSS file */ + +div.notice{ + background-image: url("../box_images/note.png"); +} + +div.warning{ + background-image: url("../box_images/warning.png"); +} + +div.github{ + background-image: url("../box_images/github.png"); +} + +div.dictionary{ + background-image: url("../box_images/dictionary.png"); +} + +div.reflection{ + background-image: url("../box_images/thinking_face.png"); +} diff --git a/style-sets/fhdasl/index.Rmd b/style-sets/fhdasl/index.Rmd new file mode 100644 index 00000000..d5d3449a --- /dev/null +++ b/style-sets/fhdasl/index.Rmd @@ -0,0 +1,21 @@ +--- +title: "FHDaSL Book Name" +date: "`r format(Sys.time(), '%B %d, %Y')`" +site: bookdown::bookdown_site +documentclass: book +bibliography: book.bib +biblio-style: apalike +link-citations: yes +description: Description about Course/Book. +favicon: assets/favicon.ico +--- + +```{r include=FALSE} +# automatically create a bib database for R packages +knitr::write_bib(c( + .packages(), "bookdown", "knitr", "rmarkdown" +), "packages.bib") +``` + +# About this Book {-} +