diff --git a/.github/ISSUE_TEMPLATE/course-content-add.md b/.github/ISSUE_TEMPLATE/course-content-add.md index 71213d8..1a5f795 100644 --- a/.github/ISSUE_TEMPLATE/course-content-add.md +++ b/.github/ISSUE_TEMPLATE/course-content-add.md @@ -3,15 +3,15 @@ name: New content idea about: Suggest an idea for the course title: '' labels: '' -assignees: cansavvy +assignees: --- -**Describe the your scope of your content idea** -What will this cover and how does it relate to the current course material? +## Describe the your scope of your content idea + -**Describe the learning objectives for your content idea** -What will users learn from this new content? +## Describe the learning objectives for your content idea + -**Additional context or resources** -Add any other context or related resources we should know about? +## Additional context or resources + diff --git a/.github/ISSUE_TEMPLATE/course-problem-report.md b/.github/ISSUE_TEMPLATE/course-problem-report.md index 7d5b83f..26f6f36 100644 --- a/.github/ISSUE_TEMPLATE/course-problem-report.md +++ b/.github/ISSUE_TEMPLATE/course-problem-report.md @@ -1,27 +1,28 @@ --- name: Course Problem Report about: Create a report to help improve the course -title: problem +title: [Problem] labels: bug -assignees: cansavvy +assignees: --- -**Describe what is not working with the course** -A clear and concise description of what the bug is. +## Describe what is not working with the course + -**To Reproduce** -Steps to reproduce the behavior: +## Steps to Reproduce + -**Expected behavior** -A clear and concise description of what you expected to happen. +## Expected behavior + -**Screenshots** -If applicable, add screenshots to help explain your problem. +## Screenshots + -**Additional context** -Add any other context about the problem here. +## Additional context + diff --git a/.github/workflows/render-bookdown.yml b/.github/workflows/render-bookdown.yml index 61dd531..0db1b8c 100644 --- a/.github/workflows/render-bookdown.yml +++ b/.github/workflows/render-bookdown.yml @@ -15,7 +15,7 @@ on: branches: [ main ] paths: - '**.Rmd' - - docker/Dockerfile + - docker/* - assets/* jobs: # This workflow contains a single job called "build-all" @@ -67,17 +67,23 @@ jobs: ###### END OF DOCKER UPDATE CHUNK ############################################## + # We want a fresh run of the renders each time + - name: Delete old docs/* + run: rm -r docs/* + # Run bookdown rendering - name: Run bookdown render + id: bookdown run: | docker run \ --mount type=bind,target=/home/rstudio,source=$PWD \ jhudsl/course_template \ - Rscript -e "bookdown::render_book('index.Rmd')" + Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all')" ##### If you do not wish to host your course on Coursera, you can delete this section ##### # Run Coursera version - name: Run Coursera version of render + id: coursera run: | docker run \ --mount type=bind,target=/home/rstudio,source=$PWD \ @@ -86,6 +92,15 @@ jobs: ##### End of Coursera rendering section ######################################## + # This checks on the steps before it and makes sure that they completed. + # If the renders didn't complete we don't want to commit the file changes + - name: Check on render steps + if: steps.bookdown.outcome != 'success' || steps.coursera.outcome != 'success' + run: | + echo Bookdown status ${{steps.bookdown.outcome}} + echo Coursera status ${{steps.coursera.outcome}} + exit 1 + # Commit the rendered bookdown files - name: Commit rendered bookdown files run: | diff --git a/.github/workflows/render-preview.yml b/.github/workflows/render-preview.yml index bdd65fb..5aa3c18 100644 --- a/.github/workflows/render-preview.yml +++ b/.github/workflows/render-preview.yml @@ -7,6 +7,8 @@ on: pull_request: branches: [ main ] +permissions: write-all + jobs: # This workflow contains a single job called "build-all" build-all: @@ -20,20 +22,24 @@ jobs: with: # get the full repo fetch-depth: 0 - # use github PAT - token: ${{ secrets.GH_PAT }} + + # We want a fresh run of the renders each time + - name: Delete old docs/* + run: rm -r docs/* # Run bookdown rendering - name: Run bookdown render + id: bookdown run: | docker run \ --mount type=bind,target=/home/rstudio,source=$PWD \ jhudsl/course_template \ - Rscript -e "bookdown::render_book('index.Rmd')" + Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all')" ##### If you do not wish to host your course on Coursera, you can delete this section ##### # Run Coursera version - name: Run Coursera version of render + id: coursera run: | docker run \ --mount type=bind,target=/home/rstudio,source=$PWD \ @@ -42,35 +48,57 @@ jobs: ##### End of Coursera rendering section ######################################## + # This checks on the steps before it and makes sure that they completed. + # If the renders didn't complete we don't want to commit the file changes + - name: Check on render steps + if: steps.bookdown.outcome != 'success' || steps.coursera.outcome != 'success' + run: | + echo Bookdown status ${{steps.bookdown.outcome}} + echo Coursera status ${{steps.coursera.outcome}} + exit 1 + # Commit the rendered bookdown files - name: Commit rendered bookdown files to development branch + id: commit run: | git checkout -b "preview-${{ github.event.pull_request.number }}" git config --local user.email "actions@github.com" git config --local user.name "GitHub Actions" + changes=$(git diff --name-only origin/main -- docs) git add -A git commit -m 'Render bookdown preview' || echo "No changes to commit" git push --force origin "preview-${{ github.event.pull_request.number }}" || echo "No changes to push" + if [[ -n $changes ]]; then + echo ::set-output name=changes::$(echo 'changes') + else + echo ::set-output name=changes::$(echo 'no_changes') + fi + - name: Find Comment uses: peter-evans/find-comment@v1 id: fc with: issue-number: ${{ github.event.pull_request.number }} comment-author: 'github-actions[bot]' - body-includes: Re-rendered + body-includes: latest commit - name: Build components of the comment id: build-components run: | + course_name=$(head -n 1 _bookdown.yml | cut -d'"' -f 2| tr " " "-") bookdown_link=$(echo "https://htmlpreview.github.io/?https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/docs/index.html") coursera_link=$(echo "https://htmlpreview.github.io/?https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/docs/coursera/index.html") + docx_link=$(echo "https://github.com/$GITHUB_REPOSITORY/raw/preview-${{ github.event.pull_request.number }}/docs/$course_name.docx") echo ::set-output name=bookdown_link::$bookdown_link echo ::set-output name=coursera_link::$coursera_link + echo ::set-output name=docx_link::$docx_link echo ::set-output name=time::$(date +'%Y-%m-%d') echo ::set-output name=commit_id::$GITHUB_SHA + echo ${{steps.commit.outputs.changes}} - name: Create or update comment + if: steps.commit.outputs.changes == 'changes' uses: peter-evans/create-or-update-comment@v1 with: comment-id: ${{ steps.fc.outputs.comment-id }} @@ -79,6 +107,19 @@ jobs: Re-rendered previews from the latest commit: - See [preview of Bookdown here](${{ steps.build-components.outputs.bookdown_link }}) - See [preview of Coursera version here](${{ steps.build-components.outputs.coursera_link }}) + - Download the [preview of .docx file](${{ steps.build-components.outputs.docx_link }}) + + _Updated at ${{ steps.build-components.outputs.time }} with changes from ${{ steps.build-components.outputs.commit_id }}_ + edit-mode: replace + + - name: No comment if no changes + if: steps.commit.outputs.changes == 'no_changes' + uses: peter-evans/create-or-update-comment@v1 + with: + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + The latest commit did not produce rendering changes. _Updated at ${{ steps.build-components.outputs.time }} with changes from ${{ steps.build-components.outputs.commit_id }}_ edit-mode: replace diff --git a/.github/workflows/transfer-rendered-files.yml b/.github/workflows/transfer-rendered-files.yml index 6557a1c..9875bd0 100644 --- a/.github/workflows/transfer-rendered-files.yml +++ b/.github/workflows/transfer-rendered-files.yml @@ -106,6 +106,12 @@ jobs: curl --fail -s ${base_url}/${line} > ${line} done < "$input" + + # Get rid of GA Script spec in output yaml + sed 's/GA_Script.Rhtml,//' _output.yml > output.txt + cat output.txt > _output.yml + rm output.txt + - name: Create PR with rendered docs files if: ${{ steps.git_repo_check.outputs.git_results == 'TRUE' }} uses: peter-evans/create-pull-request@v3 diff --git a/code_of_conduct.md b/code_of_conduct.md index ced4b39..c4b61f6 100644 --- a/code_of_conduct.md +++ b/code_of_conduct.md @@ -58,7 +58,7 @@ representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the Jeff Leek at jtleek@hey.com. +reported to Jeff Leek at jtleek@hey.com. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the diff --git a/scripts/spell-check.R b/scripts/spell-check.R index 2e159ee..f364b0e 100644 --- a/scripts/spell-check.R +++ b/scripts/spell-check.R @@ -19,9 +19,10 @@ dictionary <- readLines(file.path(root_dir, 'resources', 'dictionary.txt')) # Add mysterious emoji joining character dictionary <- c(dictionary, spelling::spell_check_text("⬇️")$word) -# Only declare `.Rmd` files +# Only declare `.Rmd` files but not the ones in the style-sets directory files <- list.files(pattern = 'Rmd$', recursive = TRUE, full.names = TRUE) files <- grep("About.Rmd", files, ignore.case = TRUE, invert = TRUE, value = TRUE) +files <- grep("style-sets", files, ignore.case = TRUE, invert = TRUE, value = TRUE) # Run spell check sp_errors <- spelling::spell_check_files(files, ignore = dictionary) %>% diff --git a/style-sets/AnVIL/_output.yml b/style-sets/AnVIL/_output.yml new file mode 100644 index 0000000..7440ec7 --- /dev/null +++ b/style-sets/AnVIL/_output.yml @@ -0,0 +1,16 @@ +bookdown::gitbook: + css: assets/style_anvil.css + includes: + before_body: assets/big-image.html + after_body: assets/footer.html + highlight: tango + config: + toc: + collapse: section + before: | + + after: | +

This content was published with bookdown by:

+

The Johns Hopkins Data Science Lab

+ +

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

diff --git a/style-sets/AnVIL/copy_to_assets/anvil_favicon.ico b/style-sets/AnVIL/copy_to_assets/anvil_favicon.ico new file mode 100755 index 0000000..f1eb1c4 Binary files /dev/null and b/style-sets/AnVIL/copy_to_assets/anvil_favicon.ico differ diff --git a/style-sets/AnVIL/copy_to_assets/logo-anvil.png b/style-sets/AnVIL/copy_to_assets/logo-anvil.png new file mode 100644 index 0000000..83c7b67 Binary files /dev/null and b/style-sets/AnVIL/copy_to_assets/logo-anvil.png differ diff --git a/style-sets/AnVIL/copy_to_assets/style_anvil.css b/style-sets/AnVIL/copy_to_assets/style_anvil.css new file mode 100644 index 0000000..3c1d316 --- /dev/null +++ b/style-sets/AnVIL/copy_to_assets/style_anvil.css @@ -0,0 +1,442 @@ +@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: #68ace5; +} + + +/*------------- 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: #012d72; + 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: #012d72; + 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: #012d72 +} + +.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: #012d72; +} + +.summary a:hover { + color: #68ace5 !important; +} + +.book .book-summary ul.summary li.active>a { /*active TOC links*/ + color: #68ace5 !important; + border-left: solid 4px; + border-color: #68ace5; + 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.rstudio-tip, div.tip, div.gotcha, div.design, div.hat{ + border: 4px #aed6d963; + border-style: dashed solid; + padding: 1em; + margin: 1em 0; + padding-left: 100px; + background-size: 70px; + background-repeat: no-repeat; + background-position: 15px center; + min-height: 120px; + color: #2ea8b3; + background-color: #fcfcfc; +} + + +div.rstudio-tip { + background-image: url("../images/divs/rstudio.png"); +} + +div.tip { + background-image: url("../images/divs/lightbulb.png"); +} + +div.gotcha { + background-image: url("../images/divs/gotcha_2.png"); +} + +div.design { + background-image: url("../images/divs/design.png"); +} + +div.hat { + background-image: url("../images/divs/hat.png"); +} + +/* for fancy bookdown cookbook */ + +div.puzzle, div.fyi, div.demo, div.note { + padding: 1em; + margin: 1em 0; + padding-left: 100px; + background-size: 70px; + background-repeat: no-repeat; + background-position: 15px center; + min-height: 120px; + color: #1f5386; + background-color: #bed3ec; + border: solid 5px #dfedff; +} + +div.puzzle { + background-image: url("../images/illos/Your-turn.png"); +} + +div.fyi { + background-image: url("../images/illos/fyi.png"); +} + +div.demo { + background-image: url("../images/illos/Live-code.png"); +} + +div.note { + background-image: url("../images/illos/lightbulb2.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; +} \ No newline at end of file diff --git a/style-sets/AnVIL/index.Rmd b/style-sets/AnVIL/index.Rmd new file mode 100644 index 0000000..874ba8e --- /dev/null +++ b/style-sets/AnVIL/index.Rmd @@ -0,0 +1,23 @@ +--- +title: "AnVIL: Course Name " +date: "`r format(Sys.time(), '%B, %Y')`" +site: bookdown::bookdown_site +documentclass: book +bibliography: [book.bib, packages.bib] +biblio-style: apalike +link-citations: yes +description: "Description about Course/Book." +favicon: assets/anvil_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 Course {-} + +This book is part of a series of books for the Genomic Data Science Analysis, Visualization, and Informatics Lab-space (AnVIL) of the National Human Genome Research Institute (NHGRI). diff --git a/style-sets/GDSCN/_output.yml b/style-sets/GDSCN/_output.yml new file mode 100644 index 0000000..5a59f74 --- /dev/null +++ b/style-sets/GDSCN/_output.yml @@ -0,0 +1,16 @@ +bookdown::gitbook: + css: assets/style_gdscn.css + includes: + before_body: assets/big-image.html + after_body: assets/footer.html + highlight: tango + config: + toc: + collapse: section + before: | + + after: | +

This content was published with bookdown by:

+

The Johns Hopkins Data Science Lab

+ +

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

diff --git a/style-sets/GDSCN/copy_to_assets/gdscn_favicon.ico b/style-sets/GDSCN/copy_to_assets/gdscn_favicon.ico new file mode 100755 index 0000000..deab663 Binary files /dev/null and b/style-sets/GDSCN/copy_to_assets/gdscn_favicon.ico differ diff --git a/style-sets/GDSCN/copy_to_assets/gdscn_logo.png b/style-sets/GDSCN/copy_to_assets/gdscn_logo.png new file mode 100644 index 0000000..fd84156 Binary files /dev/null and b/style-sets/GDSCN/copy_to_assets/gdscn_logo.png differ diff --git a/style-sets/GDSCN/copy_to_assets/style_gdscn.css b/style-sets/GDSCN/copy_to_assets/style_gdscn.css new file mode 100644 index 0000000..3c1d316 --- /dev/null +++ b/style-sets/GDSCN/copy_to_assets/style_gdscn.css @@ -0,0 +1,442 @@ +@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: #68ace5; +} + + +/*------------- 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: #012d72; + 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: #012d72; + 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: #012d72 +} + +.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: #012d72; +} + +.summary a:hover { + color: #68ace5 !important; +} + +.book .book-summary ul.summary li.active>a { /*active TOC links*/ + color: #68ace5 !important; + border-left: solid 4px; + border-color: #68ace5; + 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.rstudio-tip, div.tip, div.gotcha, div.design, div.hat{ + border: 4px #aed6d963; + border-style: dashed solid; + padding: 1em; + margin: 1em 0; + padding-left: 100px; + background-size: 70px; + background-repeat: no-repeat; + background-position: 15px center; + min-height: 120px; + color: #2ea8b3; + background-color: #fcfcfc; +} + + +div.rstudio-tip { + background-image: url("../images/divs/rstudio.png"); +} + +div.tip { + background-image: url("../images/divs/lightbulb.png"); +} + +div.gotcha { + background-image: url("../images/divs/gotcha_2.png"); +} + +div.design { + background-image: url("../images/divs/design.png"); +} + +div.hat { + background-image: url("../images/divs/hat.png"); +} + +/* for fancy bookdown cookbook */ + +div.puzzle, div.fyi, div.demo, div.note { + padding: 1em; + margin: 1em 0; + padding-left: 100px; + background-size: 70px; + background-repeat: no-repeat; + background-position: 15px center; + min-height: 120px; + color: #1f5386; + background-color: #bed3ec; + border: solid 5px #dfedff; +} + +div.puzzle { + background-image: url("../images/illos/Your-turn.png"); +} + +div.fyi { + background-image: url("../images/illos/fyi.png"); +} + +div.demo { + background-image: url("../images/illos/Live-code.png"); +} + +div.note { + background-image: url("../images/illos/lightbulb2.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; +} \ No newline at end of file diff --git a/style-sets/GDSCN/index.Rmd b/style-sets/GDSCN/index.Rmd new file mode 100644 index 0000000..7717286 --- /dev/null +++ b/style-sets/GDSCN/index.Rmd @@ -0,0 +1,23 @@ +--- +title: "GDSCN: Course Name " +date: "`r format(Sys.time(), '%B, %Y')`" +site: bookdown::bookdown_site +documentclass: book +bibliography: [book.bib, packages.bib] +biblio-style: apalike +link-citations: yes +description: "Description about Course/Book." +favicon: assets/gdscn_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 Course {-} + +This course is part of a series of courses for the [The Genomic Data Science Community Network (GDSCN)](https://www.gdscn.org/home) is a group of educators gathered with the aim to bring genomic data science education to students at diverse institutions. diff --git a/style-sets/data-trail/_output.yml b/style-sets/data-trail/_output.yml new file mode 100644 index 0000000..4c7c20f --- /dev/null +++ b/style-sets/data-trail/_output.yml @@ -0,0 +1,17 @@ +bookdown::gitbook: + css: assets/style_DataTrail.css + includes: + before_body: assets/big-image-DataTrail.html + after_body: assets/footer.html + highlight: tango + config: + toc: + collapse: section + before: | + + after: | +

This content was published with bookdown by:

+

The Johns Hopkins Data Science Lab

+ +

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

+

Click here to provide feedback

diff --git a/style-sets/data-trail/copy-to-assets/DataTrail.jpg b/style-sets/data-trail/copy-to-assets/DataTrail.jpg new file mode 100644 index 0000000..f1902a3 Binary files /dev/null and b/style-sets/data-trail/copy-to-assets/DataTrail.jpg differ diff --git a/style-sets/data-trail/copy-to-assets/DataTrail_favicon.ico b/style-sets/data-trail/copy-to-assets/DataTrail_favicon.ico new file mode 100755 index 0000000..7c0378e Binary files /dev/null and b/style-sets/data-trail/copy-to-assets/DataTrail_favicon.ico differ diff --git a/style-sets/data-trail/copy-to-assets/DataTrail_logo.jpg b/style-sets/data-trail/copy-to-assets/DataTrail_logo.jpg new file mode 100644 index 0000000..1f075b6 Binary files /dev/null and b/style-sets/data-trail/copy-to-assets/DataTrail_logo.jpg differ diff --git a/style-sets/data-trail/copy-to-assets/big-image-DataTrail.html b/style-sets/data-trail/copy-to-assets/big-image-DataTrail.html new file mode 100644 index 0000000..db08b7e --- /dev/null +++ b/style-sets/data-trail/copy-to-assets/big-image-DataTrail.html @@ -0,0 +1,12 @@ + + + + + + + + + +
+ +
\ No newline at end of file diff --git a/style-sets/data-trail/copy-to-assets/style_DataTrail.css b/style-sets/data-trail/copy-to-assets/style_DataTrail.css new file mode 100644 index 0000000..e9f7115 --- /dev/null +++ b/style-sets/data-trail/copy-to-assets/style_DataTrail.css @@ -0,0 +1,458 @@ +@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-color: #133454; +} + +.hero-image { + width: 100%; + height: 200px; + object-fit: cover; +} + +.page-inner { + padding-top: 210px !important; +} +/* ------------Links------------------ */ + +.book .book-body .page-wrapper .page-inner section.normal a { + color: #1a9bc0; +} + + +/*------------- 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: #023e4c; + 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: #023e4c; + 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: #023e4c +} + +.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: #023e4c; +} + +.summary a:hover { + color: #1a9bc0 !important; +} + +.book .book-summary ul.summary li.active>a { /*active TOC links*/ + color: #1a9bc0 !important; + border-left: solid 4px; + border-color: #12af66; + padding-left: 11px !important; +} + +.trapezoid { + width: 130px; + text-align: center; + height: 15; + position: relative; + border-right: 50px solid #023e4c; + border-bottom: 50px solid #e6e762; + border-left: 50px solid #023e4c; + box-sizing: content-box; +} +.trapezoid span { + position: absolute; + top: 5px; + bottom: 5px; + left: 5%; + color: #e6e762; +} + +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.rstudio-tip, div.tip, div.gotcha, div.design, div.hat{ + border: 4px #aed6d963; + border-style: dashed solid; + padding: 1em; + margin: 1em 0; + padding-left: 100px; + background-size: 70px; + background-repeat: no-repeat; + background-position: 15px center; + min-height: 120px; + color: #2ea8b3; + background-color: #fcfcfc; +} + + +div.rstudio-tip { + background-image: url("../images/divs/rstudio.png"); +} + +div.tip { + background-image: url("../images/divs/lightbulb.png"); +} + +div.gotcha { + background-image: url("../images/divs/gotcha_2.png"); +} + +div.design { + background-image: url("../images/divs/design.png"); +} + +div.hat { + background-image: url("../images/divs/hat.png"); +} + +/* for fancy bookdown cookbook */ + +div.puzzle, div.fyi, div.demo, div.note { + padding: 1em; + margin: 1em 0; + padding-left: 100px; + background-size: 70px; + background-repeat: no-repeat; + background-position: 15px center; + min-height: 120px; + color: #1f5386; + background-color: #bed3ec; + border: solid 5px #dfedff; +} + +div.puzzle { + background-image: url("../images/illos/Your-turn.png"); +} + +div.fyi { + background-image: url("../images/illos/fyi.png"); +} + +div.demo { + background-image: url("../images/illos/Live-code.png"); +} + +div.note { + background-image: url("../images/illos/lightbulb2.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; +} \ No newline at end of file diff --git a/style-sets/data-trail/index.Rmd b/style-sets/data-trail/index.Rmd new file mode 100644 index 0000000..34e0f3a --- /dev/null +++ b/style-sets/data-trail/index.Rmd @@ -0,0 +1,38 @@ +--- +title: " Course Name " +date: "`r format(Sys.time(), '%B, %Y')`" +site: bookdown::bookdown_site +documentclass: book +bibliography: [book.bib, packages.bib] +biblio-style: apalike +link-citations: yes +description: "Description about Course/Book." +favicon: assets/DataTrail_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 Course {-} + +This course is part of a series of courses for [DataTrail](https://www.datatrail.org/). DataTrail is a no-cost, paid 14-week educational initiative for young-adult, high school and GED-graduates. DataTrail aims to equip members of underserved communities with the necessary skills and support required to work in the booming field of data science. + +DataTrail is a fresh take on workforce development that focuses on training both Black, Indigenous, and other people of color (BIPOC) interested in the data science industry and their potential employers. + +Offered by the Johns Hopkins Bloomberg School of Public Health, in partnership with local non-profits and Leanpub, DataTrail combines a mutually-intensive learning experience (MILE) with a whole-person ecosystem of support to allow aspiring data scientists and their employers to succeed. + +DataTrail uses mutually-intensive learning +DataTrail joins aspiring data science scholars and expert-level data scientist mentors in a mutually-intensive learning experience (MILE). + +In the DataTrail MILE: + +Scholars engage in cutting-edge technical and soft skills training needed to enter the data science field. + +Mentors engage in anti-racism and mentorship training needed to be impactful mentors and informed colleagues on diverse data science teams. + +The social connections created along the way will fuel job opportunities for scholars and foster a more diverse, equitable, and inclusive climate at the mentors' institutions. diff --git a/style-sets/itcr/_output.yml b/style-sets/itcr/_output.yml new file mode 100644 index 0000000..4554097 --- /dev/null +++ b/style-sets/itcr/_output.yml @@ -0,0 +1,17 @@ +bookdown::gitbook: + css: assets/style_ITN.css + includes: + before_body: assets/big-image-itcr.html + after_body: assets/footer.html + highlight: tango + config: + toc: + collapse: section + before: | + + after: | +

This content was published with bookdown by:

+

The Johns Hopkins Data Science Lab

+ +

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

+

Click here to provide feedback

diff --git a/style-sets/itcr/copy-to-assets/ITN_favicon.ico b/style-sets/itcr/copy-to-assets/ITN_favicon.ico new file mode 100755 index 0000000..726a500 Binary files /dev/null and b/style-sets/itcr/copy-to-assets/ITN_favicon.ico differ diff --git a/style-sets/itcr/copy-to-assets/ITN_logo.png b/style-sets/itcr/copy-to-assets/ITN_logo.png new file mode 100644 index 0000000..0ade934 Binary files /dev/null and b/style-sets/itcr/copy-to-assets/ITN_logo.png differ diff --git a/style-sets/itcr/copy-to-assets/big-image-itcr.html b/style-sets/itcr/copy-to-assets/big-image-itcr.html new file mode 100644 index 0000000..aea142a --- /dev/null +++ b/style-sets/itcr/copy-to-assets/big-image-itcr.html @@ -0,0 +1,12 @@ + + + + + + + + + +
+ +
\ No newline at end of file diff --git a/style-sets/itcr/copy-to-assets/itcr_main_image.png b/style-sets/itcr/copy-to-assets/itcr_main_image.png new file mode 100644 index 0000000..db2c053 Binary files /dev/null and b/style-sets/itcr/copy-to-assets/itcr_main_image.png differ diff --git a/style-sets/itcr/copy-to-assets/style_ITN.css b/style-sets/itcr/copy-to-assets/style_ITN.css new file mode 100644 index 0000000..6f005a2 --- /dev/null +++ b/style-sets/itcr/copy-to-assets/style_ITN.css @@ -0,0 +1,463 @@ +@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: #e0471c; +} + + +/*------------- 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: #193a5c; + 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: #193a5c; + 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: #193a5c +} + +.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: #193a5c; +} + +.summary a:hover { + color: #e0471c !important; +} + +.book .book-summary ul.summary li.active>a { /*active TOC links*/ + color: #e0471c !important; + border-left: solid 4px; + border-color: #e0471c; + padding-left: 11px !important; +} + +.trapezoid { + width: 130px; + text-align: center; + height: 15; + position: relative; + border-right: 50px solid transparent; + border-bottom: 50px solid #dbdbdb; + border-left: 50px solid transparent; + box-sizing: content-box; +} +.trapezoid span { + position: absolute; + top: 5px; + bottom: 5px; + left: 5%; + color: #fff; +} + + + + +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.rstudio-tip, div.tip, div.gotcha, div.design, div.hat{ + border: 4px #aed6d963; + border-style: dashed solid; + padding: 1em; + margin: 1em 0; + padding-left: 100px; + background-size: 70px; + background-repeat: no-repeat; + background-position: 15px center; + min-height: 120px; + color: #2ea8b3; + background-color: #fcfcfc; +} + + +div.rstudio-tip { + background-image: url("../images/divs/rstudio.png"); +} + +div.tip { + background-image: url("../images/divs/lightbulb.png"); +} + +div.gotcha { + background-image: url("../images/divs/gotcha_2.png"); +} + +div.design { + background-image: url("../images/divs/design.png"); +} + +div.hat { + background-image: url("../images/divs/hat.png"); +} + +/* for fancy bookdown cookbook */ + +div.puzzle, div.fyi, div.demo, div.note { + padding: 1em; + margin: 1em 0; + padding-left: 100px; + background-size: 70px; + background-repeat: no-repeat; + background-position: 15px center; + min-height: 120px; + color: #1f5386; + background-color: #bed3ec; + border: solid 5px #dfedff; +} + +div.puzzle { + background-image: url("../images/illos/Your-turn.png"); +} + +div.fyi { + background-image: url("../images/illos/fyi.png"); +} + +div.demo { + background-image: url("../images/illos/Live-code.png"); +} + +div.note { + background-image: url("../images/illos/lightbulb2.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; +} \ No newline at end of file diff --git a/style-sets/itcr/index.Rmd b/style-sets/itcr/index.Rmd new file mode 100644 index 0000000..33a998f --- /dev/null +++ b/style-sets/itcr/index.Rmd @@ -0,0 +1,23 @@ +--- +title: "Informatics Technology for Cancer Research (ITCR): Course Name " +date: "`r format(Sys.time(), '%B, %Y')`" +site: bookdown::bookdown_site +documentclass: book +bibliography: [book.bib, packages.bib] +biblio-style: apalike +link-citations: yes +description: "Description about Course/Book." +favicon: assets/ITN_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 Course {-} + +This course is part of a series of courses for the [Informatics Technology for Cancer Research (ITCR)](https://itcr.cancer.gov/) called the Informatics Technology for Cancer Research Education Resource. This material was created by the ITCR Training Network (ITN) which is a collaborative effort of researchers around the United States to support cancer informatics and data science training through resources, technology, and events. This initiative is funded by the following grant: [National Cancer Institute (NCI)](https://www.cancer.gov/) UE5 CA254170. Our courses feature tools developed by ITCR Investigators and make it easier for principal investigators, scientists, and analysts to integrate cancer informatics into their workflows. Please see our website at [www.itcrtraining.org](www.itcrtraining.org) for more information.