From cefa01c3dd27e103da3f35925f8976e87070aa65 Mon Sep 17 00:00:00 2001 From: Matt Crump Date: Mon, 28 Jan 2019 17:12:36 -0500 Subject: [PATCH 1/2] Update 1 --- docs/Journal.html | 7 +++++-- docs/Links.html | 3 +++ docs/README.html | 10 +++++++--- docs/index.html | 3 +++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/docs/Journal.html b/docs/Journal.html index d61bf505b..554bda2ba 100644 --- a/docs/Journal.html +++ b/docs/Journal.html @@ -93,6 +93,9 @@ .tabbed-pane { padding-top: 12px; } +.html-widget { + margin-bottom: 20px; +} button.code-folding-btn:focus { outline: none; } @@ -305,7 +308,7 @@

Journal

This is an .Rmd file. It is plain text with special features. Any time you write just like this, it will be compiled to normal text in the website. If you put a # in front of your text, it will create a top level-header.

My first post

-

2018 | 7 | 23 Last compiled: 2018-07-23

+

2018 | 7 | 23 Last compiled: 2019-01-28

Notice that whatever you define as a top level header, automatically gets put into the table of contents bar on the left.

Second level header

@@ -318,7 +321,7 @@

third level header

My second post (note the order)

-

2018 | 7 | 23 Last compiled: 2018-07-23

+

2018 | 7 | 23 Last compiled: 2019-01-28

I’m writing this tutorial going from the top down. And, this is how it will be printed. So, notice the second post is second in the list. If you want your most recent post to be at the top, then make a new post starting at the top. If you want the oldest first, do, then keep adding to the bottom

diff --git a/docs/Links.html b/docs/Links.html index 8e129eabf..c4249e86f 100644 --- a/docs/Links.html +++ b/docs/Links.html @@ -90,6 +90,9 @@ .tabbed-pane { padding-top: 12px; } +.html-widget { + margin-bottom: 20px; +} button.code-folding-btn:focus { outline: none; } diff --git a/docs/README.html b/docs/README.html index 540f227a4..c6dff924a 100644 --- a/docs/README.html +++ b/docs/README.html @@ -90,6 +90,9 @@ .tabbed-pane { padding-top: 12px; } +.html-widget { + margin-bottom: 20px; +} button.code-folding-btn:focus { outline: none; } @@ -204,13 +207,14 @@

LabJournalWebsite

-

An R Markdown website template for a lab journal

-

To use this, click the download as .zip button.

+

An R Markdown website template for a lab journal https://crumplab.github.io/LabJournalWebsite/index.html

+

To use this, click the download as .zip button to start from a local computer, or skip down to the github example to fork this and get started that way.

The unzipped folder contains all of the files you need to compile a website in R Markdown. This should all work fine if you have the latest version of R and R-studio installed.

Steps for compiling on your local computer

  1. Make sure R and R-studio are installed
  2. +
  3. Make sure the rmarkdown package is installed in R-studio. Open R-studio, click the packages tab in the lower left hand corner, click install packages, type in rmarkdown, make sure “install dependencies” is clicked on, then press install. Close R-studio.
  4. Navigate to the folder you just downloaded, open the ‘LabJournalWebsite.Proj’ file. This should automatically open R-studio, and your current working environment will be inside this project. That means everything you save will be auto saved to this folder (unless you tell R-studio to save something somewhere else.
  5. Inside R-studio you should see a files tab in the bottom right hand corner. Most files you click will be opened up as text files in the R-studio editor. Click the “Index.Rmd” file.
  6. To compile the entire website, find the build tab in the top right hand corner. You should see the option to “build website”. Click this. The website should be built.
  7. @@ -220,7 +224,7 @@

    Steps for compiling on your local computer

Steps for serving your webpage using github pages.

-

This is the source code repository for making the webpage in R-studio. At the same time, the resulting website is being served from this repository at this link add link.

+

This is the source code repository for making the webpage in R-studio. At the same time, the resulting website is being served from this repository at this link https://crumplab.github.io/LabJournalWebsite/index.html.

Every github repository has the capability of serving html files (web page files) contained in the repository, this is called github pages. How this works depends a little bit on the specific repository you are using. For this repository. The webpage is served from the docs folder. The example files are set so that when you compile the example in R-studio, the output automatically goes into the docs folder. As a result, when you have these files in a github repository, github will serve the html files in your docs folder as a website.

Steps

    diff --git a/docs/index.html b/docs/index.html index 541c46e9b..279fdef56 100644 --- a/docs/index.html +++ b/docs/index.html @@ -90,6 +90,9 @@ .tabbed-pane { padding-top: 12px; } +.html-widget { + margin-bottom: 20px; +} button.code-folding-btn:focus { outline: none; } From 18cb9d22003e60db379c359b21a90db3353afac3 Mon Sep 17 00:00:00 2001 From: anthonymccreeryosg Date: Mon, 2 Nov 2020 16:45:39 -0500 Subject: [PATCH 2/2] Update 1 --- _site.yml | 4 +- docs/Journal.html | 209 ++++++++++--- docs/Links.html | 157 ++++++++-- docs/README.html | 279 ------------------ docs/index.html | 157 ++++++++-- .../anchor-sections-1.0/anchor-sections.css | 4 + .../anchor-sections-1.0/anchor-sections.js | 33 +++ .../bootstrap-3.3.5/css/darkly.min.css | 30 ++ docs/site_libs/navigation-1.1/codefolding.js | 10 +- docs/site_libs/tocify-1.9.1/jquery.tocify.css | 10 +- docs/site_libs/tocify-1.9.1/jquery.tocify.js | 4 +- index.Rmd | 4 +- 12 files changed, 526 insertions(+), 375 deletions(-) delete mode 100644 docs/README.html create mode 100644 docs/site_libs/anchor-sections-1.0/anchor-sections.css create mode 100644 docs/site_libs/anchor-sections-1.0/anchor-sections.js create mode 100644 docs/site_libs/bootstrap-3.3.5/css/darkly.min.css diff --git a/_site.yml b/_site.yml index ff5685971..d9ed39ec2 100644 --- a/_site.yml +++ b/_site.yml @@ -1,6 +1,6 @@ -name: "MyLabJournal" +name: "OSG Reports" navbar: - title: "MyLabJournal" + title: "OSG Reports" left: - text: "Home" href: index.html diff --git a/docs/Journal.html b/docs/Journal.html index 554bda2ba..c912625dd 100644 --- a/docs/Journal.html +++ b/docs/Journal.html @@ -1,12 +1,12 @@ - + - + @@ -25,6 +25,17 @@ + + + + - - @@ -113,7 +124,6 @@ padding-top: 56px; margin-top: -56px; } - .section h2 { padding-top: 56px; margin-top: -56px; @@ -134,6 +144,43 @@ padding-top: 56px; margin-top: -56px; } +.dropdown-submenu { + position: relative; +} +.dropdown-submenu>.dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + border-radius: 0 6px 6px 6px; +} +.dropdown-submenu:hover>.dropdown-menu { + display: block; +} +.dropdown-submenu>a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} +.dropdown-submenu:hover>a:after { + border-left-color: #ffffff; +} +.dropdown-submenu.pull-left { + float: none; +} +.dropdown-submenu.pull-left>.dropdown-menu { + left: -100%; + margin-left: 10px; + border-radius: 6px 0 6px 6px; +} + -
    + + + - // establish options - var options = { - selectors: "h1", - theme: "bootstrap3", - context: '.toc-content', - hashGenerator: function (text) { - return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_').toLowerCase(); - }, - ignoreSelector: ".toc-ignore", - scrollTo: 0 - }; - options.showAndHide = true; - options.smoothScroll = true; - // tocify - var toc = $("#TOC").tocify(options).data("toc-tocify"); -}); - + + + + + + + +
    + +
    @@ -274,7 +354,7 @@ - MyLabJournal + OSG Reports
@@ -232,7 +334,7 @@

Additional R resources

// add bootstrap table styles to pandoc tables function bootstrapStylePandocTables() { - $('tr.header').parent('thead').parent('table').addClass('table table-condensed'); + $('tr.odd').parent('tbody').parent('table').addClass('table table-condensed'); } $(document).ready(function () { bootstrapStylePandocTables(); @@ -241,6 +343,23 @@

Additional R resources

+ + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
-

LabJournalWebsite

-

An R Markdown website template for a lab journal https://crumplab.github.io/LabJournalWebsite/index.html

-

To use this, click the download as .zip button to start from a local computer, or skip down to the github example to fork this and get started that way.

-

The unzipped folder contains all of the files you need to compile a website in R Markdown. This should all work fine if you have the latest version of R and R-studio installed.

-
-

Steps for compiling on your local computer

-
    -
  1. Make sure R and R-studio are installed
  2. -
  3. Make sure the rmarkdown package is installed in R-studio. Open R-studio, click the packages tab in the lower left hand corner, click install packages, type in rmarkdown, make sure “install dependencies” is clicked on, then press install. Close R-studio.
  4. -
  5. Navigate to the folder you just downloaded, open the ‘LabJournalWebsite.Proj’ file. This should automatically open R-studio, and your current working environment will be inside this project. That means everything you save will be auto saved to this folder (unless you tell R-studio to save something somewhere else.
  6. -
  7. Inside R-studio you should see a files tab in the bottom right hand corner. Most files you click will be opened up as text files in the R-studio editor. Click the “Index.Rmd” file.
  8. -
  9. To compile the entire website, find the build tab in the top right hand corner. You should see the option to “build website”. Click this. The website should be built.
  10. -
  11. After the website is built, you should be able to see it in the R-studio browser. There is a little button (blue arrow with a little browser icon) that allows you to pop the website into your default web-browser. This way you can look at the website in your browser.
  12. -
-

Important: After compilation, all of the files for displaying your website are saved in the folder where your R project resides. When you look at these in a browser (for example, by going to the folder and dragging the index.html file into a browser), you are loading from your disk. Only you will be able to see the website, because it is on your hard-drive. You need to upload to a web server to serve the webpage on the internet.

-
-
-

Steps for serving your webpage using github pages.

-

This is the source code repository for making the webpage in R-studio. At the same time, the resulting website is being served from this repository at this link https://crumplab.github.io/LabJournalWebsite/index.html.

-

Every github repository has the capability of serving html files (web page files) contained in the repository, this is called github pages. How this works depends a little bit on the specific repository you are using. For this repository. The webpage is served from the docs folder. The example files are set so that when you compile the example in R-studio, the output automatically goes into the docs folder. As a result, when you have these files in a github repository, github will serve the html files in your docs folder as a website.

-

Steps

-
    -
  1. For this repo to your github (press the fork button in top right hand corner, then choose your github account)
  2. -
  3. You should now see a copy of this repo in your github account
  4. -
  5. Click the Settings (also near top right), scroll down to Github Pages options
  6. -
  7. click the optino to serve from docs folder
  8. -
  9. You should see a little green message above the github pages options with a link to your new webpage.
  10. -
-

Editing webpage and serving on github

-
    -
  1. download github desktop
  2. -
  3. make sure it is connected to your account
  4. -
  5. clone the website repo to your local computer
  6. -
  7. Open up the project file in the folder for your repo on your local computer (.rproj file)
  8. -
  9. Edit the .rmd files in R-studio
  10. -
  11. Recompile website (build website when index.rmd is loaded), or knit individual .rmd files
  12. -
  13. send your changes back to the online github repository (note this can be done in github desktop, or directly in R-studio, in R-studio you will see a git tab if you are working in a git repo. Click the git tab, click the diff button, which will show you if there are any new changes. Click each of the files that you want to commit. Write a short note to describe the changes. Press the commit button. Wait a couple seconds, your changes should now be served on your website).
  14. -
-
-
- - - - -
- - - - - - - - diff --git a/docs/index.html b/docs/index.html index 279fdef56..5cecad928 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,17 +1,17 @@ - + - + -MyLabJournal +OSG Reports @@ -22,6 +22,17 @@ + + + + - - @@ -110,7 +121,6 @@ padding-top: 56px; margin-top: -56px; } - .section h2 { padding-top: 56px; margin-top: -56px; @@ -131,6 +141,43 @@ padding-top: 56px; margin-top: -56px; } +.dropdown-submenu { + position: relative; +} +.dropdown-submenu>.dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + border-radius: 0 6px 6px 6px; +} +.dropdown-submenu:hover>.dropdown-menu { + display: block; +} +.dropdown-submenu>a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} +.dropdown-submenu:hover>a:after { + border-left-color: #ffffff; +} +.dropdown-submenu.pull-left { + float: none; +} +.dropdown-submenu.pull-left>.dropdown-menu { + left: -100%; + margin-left: 10px; + border-radius: 6px 0 6px 6px; +} + -
+ + + + + + +
+ + @@ -218,11 +320,11 @@

MyLabJournal

-

My Lab Journal

+

OSG Reports

This is a template example for lab journaling. Students in Matt Crump’s Human Cognition and Performance Lab will use this template to learn R, and other things. Students can replace this text with more fun things. People not in my lab can use this too.

How to use

    -
  1. fork the repo for this website and follow instructions on read me to get set up. https://github.com/CrumpLab/LabJournalWebsite

  2. +
  3. fork the repo for this website and follow instructions on read me to get set up. https://github.com/CrumpLab/LabJournalWebsite

  4. Blog/journal what you are doing in R, by editing the Journal.Rmd. See the Journal page for an example of what to do to get started learning R.

  5. See the links page for lots of helpful links on learning R.

  6. Change everything to make it your own.

  7. @@ -242,7 +344,7 @@

    .nav-tabs > li').click(function () { + $(this).parent().toggleClass('nav-tabs-open') + }); +}); + + + + +