From 4711a06d3934c802f1e8ca764e895cf437268948 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Wed, 3 Jan 2024 13:31:46 -0800 Subject: [PATCH 1/8] Add _extension.yml that contains many of the single document settings. --- _extensions/hsnr/_extension.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 _extensions/hsnr/_extension.yml diff --git a/_extensions/hsnr/_extension.yml b/_extensions/hsnr/_extension.yml new file mode 100644 index 0000000..8cab3a0 --- /dev/null +++ b/_extensions/hsnr/_extension.yml @@ -0,0 +1,32 @@ +title: hsnr +author: Joe Slam and James Joseph Balamuta +version: 1.0.0 +quarto-required: ">=1.3.0" +contributes: + formats: + revealjs: + embed-resources: true + transition: fade + background-transition: slide + theme: [default, HSNR.scss, fontvollkorn.scss, fontrobotmono.scss] + date-format: long + footer: "Prof. Dr. Theo Rethisch | Fachbereich 10 | Hochschule Niederrhein" + lang: de + slide-number: true + scrollable: true + citations-hover: true + footnotes-hover: true + controls: true + hash-type: number + from: markdown+emoji + fig-format: png + hide-inactive-cursor: true + hide-cursor-time: 200 + link-external-icon: true + link-external-newwindow: true + format-resources: + - fonts/Roboto-Mono-regular.woff2 + - fonts/Vollkorn-Bold.woff2 + - fonts/Vollkorn-BoldItalic.woff2 + - fonts/Vollkorn-Italic.woff2 + - fonts/Vollkorn-Regular.woff2 From 8dfe21f7551adfea1a6890e0f7e1f791c9dd96a8 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Wed, 3 Jan 2024 13:32:22 -0800 Subject: [PATCH 2/8] Move fonts to be under _extensions/fonts --- .../hsnr/fonts}/Roboto-Mono-regular.woff2 | Bin .../hsnr/fonts}/Vollkorn-Bold.woff2 | Bin .../hsnr/fonts}/Vollkorn-BoldItalic.woff2 | Bin .../hsnr/fonts}/Vollkorn-Italic.woff2 | Bin .../hsnr/fonts}/Vollkorn-Regular.woff2 | Bin 5 files changed, 0 insertions(+), 0 deletions(-) rename {fonts => _extensions/hsnr/fonts}/Roboto-Mono-regular.woff2 (100%) rename {fonts => _extensions/hsnr/fonts}/Vollkorn-Bold.woff2 (100%) rename {fonts => _extensions/hsnr/fonts}/Vollkorn-BoldItalic.woff2 (100%) rename {fonts => _extensions/hsnr/fonts}/Vollkorn-Italic.woff2 (100%) rename {fonts => _extensions/hsnr/fonts}/Vollkorn-Regular.woff2 (100%) diff --git a/fonts/Roboto-Mono-regular.woff2 b/_extensions/hsnr/fonts/Roboto-Mono-regular.woff2 similarity index 100% rename from fonts/Roboto-Mono-regular.woff2 rename to _extensions/hsnr/fonts/Roboto-Mono-regular.woff2 diff --git a/fonts/Vollkorn-Bold.woff2 b/_extensions/hsnr/fonts/Vollkorn-Bold.woff2 similarity index 100% rename from fonts/Vollkorn-Bold.woff2 rename to _extensions/hsnr/fonts/Vollkorn-Bold.woff2 diff --git a/fonts/Vollkorn-BoldItalic.woff2 b/_extensions/hsnr/fonts/Vollkorn-BoldItalic.woff2 similarity index 100% rename from fonts/Vollkorn-BoldItalic.woff2 rename to _extensions/hsnr/fonts/Vollkorn-BoldItalic.woff2 diff --git a/fonts/Vollkorn-Italic.woff2 b/_extensions/hsnr/fonts/Vollkorn-Italic.woff2 similarity index 100% rename from fonts/Vollkorn-Italic.woff2 rename to _extensions/hsnr/fonts/Vollkorn-Italic.woff2 diff --git a/fonts/Vollkorn-Regular.woff2 b/_extensions/hsnr/fonts/Vollkorn-Regular.woff2 similarity index 100% rename from fonts/Vollkorn-Regular.woff2 rename to _extensions/hsnr/fonts/Vollkorn-Regular.woff2 From a09dac1331d8a2499f042e4734a892d5949a95a1 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Wed, 3 Jan 2024 13:33:20 -0800 Subject: [PATCH 3/8] Change file paths to match with fonts being automatically copied to top-level repository. --- HSNR.scss => _extensions/hsnr/HSNR.scss | 0 .../hsnr/fontrobotmono.scss | 4 +--- fontvollkorn.scss => _extensions/hsnr/fontvollkorn.scss | 9 ++++----- 3 files changed, 5 insertions(+), 8 deletions(-) rename HSNR.scss => _extensions/hsnr/HSNR.scss (100%) rename fontrobotmono.scss => _extensions/hsnr/fontrobotmono.scss (67%) rename fontvollkorn.scss => _extensions/hsnr/fontvollkorn.scss (57%) diff --git a/HSNR.scss b/_extensions/hsnr/HSNR.scss similarity index 100% rename from HSNR.scss rename to _extensions/hsnr/HSNR.scss diff --git a/fontrobotmono.scss b/_extensions/hsnr/fontrobotmono.scss similarity index 67% rename from fontrobotmono.scss rename to _extensions/hsnr/fontrobotmono.scss index 45de17a..4eacd3a 100644 --- a/fontrobotmono.scss +++ b/_extensions/hsnr/fontrobotmono.scss @@ -3,9 +3,7 @@ $font-family-monospace: "Roboto Mono" !default; @font-face { font-family: 'Roboto Mono'; - src: url('../../../../../fonts/Roboto-Mono-regular.woff2') format('woff2'); + src: url('../../../../../Roboto-Mono-regular.woff2') format('woff2'); font-weight: normal; font-style: normal; } - - diff --git a/fontvollkorn.scss b/_extensions/hsnr/fontvollkorn.scss similarity index 57% rename from fontvollkorn.scss rename to _extensions/hsnr/fontvollkorn.scss index aefac3f..400f80a 100644 --- a/fontvollkorn.scss +++ b/_extensions/hsnr/fontvollkorn.scss @@ -1,12 +1,11 @@ /*-- scss:defaults --*/ -@import url(fonts/Vollkorn-Regular.woff2); $font-family-sans-serif: "Vollkorn" !default; @font-face { font-family: 'Vollkorn'; - src: url('../../../../../fonts/Vollkorn-Regular.woff2') format('woff2'); + src: url('../../../../../Vollkorn-Regular.woff2') format('woff2'); font-weight: normal; // Black font-style: normal; } @@ -15,7 +14,7 @@ $font-family-sans-serif: "Vollkorn" !default; @font-face { font-family: 'Vollkorn'; - src: url('../../../../../fonts/Vollkorn-Italic.woff2') format('woff2'); + src: url('../../../../../Vollkorn-Italic.woff2') format('woff2'); font-weight: normal; // Black font-style: italic; } @@ -24,14 +23,14 @@ $font-family-sans-serif: "Vollkorn" !default; @font-face { font-family: 'Vollkorn'; - src: url('../../../../../fonts/Vollkorn-Bold.woff2') format('woff2'); + src: url('../../../../../Vollkorn-Bold.woff2') format('woff2'); font-weight: bold; font-style: normal; } @font-face { font-family: 'Vollkorn'; - src: url('../../../../../fonts/Vollkorn-BoldItalic.woff2') format('woff2'); + src: url('../../../../../Vollkorn-BoldItalic.woff2') format('woff2'); font-weight: bold; font-style: italic; } From e5c0247b987c624d5335caa7add6009dd0f7c140 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Wed, 3 Jan 2024 13:35:04 -0800 Subject: [PATCH 4/8] Remove duplicate definition of Vollkorn-Regular.woff2 --- _extensions/hsnr/fontvollkorn.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/_extensions/hsnr/fontvollkorn.scss b/_extensions/hsnr/fontvollkorn.scss index 400f80a..4b2df93 100644 --- a/_extensions/hsnr/fontvollkorn.scss +++ b/_extensions/hsnr/fontvollkorn.scss @@ -1,6 +1,5 @@ /*-- scss:defaults --*/ - $font-family-sans-serif: "Vollkorn" !default; @font-face { From 0b6f6f86a1c45e564984cb6b17ce36f20ebfff44 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Wed, 3 Jan 2024 13:35:57 -0800 Subject: [PATCH 5/8] Update the test document YAML and hide an image missing from the repo. --- Folientest.qmd | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/Folientest.qmd b/Folientest.qmd index 080d204..c620643 100644 --- a/Folientest.qmd +++ b/Folientest.qmd @@ -1,31 +1,8 @@ --- -footer: "Prof. Dr. Theo Rethisch | Fachbereich 10 | Hochschule Niederrhein" -lang: de +title: "Demo" bibliography: literatur.bib -slide-number: true -scrollable: true -citations-hover: true -footnotes-hover: true -controls: true -hash-type: number -from: markdown+emoji -fig-format: png -hide-inactive-cursor: true -hide-cursor-time: 200 -link-external-icon: true -link-external-newwindow: true format: - revealjs: - embed-resources: true # alle benötigten Dateien direkt in den HTML-Output schreiben - transition: fade - background-transition: slide - theme: [default, HSNR.scss, fontvollkorn.scss, fontrobotmono.scss] - resources: - - fonts/Roboto-Mono-regular.woff2 - - fonts/Vollkorn-Bold.woff2 - - fonts/Vollkorn-BoldItalic.woff2 - - fonts/Vollkorn-Italic.woff2 - - fonts/Vollkorn-Regular.woff2 + hsnr-revealjs --- @@ -44,7 +21,6 @@ format: ###### 11.10.2021 | MHC - ::: @@ -332,7 +308,7 @@ Ich bin eine Blankbox mit `.bg-light-blue` und `.white` Mittels der Klasse `{.tc}` können Inhalte zentriert werden :::{.tc} -![Wau Holland (✝ 2001)](images/WauHolland_1.jpg){width="350"} + Ich bin ein zentrierter Text! ::: From b1e5ca1f76366ff8b6ba5f5cb3de394d4084a31d Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Wed, 3 Jan 2024 13:36:18 -0800 Subject: [PATCH 6/8] Add a publish action --- .github/workflows/publish-gh.yml | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/publish-gh.yml diff --git a/.github/workflows/publish-gh.yml b/.github/workflows/publish-gh.yml new file mode 100644 index 0000000..5f69db4 --- /dev/null +++ b/.github/workflows/publish-gh.yml @@ -0,0 +1,44 @@ +on: + push: + branches: [main, master] + release: + types: [published] + workflow_dispatch: + + name: demo-website + + jobs: + demo-website: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: quarto-website-${{ github.event_name != 'pull_request' || github.run_id }} + permissions: + contents: write + steps: + - name: "Check out repository" + uses: actions/checkout@v3 + + # To render using knitr, we need a few more setup steps... + # If we didn't want the examples to use `engine: knitr`, we could + # skip a few of the setup steps. + - name: "Setup R" + uses: r-lib/actions/setup-r@v2 + + - name: "Setup R dependencies for Quarto's knitr engine" + uses: r-lib/actions/setup-r-dependencies@v2 + with: + packages: + any::knitr + any::rmarkdown + any::downlit + any::xml2 + + # Back to our regularly scheduled Quarto output + - name: "Set up Quarto" + uses: quarto-dev/quarto-actions/setup@v2 + + - name: "Render and Publish" + uses: quarto-dev/quarto-actions/publish@v2 + with: + target: gh-pages \ No newline at end of file From eb7b73a006ca2eef7257f2e5e683fc01cce9dade Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Wed, 3 Jan 2024 13:43:32 -0800 Subject: [PATCH 7/8] Change to template --- Folientest.qmd => template.qmd | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Folientest.qmd => template.qmd (100%) diff --git a/Folientest.qmd b/template.qmd similarity index 100% rename from Folientest.qmd rename to template.qmd From df0fdb185fbc5af0a6105cadcae3cd0c1874f5de Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Wed, 3 Jan 2024 13:45:41 -0800 Subject: [PATCH 8/8] Add a README.md describing the extension --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..940ea15 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +# HSNR-themed Revealjs Extension For Quarto + +A [quarto extension](https://quarto.org/docs/extensions/) featuring an HSNR-inspired theme for the [reveal.js format](https://quarto.org/docs/presentations/revealjs/). + +See the included [template.qmd](template.qmd) file for an example of the theme and integration into Quarto or explore the rendered version [here](http://quarto.thecoatlessprofessor.com/hsnr-revealjs/). + +For details on how to convert from a single-themed document into a Quarto Extension for RevealJS see [PR #1](https://github.com/coatless-quarto/hsnr-revealjs/pull/1) + +## Installing + +You can obtain a copy of the extension by using: + +```bash +quarto use template coatless-quarto/hsnr-revealjs +``` + +This will install the extension and create an example qmd file that +you can use as a starting place for your presentation slides. + +## Using + +Once the extension is installed, you can use the extension by setting the `format` inside of the document header to `hsnr-revealjs`. + +```markdown +--- +title: A title +subtitle: A subtitle +format: + hsnr-revealjs: default +author: + - name: Your Name + orcid: 0000-0000-0000-0000 + email: alias@email.com + affiliations: Your Institution +date: last-modified +--- +``` + +## Acknowledgements + +This theme was developed as a result of answering a question asked by [Joe Slam](https://github.com/produnis) on the [Quarto issue tracker (#7470)](https://github.com/quarto-dev/quarto-cli/issues/7470#issuecomment-1875929330). +