diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 2373a39..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.html -_tmp -/.quarto/ diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..223601c --- /dev/null +++ b/.nojekyll @@ -0,0 +1 @@ +1c770631 \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 3636b7b..0000000 --- a/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# R Validation Hub `quarto` Theme - -[preview.webm](https://github.com/pharmaR/rvalhub-quarto/assets/18220321/cfc056b1-a0d2-411b-be87-aa81f4fdae30) - -`format: rvalhub-revealjs+light` (or default alias, `rvalhub-revealjs`) -![image](https://github.com/pharmaR/rvalhub-quarto/assets/18220321/aa4e4790-6ca6-47be-97b5-9b23b2580684) - -`format: rvalhub-revealjs+dark` -![image](https://github.com/pharmaR/rvalhub-quarto/assets/18220321/e5185955-97a8-4021-b036-d0a29267cebc) - -## Getting Started - -### Installing - -After creating your new quarto presentation, you can add the R Validation Hub -theme by following a simple, two-step installation process. - -```bash -quarto add pharmaR/rvalhub-quarto -``` - -
-alternatively install from an archive url - -```bash -quarto add https://github.com/pharmaR/rvalhub-quarto/archive/refs/heads/main.zip -``` - -
- -After installing, your project should contain a `_extensions/pharmaR/rvalhub` directory. - -> ***Note: GitHub Organization Case Sensitivity*** -> Although `quarto` will gladly install the extension using a case-insensitive -> GitHub org, assets used throughout the extension will use case-sensitive file paths. -> Be sure to use the appropriate casing. - -### Using - -After you've installed the extension, you need to use one of the provided -formats. This can be provided either in your `_quarto.yml` file or in the front -matter of a standalone `quarto` document. - -**_quarto.yml** -``` -format: rvalhub-revealjs -``` - -As well as the provided default, you can specify either a light or dark theme -using the format variants, `rvalhub-revealjs+light` and `rvalhub-revealjs+dark`. - -## Example - -Here is the source code for a minimal sample document: [example.qmd](example.qmd). - -After cloning this repo, you can test it out by running - -``` -quarto preview example.qmd -``` - -## Starting a new `quarto` project - -### Using `quarto` from the command line - -1. Create a new `quarto` project - -``` -quarto create # follow prompts to start a default project -``` - -> _change to new project directory_ - -2. Add `quarto` format extension - -``` -quarto add pharmaR/rvalhub-quarto -``` - -3. Update your `_quarto.yml` file - -```diff -+ format: rvalhub-revealjs -``` - -or use the dark variant by using: - -```diff -+ format: rvalhub-revealjs+dark -``` \ No newline at end of file diff --git a/_extensions/pharmaR/rvalhub/_extension.yml b/_extensions/pharmaR/rvalhub/_extension.yml deleted file mode 100644 index df258f4..0000000 --- a/_extensions/pharmaR/rvalhub/_extension.yml +++ /dev/null @@ -1,54 +0,0 @@ -title: rvalhub -author: dgkf -version: 1.0.0 -quarto-required: ">=1.2.0" -contributes: - formats: - revealjs: - # general - - self-contained: true - theme: [default, custom.scss, custom-light.scss] - template-partials: - - revealjs-assets/title-slide.html - - # code - highlight-style: arrow - code-line-numbers: true - code-annotations: hover - - # assets - logo: assets/logo.svg - background-image: assets/swirling-margins.svg - - revealjs+light: - # general - self-contained: true - theme: [default, custom.scss, custom-light.scss] - template-partials: - - revealjs-assets/title-slide.html - - # code - highlight-style: arrow - code-line-numbers: true - code-annotations: hover - - # assets - logo: assets/logo.svg - background-image: assets/swirling-margins.svg - - revealjs+dark: - # general - self-contained: true - theme: [dark, custom.scss, custom-dark.scss] - template-partials: - - revealjs-assets/title-slide.html - - # code - highlight-style: ayu - code-line-numbers: true - code-annotations: hover - - # assets - logo: assets/logo.svg - background-image: assets/swirling-margins.svg diff --git a/_extensions/pharmaR/rvalhub/assets/logo.svg b/_extensions/pharmaR/rvalhub/assets/logo.svg deleted file mode 100644 index 95e42aa..0000000 --- a/_extensions/pharmaR/rvalhub/assets/logo.svg +++ /dev/null @@ -1,131 +0,0 @@ - - - - diff --git a/_extensions/pharmaR/rvalhub/assets/logo_small.svg b/_extensions/pharmaR/rvalhub/assets/logo_small.svg deleted file mode 100644 index 5ba2702..0000000 --- a/_extensions/pharmaR/rvalhub/assets/logo_small.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - diff --git a/_extensions/pharmaR/rvalhub/assets/swirling-margins.svg b/_extensions/pharmaR/rvalhub/assets/swirling-margins.svg deleted file mode 100644 index 94ddd03..0000000 --- a/_extensions/pharmaR/rvalhub/assets/swirling-margins.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/_extensions/pharmaR/rvalhub/custom-dark.scss b/_extensions/pharmaR/rvalhub/custom-dark.scss deleted file mode 100644 index 44a6b78..0000000 --- a/_extensions/pharmaR/rvalhub/custom-dark.scss +++ /dev/null @@ -1,49 +0,0 @@ -/*-- scss:defaults --*/ -$tippy-border: rgb(64, 64, 64); - -/*-- scss:rules --*/ -.reveal { - .slide-logo { - filter: drop-shadow(0px 3px 2px #0006); - } - - .code-copy-button { - filter: brightness(0%) invert(100%) opacity(30%); - } - - .code-copy-button:hover { - filter: brightness(0%) invert(80%) opacity(90%); - } - - .code-annotation-anchor { - filter: brightness(0%) invert(100%) opacity(30%); - } - - .cell { - // console code output - .cell-output pre { - background-color: rgba(0, 0, 0, 0.5); - } - } - - // code annotation hover box - .tippy-box[data-theme~="light-border"] { - border-color: $tippy-border; - } - - .tippy-box[data-theme~="light-border"][data-placement^="top"] > .tippy-arrow::before { - border-top-color: $tippy-border; - } - - .tippy-box[data-theme~="light-border"][data-placement^="right"] > .tippy-arrow::before { - border-right-color: $tippy-border; - } - - .tippy-box[data-theme~="light-border"][data-placement^="bottom"] > .tippy-arrow::before { - border-bottom-color: $tippy-border; - } - - .tippy-box[data-theme~="light-border"][data-placement^="left"] > .tippy-arrow::before { - border-left-color: $tippy-border; - } -} \ No newline at end of file diff --git a/_extensions/pharmaR/rvalhub/custom-light.scss b/_extensions/pharmaR/rvalhub/custom-light.scss deleted file mode 100644 index e1f6719..0000000 --- a/_extensions/pharmaR/rvalhub/custom-light.scss +++ /dev/null @@ -1,42 +0,0 @@ -/*-- scss:defaults --*/ -$primary: #4d8dc9; -$secondary: #68b8e5; - -$presentation-heading-color: $primary; - -$tippy-border: rgb(200, 200, 200); - -/*-- scss:rules --*/ -.reveal { - .slide-logo { - filter: drop-shadow(0px 0px 3px #FFF); - } - - .cell { - // console code output - .cell-output pre { - background-color: rgba(210, 220, 230, 0.6); - } - } - - // code annotation hover box - .tippy-box[data-theme~="light-border"] { - border-color: $tippy-border; - } - - .tippy-box[data-theme~="light-border"][data-placement^="top"] > .tippy-arrow::before { - border-top-color: $tippy-border; - } - - .tippy-box[data-theme~="light-border"][data-placement^="right"] > .tippy-arrow::before { - border-right-color: $tippy-border; - } - - .tippy-box[data-theme~="light-border"][data-placement^="bottom"] > .tippy-arrow::before { - border-bottom-color: $tippy-border; - } - - .tippy-box[data-theme~="light-border"][data-placement^="left"] > .tippy-arrow::before { - border-left-color: $tippy-border; - } -} \ No newline at end of file diff --git a/_extensions/pharmaR/rvalhub/custom.scss b/_extensions/pharmaR/rvalhub/custom.scss deleted file mode 100644 index 3899c87..0000000 --- a/_extensions/pharmaR/rvalhub/custom.scss +++ /dev/null @@ -1,63 +0,0 @@ -/*-- scss:defaults --*/ -$primary: #4d8dc9; -$secondary: #68b8e5; - -$presentation-title-slide-text-align: left; -$link-color: $primary; -$code-block-bg: rgba(lighten($primary, 20%), 0.1); -$code-block-border-color: transparent; - -/*-- scss:rules --*/ -.reveal { - .slide-logo { - max-height: 12.5vh !important; - max-width: 20vw !important; - } - - .backgrounds { - background-size: cover; - background-position-y: center; - } - - .slide-logo-title { - visibility: hidden; - } - - .cell { - // echo'ed code blocks - .sourceCode { - background-color: transparent; - - // only blur and apply colors to code-containing div, otherwise we blur the text as well - pre { - background-color: rgba($primary, 0.1); - backdrop-filter: blur(10px); - } - - // line number gutters - span > a::before { - background-color: rgba($primary, 0.1); - } - } - - // console code output - .cell-output pre { - background-color: rgba(0, 0, 0, 0.5); - backdrop-filter: blur(10px); - - code { - background-color: transparent; - } - } - - // filename line - .code-with-filename-file { - background-color: rgba($primary, 0.2); - backdrop-filter: blur(10px); - - pre { - background-color: transparent; - } - } - } -} \ No newline at end of file diff --git a/_extensions/pharmaR/rvalhub/raw-assets/logo.svg b/_extensions/pharmaR/rvalhub/raw-assets/logo.svg deleted file mode 100644 index e26730b..0000000 --- a/_extensions/pharmaR/rvalhub/raw-assets/logo.svg +++ /dev/null @@ -1,162 +0,0 @@ - - - - diff --git a/_extensions/pharmaR/rvalhub/raw-assets/logo_small.svg b/_extensions/pharmaR/rvalhub/raw-assets/logo_small.svg deleted file mode 100644 index cb8fa36..0000000 --- a/_extensions/pharmaR/rvalhub/raw-assets/logo_small.svg +++ /dev/null @@ -1,83 +0,0 @@ - - - - diff --git a/_extensions/pharmaR/rvalhub/revealjs-assets/title-slide.html b/_extensions/pharmaR/rvalhub/revealjs-assets/title-slide.html deleted file mode 100644 index ad62bc7..0000000 --- a/_extensions/pharmaR/rvalhub/revealjs-assets/title-slide.html +++ /dev/null @@ -1,35 +0,0 @@ -
- - - - -

$title$

-$if(subtitle)$ -

$subtitle$

-$endif$ -$for(author)$ -

$author$

-$endfor$ -$for(institute)$ -

$institute$

-$endfor$ -$if(date)$ -

$date$

-$endif$ -
\ No newline at end of file diff --git a/example.html b/example.html new file mode 100644 index 0000000..f50fe99 --- /dev/null +++ b/example.html @@ -0,0 +1,2738 @@ + + + + + + + + + + + + + + + Quarto Theme + + + + + + + + + + + + + + + +
+
+ +
+ + + + +

Quarto Theme

+

Title Slide Subtitle

+

Author One

+

Another Author

+
+
+

Standard Slide Format

+

This is how a block of text will appear. Links, such as one to pharmar.org, will appear like this.

+
    +
  • Bullet item one
  • +
  • Bullet item two
  • +
+
+
+

Plot Output

+
+
library(ggplot2)
+
+ggplot(mpg, aes(displ, hwy, colour = class)) + 
+  geom_point()
+ +
+
+
+

Other Code Cells

+
Using #| code-line-numbers: "2,3"
+
+
fibonacci <- function(n) {
+  if (n <= 1) return(0)
+  if (n == 2) return(1)
+  fibonacci(n - 1) + fibonacci(n - 2)
+}
+
+
+
+

Console Output

+

Example base analogs to common dplyr functions:

+
+
+
+
script.R
+
+
mtcars |>
+  subset(cyl > 2) |>
+  transform(qmin = qsec / 60) |>
+  subset(select = c("mpg", "cyl", "qmin")) |>
+  head()
+
+
+
+
1
+
+subset can be used as a simple stand-in for dplyr::filter +
+
2
+
+transform can be used as a replacement for dplyr::mutate +
+
+
+
+
                   mpg cyl      qmin
+Mazda RX4         21.0   6 0.2743333
+Mazda RX4 Wag     21.0   6 0.2836667
+Datsun 710        22.8   4 0.3101667
+Hornet 4 Drive    21.4   6 0.3240000
+Hornet Sportabout 18.7   8 0.2836667
+Valiant           18.1   6 0.3370000
+
+
+
+

+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/example.qmd b/example.qmd deleted file mode 100644 index d529d08..0000000 --- a/example.qmd +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: "Quarto Theme" -subtitle: "Title Slide Subtitle" -author: - - Author One - - Another Author - -format: rvalhub-revealjs ---- - -```{r setup} -#| echo: false -#| include: false - -# manage thematic manually, in the "Future" this should work out-of-the-box -# https://github.com/quarto-dev/quarto-cli/issues/482 -library(thematic) -library(ggplot2) - -thematic_on( - fg = "#808080", - accent = "#4d8dc9", - bg = "transparent", - font = font_spec(scale = 1.5) -) - -theme_update( - panel.background = element_rect(fill = alpha("#808080", 0.05)) -) -``` - -## Standard Slide Format - -This is how a block of text will appear. Links, such as one to [pharmar.org](https:// -www.pharmar.org), will appear like this. - -- Bullet item one -- Bullet item two - -## Plot Output - -```{r} -#| echo: true - -library(ggplot2) - -ggplot(mpg, aes(displ, hwy, colour = class)) + - geom_point() -``` - -## Console Output - -Example `base` analogs to common `dplyr` functions: - -```{r, filename="script.R"} -#| echo: true - -mtcars |> - subset(cyl > 2) |> # <1> - transform(qmin = qsec / 60) |> # <2> - subset(select = c("mpg", "cyl", "qmin")) |> - head() -``` -1. `subset` can be used as a simple stand-in for `dplyr::filter` -2. `transform` can be used as a replacement for `dplyr::mutate` diff --git a/index.html b/index.html new file mode 100644 index 0000000..f50fe99 --- /dev/null +++ b/index.html @@ -0,0 +1,2738 @@ + + + + + + + + + + + + + + + Quarto Theme + + + + + + + + + + + + + + + +
+
+ +
+ + + + +

Quarto Theme

+

Title Slide Subtitle

+

Author One

+

Another Author

+
+
+

Standard Slide Format

+

This is how a block of text will appear. Links, such as one to pharmar.org, will appear like this.

+
    +
  • Bullet item one
  • +
  • Bullet item two
  • +
+
+
+

Plot Output

+
+
library(ggplot2)
+
+ggplot(mpg, aes(displ, hwy, colour = class)) + 
+  geom_point()
+ +
+
+
+

Other Code Cells

+
Using #| code-line-numbers: "2,3"
+
+
fibonacci <- function(n) {
+  if (n <= 1) return(0)
+  if (n == 2) return(1)
+  fibonacci(n - 1) + fibonacci(n - 2)
+}
+
+
+
+

Console Output

+

Example base analogs to common dplyr functions:

+
+
+
+
script.R
+
+
mtcars |>
+  subset(cyl > 2) |>
+  transform(qmin = qsec / 60) |>
+  subset(select = c("mpg", "cyl", "qmin")) |>
+  head()
+
+
+
+
1
+
+subset can be used as a simple stand-in for dplyr::filter +
+
2
+
+transform can be used as a replacement for dplyr::mutate +
+
+
+
+
                   mpg cyl      qmin
+Mazda RX4         21.0   6 0.2743333
+Mazda RX4 Wag     21.0   6 0.2836667
+Datsun 710        22.8   4 0.3101667
+Hornet 4 Drive    21.4   6 0.3240000
+Hornet Sportabout 18.7   8 0.2836667
+Valiant           18.1   6 0.3370000
+
+
+
+

+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file