Skip to content

Commit

Permalink
Merge pull request #1 from coatless-quarto/convert-to-revealjs-theme
Browse files Browse the repository at this point in the history
Convert to RevealJS Theme
  • Loading branch information
coatless authored Jan 3, 2024
2 parents 32e33ce + df0fdb1 commit 13df4c4
Show file tree
Hide file tree
Showing 12 changed files with 126 additions and 36 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/publish-gh.yml
Original file line number Diff line number Diff line change
@@ -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
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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: [email protected]
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).

File renamed without changes.
32 changes: 32 additions & 0 deletions _extensions/hsnr/_extension.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 1 addition & 3 deletions fontrobotmono.scss → _extensions/hsnr/fontrobotmono.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 4 additions & 6 deletions fontvollkorn.scss → _extensions/hsnr/fontvollkorn.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/*-- 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;
}
Expand All @@ -15,7 +13,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;
}
Expand All @@ -24,14 +22,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;
}
Expand Down
30 changes: 3 additions & 27 deletions Folientest.qmd → template.qmd
Original file line number Diff line number Diff line change
@@ -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
---


Expand All @@ -44,7 +21,6 @@ format:

###### 11.10.2021 | MHC


:::


Expand Down Expand Up @@ -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"}
<!-- ![Wau Holland (✝ 2001)](images/WauHolland_1.jpg){width="350"} -->

Ich bin ein zentrierter Text!
:::
Expand Down

0 comments on commit 13df4c4

Please sign in to comment.