commit 750dff73f32b5be3be9bc90e4dec17af273a5799 Author: putro Date: Fri Jun 19 21:42:18 2020 +0200 first commit diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d419312 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/reveal-hugo"] + path = themes/reveal-hugo + url = https://github.com/dzello/reveal-hugo.git diff --git a/README.md b/README.md new file mode 100644 index 0000000..922c8c6 --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +# presentazione docker for dummies + +## hugo dockerizzato + +immagine docker di hugo (static site generator) + +che usa un sottomodulo per avere un tema che usa reveal.js per gestire la presentazione in markdown + +per scaricare il sottomodulo: + +```shell +foo@bar:~# git submodule update --init +``` + +utilizzo: + +```shell +foo@bar:~# docker-compose up -d +``` + +la presentazione e' visibile su + +[http://localhost:1313](http://localhost:1313) + +il contenuto della presentazione e' nella cartella content, +se lo si modifica viene immediatamente modificata la presentazione +(utile in fase di scrittura per avere una preview live) + + +al termine della presentazione: + +```shell +foo@bar:~# docker stop hugo && docker rm hugo +``` + +## hugo non dockerizzato + +la stessa presentazione si puo' visualizzare usando direttamente hugo dopo averlo installato +sulla macchina. + +(la versione 0.54 funziona, per le successive non so) + +scaricare il sottomodulo: + +```shell +foo@bar:~# git submodule update --init +``` + +e lanciare hugo da questa cartella + +```shell +foo@bar:~# hugo server +``` + +la presentazione e' visibile su + +[http://localhost:1313](http://localhost:1313) + diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..8652d1c --- /dev/null +++ b/config.toml @@ -0,0 +1,24 @@ +title = "Docker for dummies" +baseurl = "http://localhost:1313/" +languageCode = "en-us" +theme = "reveal-hugo" + +[outputFormats.Reveal] +baseName = "index" +mediaType = "text/html" +isHTML = true + +[params.reveal_hugo] +custom_theme = "reveal-hugo/themes/robot-lung.css" +#custom_theme = "reveal-hugo/themes/sunblind.css" +history = true +slide_number = true +transition = 'convex' +transition_speed = 'normal' +#highlight_theme = "zenburn" +#highlight_theme = "solarized-dark" +progress = true +#theme = "solarized" + +[markup.goldmark.renderer] +unsafe = true diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..88037cc --- /dev/null +++ b/content/_index.md @@ -0,0 +1,212 @@ ++++ +title = "Introduzione a pass" +outputs = ["Reveal"] + ++++ + +# Il problema della condivisione dei segreti + +* i segreti condivisi sono ancora segreti ? + +* attenzione a con chi si condivide, la fiducia nelle pratiche altrui. + +* quando e' necessario condividere un segreto ? + + quando si lavora in gruppo, e tutto il gruppo deve avere accesso alle cose segrete del gruppo. + +--- + +# problematiche nella condivisione dei segreti + + i segreti devono essere custoditi e trasmessi crittati + + se si vuole celarne ulteriormente l'esistenza anche il canale di comunicazione deve essere crittato + + i segreti devono essere disponibili per il gruppo in modo immediato (no telefonate in urgenza) + + i segreti (e gli eventuali loro aggiornamenti) devono essere resi disponibili in modo il piu' + possibile semplice ed automatizzato. + + deve essere semplice revocare l'accesso ai segreti a una persona + + deve essere semplice aggiungere una persona all'accesso dei segreti. + + deve essere possibile tornare a una versione precedente in caso di problemi. + +--- + +# il formato in cui salvare i segreti + + ovviamente devono essere crittati in qualche modo: + + crittografia simmetrica: 1 password uguale per tutti. + + e' piu' semplice da implementare, ma c'e' il problema di comunicare la password a tutti + + crittografia asimmetrica: ognuno ha le sue credenziali per decrittare + + richiede che tutti usino un software che supporti questa funzione (es. gnupg) + +--- + +# il modo in cui condividere i segreti + + * mail - il piu' semplice ma non automatizzato + + * cloud - puo' essere manuale o automatizzato ma non c'e' versioning + + * git - puo' essere automatizzato e ha il versioning + +--- + +# PASS + +https://www.passwordstore.org/ + +apt-get install pass + +dipendenze: + +* gnupg per la crittazione + +* git per la distribuzione (non obbligatorio) + +--- + +* permette di salvare ogni singola password in un file crittato con gpg + +* e' possibile specificare piu' di una chiave per cui crittare le password + +* le password possono essere divise per progetto, ogni progetto con i suoi membri. + +--- + +# Inizializzazione dello store + +pass init KEY-ID + +questo crea la cartella $HOME/.password-store/ contenente il file .gpg-id +che contiene il KEY-ID (che puo' essere sia il key id della chiave che un indirizzo email) + +in genere meglio usare il key-id per essere certi di usare proprio la chiave che vogliamo, +e non semplicemente la chiave associata a un indirizzo email (che chiunque potrebbe creare). + +--- + +# Aggiunta di una password + +pass generate unit/wiki 32 + +genera (automaticamente) una password di 32 caratteri casuali e la salva crittata per la chiave +definita in $HOME/.password-store/.key-id nel file $HOME/.password-store/unit/wiki.gpg + +pass insert unit/ldap-root + +aggiunge una password che deve essere digitata (2 volte per conferma) + +--- + +# Visualizzazione di una password + +pass ls + +vi mostra tutto l'albero delle password salvate + +pass show unit/wiki + +vi mostra la password (a schermo) dopo averla decrittata (puo' essere necessario digitare la +password della chiave gpg se il gpg-agent non l'ha in memoria). +Per non mostrarla a video ma copiarla nella clipboard aggiungere l'opzione "-c" + +(bash completion ???) + +--- + +# modifica ed eliminazione di una password + +pass edit unit/wiki + +modificare una password esistente + +pass rm unit/wiki + +eliminare una password + +pass mv unit/nextcloud unit/web_team/nextcloud + +sposta una password in un'altra posizione + +--- + +# organizzare le password in cartelle/progetti + +le password possono salvate come un albero di cartelle e files + +pass generate personal/posta_ai + +ora potete vedere le password divise per le varie cartelle/directory, +in pratica ogni directory puo' essere un progetto +ogni directory/progetto puo' avere il suo .gpg-id che contiene le chiavi per cui crittare le pwd in quel progetto + +--- + +# aggiungere chiavi di crittazione + +se ad es. Terry entra nel progetto unit, bisogna aggiungere il suo key-id al file .gpg-id del progetto, +in ~/.password-store/unit/.gpg-id + +NOTA IMPORTANTE: la sua chiave deve essere "trusted", quindi dovete importarla anche nel vostro keyring personale e firmarla +gpg --edit-key jane@acme.org +gpg> lsign + +e poi il progetto va reinizializzato in modo che tutte le pwd al suo interno siano recrittate +usando i key-id aggiornati. + +pass init -p unit/ $(cat ~/.password-store/unit/.gpg-id) + +--- + +# la distribuzione + +bisogna prendere tutta la cartella del progetto e passarla in qualche modo a chi di dovere + +si puo' fare in molti modi, ma forse il piu' comodo e' git perche' consente il versioning. + +inoltre e' possibile creare un repository git per i vari progetti, sincronizzando quindi i dati dei +diversi progetti in modo compartimentato. + +--- + +# estensioni + +* pass-tomb +* pass-otp +* pass-import + +--- + +# pass clients + +* passmenu (dmenu script) +* qtpass (GUI per linux) +* passff (firefox extension) +* browserpass (chrome extension) +* password-store.el (emacs package) +* pass-git-helper (git credentials helper) + +--- + +# ansible e pass + +esiste un modulo ansible per usare pass che potrebbe consentire di non usare il vault ma direttamente +le pwd salvate in pass ???? + +https://docs.ansible.com/ansible/latest/plugins/lookup/passwordstore.html + + +# accortezze + +* se qualcuno vede la cartella delle password, dai nomi dei file puo' capire a cosa serve la password +che c'e' in quel file. Quindi magari il repository pur contenendo password crittate e' meglio che non sia pubblico. + +* non si deve usare su server remoti (perche' non e' una buona idea usare GPG su macchine remote). diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9382908 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3' + +services: + hugo: + image: jojomi/hugo:0.54.0 + container_name: hugo + volumes: + - ./:/src + - /tmp/hugo-output/:/output + environment: + - HUGO_WATCH='true' + #- HUGO_REFRESH_TIME=3600 + - HUGO_THEME=reveal-hugo + #- HUGO_BASEURL=mydomain.com + restart: unless-stopped + ports: + - 1313:1313 + diff --git a/themes/reveal-hugo/.gitignore b/themes/reveal-hugo/.gitignore new file mode 100644 index 0000000..36170a7 --- /dev/null +++ b/themes/reveal-hugo/.gitignore @@ -0,0 +1,2 @@ +node_modules +public diff --git a/themes/reveal-hugo/CODE_OF_CONDUCT.md b/themes/reveal-hugo/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..937672e --- /dev/null +++ b/themes/reveal-hugo/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at jdzielak@gmail.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/themes/reveal-hugo/CONTRIBUTING.md b/themes/reveal-hugo/CONTRIBUTING.md new file mode 100644 index 0000000..851ab84 --- /dev/null +++ b/themes/reveal-hugo/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributing to reveal-hugo + +Contributions of all shapes and sizes are welcoming, including code, documentation, and examples. If you've built something with reveal-hugo, feel free to add it to the README. + +To run the example site, clone this repository and run: + +```shell +hugo server -s exampleSite +``` + +or simply... + +```shell +npm start +``` + +You can also build the site without watching it for changes by running: + +```shell +npm run build +``` + +GitHub issues and PRs are the preferred way to receive contributions. Please name your branch something recognizeable. + +Before opening a PR, make sure that the reveal-hugo exampleSite builds. The demo presentations in exampleSite use nearly all of the available reveal-hugo functionality, so they're a good indicator of something that might have been broken. Still, there are no fully automated tests, so please make sure to manually test areas that could be impacted by your change. + +If you need help contributing, don't hesitate to open an issue and ask. This is a welcoming and beginner-friendly project! diff --git a/themes/reveal-hugo/LICENSE b/themes/reveal-hugo/LICENSE new file mode 100644 index 0000000..9d53fe0 --- /dev/null +++ b/themes/reveal-hugo/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Josh Dzielak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/themes/reveal-hugo/README.md b/themes/reveal-hugo/README.md new file mode 100644 index 0000000..de81b56 --- /dev/null +++ b/themes/reveal-hugo/README.md @@ -0,0 +1,588 @@ +# reveal-hugo + +![License badge](https://img.shields.io/github/license/dzello/reveal-hugo.svg) +[![Website up/down badge](https://img.shields.io/website-up-down-green-red/https/reveal-hugo.dzello.com.svg)](https://reveal-hugo.dzello.com/) +![Last commit badge](https://img.shields.io/github/last-commit/dzello/reveal-hugo.svg) +[![Netlify Status](https://api.netlify.com/api/v1/badges/70c5c7a6-5fb2-40a9-98e1-20aa21336201/deploy-status)](https://app.netlify.com/sites/reveal-hugo/deploys) + +A Hugo theme for [Reveal.js](https://revealjs.com/) that makes authoring and customization a breeze. With it, you can turn any properly-formatted Hugo content into a HTML presentation. + +![screenshot of reveal-hugo](https://github.com/dzello/reveal-hugo/blob/master/images/screenshot.png?raw=true) + +## Example + +Using reveal-hugo, presentations with multiple slides can be created with just one markdown file, like so: + +```markdown ++++ +title = "How to say hello" ++++ + +# English +Hello. + +--- + +# Français +Salut. + +--- + +# Español +Hola. +``` + +Just use `---` surrounded by blank lines to split content into different slides. + +## Documentation + +Visit [reveal-hugo.dzello.com](https://reveal-hugo.dzello.com/) to see a presentation created with this theme and learn about all of the different functionality available to you. + +For a full-length blog post about reveal-hugo, checkout [Harness the Power of Static Site Generators to Create Presentations](https://forestry.io/blog/harness-the-power-of-static-to-create-presentations/) on the [Forestry.io blog](https://forestry.io/blog). + +### Demos + +Jump to the [exampleSite](exampleSite) folder in this repository to see the source code for the above presentation and several more. Here are links to those presentations live: + +- [logo-example](https://reveal-hugo.dzello.com/logo-example/) - Shows how to add a logo to your presentation +- [custom-theme-example](https://reveal-hugo.dzello.com/custom-theme-example/) - Uses Hugo pipes to compile and use a custom Reveal.js SCSS theme (recommended!) +- [section-example](https://reveal-hugo.dzello.com/section-example/) - Very basic example that shows how to create a presentation for a Hugo section +- [plugin-example](https://reveal-hugo.dzello.com/plugin-example/) - Shows how to add additional Reveal.js plugins to your presentation, for example an image gallery +- [template-example](https://reveal-hugo.dzello.com/template-example/) - An example of using the slide shortcode with powerful templates +- [bundle-example](https://reveal-hugo.dzello.com/bundle-example/) - An example of creating a presentation from one or more markdown files in a leaf bundle +- [hugo-hl-example](https://reveal-hugo.dzello.com/hugo-hl-example/) - An example of using Hugo's compile-time syntax highlighter +- [highlightjs-linenumbers-example](https://reveal-hugo.dzello.com/highlightjs-linenumbers-example/) - An example of using the multiline and multi-step capabilities of highlight.js + +### Starter repository + +If you want to start creating a presentation right away, clone the [programming-quotes](https://github.com/dzello/programming-quotes) repository and start hacking. + +## Tutorial + +You should be able to complete this section with no prior knowledge of Hugo or Reveal.js. At the end, you'll have a working presentation with instant reloading. + +### Create your first presentation + +To start, [install Hugo](https://gohugo.io/) and create a new Hugo site: + +```shell +hugo new site my-presentation +``` + +Change into the directory of the new site: + +```shell +cd my-presentation +``` + +Initialize a git repository: + +```shell +git init +``` + +Add the reveal-hugo theme as a submodule in the themes directory: + +```shell +git submodule add git@github.com:dzello/reveal-hugo.git themes/reveal-hugo +``` + +Open `config.toml` and add the following contents: + +```toml +theme = "reveal-hugo" + +[markup.goldmark.renderer] +unsafe = true + +[outputFormats.Reveal] +baseName = "index" +mediaType = "text/html" +isHTML = true +``` +This tells Hugo to use the reveal-hugo theme and it registers a new output format called "Reveal". + +Next, create a file in `content/_index.md` and add the following: + +```markdown ++++ +title = "My presentation" +outputs = ["Reveal"] ++++ + +# Hello world! + +This is my first slide. +``` + +Back on the command line, run: + +```shell +$ hugo server +``` + +Navigate to [http://localhost:1313/](http://localhost:1313/) and you should see your presentation. + +![New site with reveal-hugo](https://github.com/dzello/reveal-hugo/blob/master/images/reveal-hugo-hello-world.png?raw=true) + +To add more slides, just add content to `_index.md` or create new markdown files in `content/home`. Remember that each slide must be separated by `---` with blank lines above and below. + +```markdown +# Hello world! + +This is my first slide. + +--- + +# Hello Mars! + +This is my second slide. +``` + +### Cloning an existing repository + +If you have an existing repository that was setup with the above steps, you have to pull in the theme submodule after cloning your repository using the following command: + +```shell +git submodule update --init +``` + +## Usage + +The Usage guide is contained in the example presentation that lives in this repository in the [exampleSite](./exampleSite) directory. You can access a live version at [reveal-hugo.dzello.com](https://reveal-hugo.dzello.com/). + +### Root vs. section presentations + +Here's what the folder structure would look like with one root presentation and one section presentation. + +``` +- content + - home # special section for appending to root presentation + - body.md # appends to the root presentation + - conclusion.md # appends to the root presentation + - _index.md # beginning of the root presentation + - ted-talk + - _index.md # beginning of the ted talk presentation + - body.md # appends to the ted talk presentation + - conclusion.md # appends to the ted talk presentation +``` + +This will create two presentations, one at `/` and one at `/ted-talk/`. The order that slides are appended to each can be controlled by the `weight` parameter specified in each file's front matter. The slides in `_index.md` will always come first, though you don't have to put any slides in there if you want to. + +### Shortcodes + +reveal-hugo comes with a variety of shortcodes that help you take advantage of some very useful Reveal.js features. + +#### fragment shortcode + +Wrap any content in the fragment shortcode and it will appear incrementally. Great for bulleted lists where you want one bullet point at a a time to appear. + +```markdown +- {{% fragment %}}One{{% /fragment %}} +- {{% fragment %}}Two{{% /fragment %}} +- {{% fragment %}}Three{{% /fragment %}} +``` + +#### frag shortcode + +Like fragment but more terse - content is placed inline in a self-closing shortcode. + +```markdown +- {{< frag c="One" >}} +- {{< frag c="Two" >}} +- {{< frag c="Three" >}} +``` + +#### slide shortcode + +The slide shortcode lets you set custom HTML and Reveal.js attributes for each slide - things like id, class, transition, background just to name a few. The names are the same as Reveal.js but without the 'data-' prefix. + +Add the shortcode above the slide content, below the `---` separator. Do not place content inside of the shortcode. + +```markdown +--- + +{{< slide id="hello" background="#FFF" transition="zoom" transition-speed="fast" >}} + +# Hello, world! + +--- +``` + +Here's a list of documented slide attributes from the Reveal.js docs: + +- `autoslide` +- `state` +- `background` +- `background-color` +- `background-image` +- `background-size` +- `background-position` +- `background-repeat` +- `background-video` +- `background-video-loop` +- `background-video-muted` +- `background-interactive` +- `background-iframe` +- `background-transition` +- `transition` (can have different in and out transitions) +- `transition-speed` +- `notes` (can also use the note shortcode) +- `timing` + +You can also pass through your own, a `data-` prefix will be added automatically to each one (except for `id` and `class`). + +#### section shortcode + +To create groups of slides that can be navigated vertically, surround your markdown with the section shortcode. + +```markdown +{{% section %}} + +# Vertical slide 1 + +--- + +# Vertical slide 2 + +{{% /section %}} +``` + +#### note shortcode + +Add [speaker notes](https://github.com/hakimel/reveal.js/#speaker-notes) for each slide with the note shortcode. + +```markdown +{{% note %}} +Don't forget to thank the audience. +{{% /note %}} +``` + +*💡 Tip: you can also add notes by adding a `note` attribute to the slide shortcode.* + +#### markdown shortcode + +Markdown surrounded by the markdown shortcode will not be rendered by Hugo but by Reveal.js itself. This is useful if you want to use some native Reveal.js markdown syntax that isn't supported by reveal-hugo. + +```markdown +{{% markdown %}} +# I'm rendered... +...by Reveal.js +{{% /markdown %}} +``` + +### MathJax support + +Add the following to `layouts/partials/reveal-hugo/body.html`: + +``` + + + +``` + +Then you can do this in a slide: + +``` +## Cool equations + +Displayed equations are wrapped in double-\$ + +$$\frac{n!}{k!(n-k)!} = \binom{n}{k}$$ + +Inline equations like $E=mc^2$ are wrapped in single-\$ +``` + +### HTML slides + +If you need to create fancier HTML for a slide than you can do with markdown, just add `data-noprocess` to the <section> element. + +```html +
+

Hello, world!

+
+``` + +### Reusable slides and sections + +Sometimes you need to reuse a slide in the same presentation or across different presentations. reveal-hugo makes use of Hugo data templates to make both cases easy. + +To create reusable slides, create a TOML (or JSON or YAML) file in your site's data directory. Give it a name that reflects its content or just `slides.toml`. In that file, add a key for each reusable slide. The name should reflect the slide's content and the value should be the slide's markdown. + +```toml +thankyou = ''' + +# Thank you! + +Any questions? + +''' +``` + +*💡 Tip: TOML's multiline string syntax comes in handy here, note the '''.* + +Each key can contain **one or more** slides separated by `---` and newlines. That way you can create reusable sections. + +```toml +thankyou = ''' + +# Thank you! + +--- + +Any questions? + +''' +``` + +To render a slide from a data template, use the slide shortcode with a content attribute: + +```markdown +{{% slide content="slides.thankyou" /%}} +``` + +The part before the "." is the name of the file in the data directory. The part after the dot is the key to look up in that file. + +You can use all the additional slide shortcode attributes. They will be applied to every slide in the data template. + +## Configuration + +Customize the Reveal.js presentation by setting these values in `config.toml` or the front matter of any presentation's `_index.md` file. + +- `reveal_hugo.theme`: The Reveal.js theme used; defaults to "black" +- `reveal_hugo.custom_theme`: The path to a locally hosted Reveal.js theme in the static or assets folder +- `reveal_hugo.custom_theme_compile`: If set to true, the theme will be compiled with Hugo pipes (and must live in the assets folder) +- `reveal_hugo.custom_theme_options`: Provide a dictionary to customize theme compilation, see [Hugo's SCSS docs](https://gohugo.io/hugo-pipes/scss-sass/#options) for a list of options +- `reveal_hugo.highlight_theme`: The [highlight.js](https://highlightjs.org/) theme used; defaults to "default" +- `reveal_hugo.reveal_cdn`: The location to load Reveal.js files from; defaults to the `reveal-js` folder in the static directory to support offline development. To load from a CDN instead, set this value to `https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0` or whatever CDN you prefer. +- `reveal_hugo.highlight_cdn`: The location to load highlight.js files from; defaults to to the `highlight-js` folder in the static directory to support offline development. To load from a CDN instead, set this value to `https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0` or whatever CDN you prefer. +- `reveal_hugo.load_default_plugins`: If set to true (default), the plugins included by default are loaded. These are markdown, highlight.js, notes and zoom. +- `reveal_hugo.plugins`: An array of additional Reveal.js plugins to load, e.g. `["plugin/gallery/gallery.plugin.js"]`. The appropriate files will need to have been copied into the `static` directory. CDN loading is not supported. See here for a [big list of plugins](https://github.com/hakimel/reveal.js/wiki/Plugins,-Tools-and-Hardware) you can try. + +This is how parameters will look in your `config.toml`: + +```TOML +[params.reveal_hugo] +theme = "moon" +``` + +Or in the front matter of an `_index.md` file: + +```TOML +[reveal_hugo] +theme = "moon" +``` + +Include any other attributes in those sections that you'd like to be fed as arguments to `Reveal.initialize` in **snakecase**, so `slide_number` instead of `slideNumber`. Params are converted from snakecase to camelcase before passing to Reveal.js. This is necessary to maintain the proper case of the parameters. + +Here's an example of configuring Reveal.js parameters alongside a theme and highlight.js theme: + +```TOML +[reveal_hugo] +theme = "moon" +highlight_theme = "solarized-dark" +slide_number = true +transition = "zoom" +``` + +See the [extensive list of Reveal.js configuration options](https://github.com/hakimel/reveal.js/#configuration) here. + +### Syntax highlighting + +Syntax highlighting can be done with Hugo at compile-time or using Reveal.js with the pre-installed highlight.js plugin. Presentations can use both if they wish for different pieces of code. + +To do highlighting with Hugo, use the [highlight shortcode](https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode) and check out the [hugo-hl-example](https://reveal-hugo.dzello.com/hugo-hl-example/) example presentation. + +To see an example of highlighting with Reveal.js, checs out the [highlightjs-linenumbers-example](https://reveal-hugo.dzello.com/highlightjs-linenumbers-example/) presentation. + +By default, markdown code fences will be processed with Hugo. To turn that off, add this to your `config.toml` file: + +``` toml +[markup.highlight] +codeFences = false +``` + +Now, the code in the fences will be highlighted by highlight.js instead. + +### Custom Reveal.js themes + +If you have a custom reveal theme to use (in .css form), place it in the `static` folder and specify it in the configuration. For example, if your css file lives here: + +``` +| static + | stylesheets + - custom-theme.css +``` + +Then this is what you'll put in `config.toml`: + +```toml +[params.reveal_hugo] +reveal_hugo.custom_theme = "stylesheets/custom-theme.css" +``` + +### Compiling a custom Reveal.js theme with Hugo pipes + +Reveal.js theme customization is easiest to do by overriding variables in the SCSS or PostCSS build process. You can take advantage of Hugo pipes to do the theme compilation. In this case, your SCSS, Saas or PostCSS file needs to live in assets: + +``` +| assets + | stylesheets + - custom-theme.scss +``` + +If you just wanted to change the presentation colors, here's what you might put in `custom-theme.scss`: + +```scss +@import "reveal-js/css/theme/template/mixins"; +@import "reveal-js/css/theme/template/settings"; + +$backgroundColor: rgb(3, 129, 45); +$mainColor: #fff; +$headingColor: #fff; +``` + +To learn more about Reveal.js theme customization, check out the [Reveal.js theme docs](https://github.com/hakimel/reveal.js/blob/master/css/theme/README.md). + +This is what the front matter would look like: + +```toml +[params.reveal_hugo] +reveal_hugo.custom_theme = "stylesheets/custom-theme.css" +reveal_hugo.custom_theme_compile = true +``` + +You can also add options that will be passed to [Hugo's toCSS method](https://gohugo.io/hugo-pipes/scss-sass/#options): + +```toml +[reveal_hugo.custom_theme_options] +targetPath = "css/custom-theme.css" +enableSourceMap = true +``` + +Check out the [custom-theme-example presentation](https://reveal-hugo.dzello.com/custom-theme-example/) to see a working example. + +## Adding HTML to the layout + +If you need to add something to the HTML layout, you can create partials that live at specific locations, depending on which presentation you want to customize and where you want the HTML inserted into the page. + +| Presentation | Before </head> | Before </body> | Before closing </div> of `div.reveal` | +|--------------|---------------------------------|---------------------------------|---------------------------------------------| +| All | reveal-hugo/head.html | reveal-hugo/body.html | reveal-hugo/end.html | +| Root | home/reveal-hugo/head.html | home/reveal-hugo/body.html | home/reveal-hugo/end.html | +| Section | {section}/reveal-hugo/head.html | {section}/reveal-hugo/body.html | {section}/reveal-hugo/end.html | + +This is the recommended way to add custom CSS and JavaScript to each presentation. + +> 💡 Tip: In Hugo, partials live in the `layouts` folder: +> +> For example, if you have HTML that is to be placed before every presentation, this would be the structure: +> ``` +> - layouts +> - partials +> - reveal-hugo +> - head.html +> - body.html +> - end.html + +## Offline development + +Offline-friendly development is the default. The Reveal.js and Highlight.js files are loaded from the static directory by default. (See above for how to use a CDN instead). If you need `file:///` URLs to work, make sure to set `relativeURLs` and `uglyURLs` in your `config.toml`. + +```toml +relativeURLs = true +uglyURLs = true +``` + +Note: `uglyURLs` isn't strictly required, but it is useful if you're loading against the filesystem as it makes sure that all URLs end in .html and links point directly at them instead of to a folder. + +## Recipes + +### Add a Reveal.js presentation to an existing Hugo site + +If your Hugo site already has a theme but you'd like to create a presentation from some of its content, that's very easy. First, manually copy a few files out of this theme into a few of your site's directories: + +```shell +cd my-hugo-site +git clone git@github.com:dzello/reveal-hugo.git themes/reveal-hugo +cd themes/reveal-hugo +cp -r layouts static ../../ +``` + +Files and directories are named such that they shouldn't conflict with your existing content. Of course, you should double check before copying, especially the shortcodes which can't be put under a directory. + +Next, add the Reveal output format to your site's `config.toml` file + +```toml +[outputFormats.Reveal] +baseName = "index" +mediaType = "text/html" +isHTML = true +``` + +Now you can add `outputs = ["Reveal"]` to the front matter of any section's `_index.md` file and that section's content will be combined into a presentation and written to `index.html`. If you already have a `index.html` page for that section, just change the `baseName` above to `reveal` and the presentation will be placed in a `reveal.html` file instead. + +Note: If you specify `outputs = ["Reveal"]` for a single content file, you can prevent anything being generated for that file. This is handy if you other default layouts that would have created a regular HTML file from it. Only the list file is required for the presentation. + +**Tip**: As of Hugo 0.42, Hugo [has theme inheritence](https://gohugo.io/news/0.42-relnotes/). You can avoid the file copying step above by adding `"reveal-hugo"` to your site's array of themes. + +### Create a presentation from a leaf bundle or single page type + +By default, reveal-hugo doesn't create presentations for single pages (i.e. pages other than `_index.md`) as it assumes those pages are pieces of a larger presentation in the section starting with `_index.md`. This might not be the case if your content is structured in a leaf bundle (the main file is then `index.md` with no underscore, which Hugo treats as a single page) or if you just want to put a presentation in a single file, say `presentation.md`. In these cases, you just need to tell Hugo to use a different layout. + +If you're using a leaf page bundle, set the following in the front matter of the `index.md` file: + +```toml +layout = "bundle" +``` + +If you're in a single page file like `presentation.md`, set the following in the front matter: + +```toml +layout = "list" +``` + +### Create a page that lists out all presentations + +See [this issue](https://github.com/dzello/reveal-hugo/issues/37) for a template that you can use. + +## Reveal.js tips + +These are some useful Reveal.js features and shortcuts. + +- 's' - type 's' to enter speaker mode, which opens a separate window with a time and speaker notes +- 'o' - type 'o' to enter overview mode and scroll through slide thumbnails +- 'f' - type 'f' to go into full-screen mode + +Here are a few useful Reveal.js-related tools: + +- [decktape](https://github.com/astefanutti/decktape) for exporting a presentation as a PDF +- More [revealjs themes](https://github.com/dzello/revealjs-themes) including robot-lung and sunblind + +Find many more on the Reveal.js wiki: [Plugins, tools and hardware](https://github.com/hakimel/reveal.js/wiki/Plugins,-Tools-and-Hardware). + +## Implementations + +Have you built something with reveal-hugo? Add a link to it here. + +- [dzello's Paris Wedding Weekend Guide](https://estelle.and.dzello.com/guide/) ([source](https://github.com/dzello/estelle-and-josh/blob/master/site/content/guide/_index.md)) + + +## Changelog + +- 2018-08-03: The slide shortcode is now easier to use. An auto-closing version sits inside the slide instead of needing to surround its content and add a closing tag. + +## Contributing + +Contributions are very welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for more details. diff --git a/themes/reveal-hugo/assets/reveal-js/css/reveal.scss b/themes/reveal-hugo/assets/reveal-js/css/reveal.scss new file mode 100755 index 0000000..ab11f32 --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/reveal.scss @@ -0,0 +1,1777 @@ +/*! + * reveal.js + * http://revealjs.com + * MIT licensed + * + * Copyright (C) 2020 Hakim El Hattab, http://hakim.se + */ + + +/********************************************* + * GLOBAL STYLES + *********************************************/ + +html { + width: 100%; + height: 100%; + height: 100vh; + height: calc( var(--vh, 1vh) * 100 ); + overflow: hidden; +} + +body { + height: 100%; + overflow: hidden; + position: relative; + line-height: 1; + margin: 0; + + background-color: #fff; + color: #000; +} + + +/********************************************* + * VIEW FRAGMENTS + *********************************************/ + +.reveal .slides section .fragment { + opacity: 0; + visibility: hidden; + transition: all .2s ease; + + &.visible { + opacity: 1; + visibility: inherit; + } +} + +.reveal .slides section .fragment.grow { + opacity: 1; + visibility: inherit; + + &.visible { + transform: scale( 1.3 ); + } +} + +.reveal .slides section .fragment.shrink { + opacity: 1; + visibility: inherit; + + &.visible { + transform: scale( 0.7 ); + } +} + +.reveal .slides section .fragment.zoom-in { + transform: scale( 0.1 ); + + &.visible { + transform: none; + } +} + +.reveal .slides section .fragment.fade-out { + opacity: 1; + visibility: inherit; + + &.visible { + opacity: 0; + visibility: hidden; + } +} + +.reveal .slides section .fragment.semi-fade-out { + opacity: 1; + visibility: inherit; + + &.visible { + opacity: 0.5; + visibility: inherit; + } +} + +.reveal .slides section .fragment.strike { + opacity: 1; + visibility: inherit; + + &.visible { + text-decoration: line-through; + } +} + +.reveal .slides section .fragment.fade-up { + transform: translate(0, 40px); + + &.visible { + transform: translate(0, 0); + } +} + +.reveal .slides section .fragment.fade-down { + transform: translate(0, -40px); + + &.visible { + transform: translate(0, 0); + } +} + +.reveal .slides section .fragment.fade-right { + transform: translate(-40px, 0); + + &.visible { + transform: translate(0, 0); + } +} + +.reveal .slides section .fragment.fade-left { + transform: translate(40px, 0); + + &.visible { + transform: translate(0, 0); + } +} + +.reveal .slides section .fragment.fade-in-then-out, +.reveal .slides section .fragment.current-visible { + opacity: 0; + visibility: hidden; + + &.current-fragment { + opacity: 1; + visibility: inherit; + } +} + +.reveal .slides section .fragment.fade-in-then-semi-out { + opacity: 0; + visibility: hidden; + + &.visible { + opacity: 0.5; + visibility: inherit; + } + + &.current-fragment { + opacity: 1; + visibility: inherit; + } +} + +.reveal .slides section .fragment.highlight-red, +.reveal .slides section .fragment.highlight-current-red, +.reveal .slides section .fragment.highlight-green, +.reveal .slides section .fragment.highlight-current-green, +.reveal .slides section .fragment.highlight-blue, +.reveal .slides section .fragment.highlight-current-blue { + opacity: 1; + visibility: inherit; +} + .reveal .slides section .fragment.highlight-red.visible { + color: #ff2c2d + } + .reveal .slides section .fragment.highlight-green.visible { + color: #17ff2e; + } + .reveal .slides section .fragment.highlight-blue.visible { + color: #1b91ff; + } + +.reveal .slides section .fragment.highlight-current-red.current-fragment { + color: #ff2c2d +} +.reveal .slides section .fragment.highlight-current-green.current-fragment { + color: #17ff2e; +} +.reveal .slides section .fragment.highlight-current-blue.current-fragment { + color: #1b91ff; +} + + +/********************************************* + * DEFAULT ELEMENT STYLES + *********************************************/ + +/* Fixes issue in Chrome where italic fonts did not appear when printing to PDF */ +.reveal:after { + content: ''; + font-style: italic; +} + +.reveal iframe { + z-index: 1; +} + +/** Prevents layering issues in certain browser/transition combinations */ +.reveal a { + position: relative; +} + +.reveal .stretch { + max-width: none; + max-height: none; +} + +.reveal pre.stretch code { + height: 100%; + max-height: 100%; + box-sizing: border-box; +} + + +/********************************************* + * CONTROLS + *********************************************/ + +@keyframes bounce-right { + 0%, 10%, 25%, 40%, 50% {transform: translateX(0);} + 20% {transform: translateX(10px);} + 30% {transform: translateX(-5px);} +} + +@keyframes bounce-down { + 0%, 10%, 25%, 40%, 50% {transform: translateY(0);} + 20% {transform: translateY(10px);} + 30% {transform: translateY(-5px);} +} + +$controlArrowSize: 3.6em; +$controlArrowSpacing: 1.4em; +$controlArrowLength: 2.6em; +$controlArrowThickness: 0.5em; +$controlsArrowAngle: 45deg; +$controlsArrowAngleHover: 40deg; +$controlsArrowAngleActive: 36deg; + +@mixin controlsArrowTransform( $angle ) { + &:before { + transform: translateX(($controlArrowSize - $controlArrowLength)/2) translateY(($controlArrowSize - $controlArrowThickness)/2) rotate( $angle ); + } + + &:after { + transform: translateX(($controlArrowSize - $controlArrowLength)/2) translateY(($controlArrowSize - $controlArrowThickness)/2) rotate( -$angle ); + } +} + +.reveal .controls { + $spacing: 12px; + + display: none; + position: absolute; + top: auto; + bottom: $spacing; + right: $spacing; + left: auto; + z-index: 11; + color: #000; + pointer-events: none; + font-size: 10px; + + button { + position: absolute; + padding: 0; + background-color: transparent; + border: 0; + outline: 0; + cursor: pointer; + color: currentColor; + transform: scale(.9999); + transition: color 0.2s ease, + opacity 0.2s ease, + transform 0.2s ease; + z-index: 2; // above slides + pointer-events: auto; + font-size: inherit; + + visibility: hidden; + opacity: 0; + + -webkit-appearance: none; + -webkit-tap-highlight-color: rgba( 0, 0, 0, 0 ); + } + + .controls-arrow:before, + .controls-arrow:after { + content: ''; + position: absolute; + top: 0; + left: 0; + width: $controlArrowLength; + height: $controlArrowThickness; + border-radius: $controlArrowThickness/2; + background-color: currentColor; + + transition: all 0.15s ease, background-color 0.8s ease; + transform-origin: floor(($controlArrowThickness/2)*10)/10 50%; + will-change: transform; + } + + .controls-arrow { + position: relative; + width: $controlArrowSize; + height: $controlArrowSize; + + @include controlsArrowTransform( $controlsArrowAngle ); + + &:hover { + @include controlsArrowTransform( $controlsArrowAngleHover ); + } + + &:active { + @include controlsArrowTransform( $controlsArrowAngleActive ); + } + } + + .navigate-left { + right: $controlArrowSize + $controlArrowSpacing*2; + bottom: $controlArrowSpacing + $controlArrowSize/2; + transform: translateX( -10px ); + } + + .navigate-right { + right: 0; + bottom: $controlArrowSpacing + $controlArrowSize/2; + transform: translateX( 10px ); + + .controls-arrow { + transform: rotate( 180deg ); + } + + &.highlight { + animation: bounce-right 2s 50 both ease-out; + } + } + + .navigate-up { + right: $controlArrowSpacing + $controlArrowSize/2; + bottom: $controlArrowSpacing*2 + $controlArrowSize; + transform: translateY( -10px ); + + .controls-arrow { + transform: rotate( 90deg ); + } + } + + .navigate-down { + right: $controlArrowSpacing + $controlArrowSize/2; + bottom: -$controlArrowSpacing; + padding-bottom: $controlArrowSpacing; + transform: translateY( 10px ); + + .controls-arrow { + transform: rotate( -90deg ); + } + + &.highlight { + animation: bounce-down 2s 50 both ease-out; + } + } + + // Back arrow style: "faded": + // Deemphasize backwards navigation arrows in favor of drawing + // attention to forwards navigation + &[data-controls-back-arrows="faded"] .navigate-left.enabled, + &[data-controls-back-arrows="faded"] .navigate-up.enabled { + opacity: 0.3; + + &:hover { + opacity: 1; + } + } + + // Back arrow style: "hidden": + // Never show arrows for backwards navigation + &[data-controls-back-arrows="hidden"] .navigate-left.enabled, + &[data-controls-back-arrows="hidden"] .navigate-up.enabled { + opacity: 0; + visibility: hidden; + } + + // Any control button that can be clicked is "enabled" + .enabled { + visibility: visible; + opacity: 0.9; + cursor: pointer; + transform: none; + } + + // Any control button that leads to showing or hiding + // a fragment + .enabled.fragmented { + opacity: 0.5; + } + + .enabled:hover, + .enabled.fragmented:hover { + opacity: 1; + } +} + +.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-up, +.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-down { + display: none; +} + +// Adjust the layout when there are no vertical slides +.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-left, +.reveal:not(.has-vertical-slides) .controls .navigate-left { + bottom: $controlArrowSpacing; + right: 0.5em + $controlArrowSpacing + $controlArrowSize; +} + +.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-right, +.reveal:not(.has-vertical-slides) .controls .navigate-right { + bottom: $controlArrowSpacing; + right: 0.5em; +} + +// Adjust the layout when there are no horizontal slides +.reveal:not(.has-horizontal-slides) .controls .navigate-up { + right: $controlArrowSpacing; + bottom: $controlArrowSpacing + $controlArrowSize; +} +.reveal:not(.has-horizontal-slides) .controls .navigate-down { + right: $controlArrowSpacing; + bottom: 0.5em; +} + +// Invert arrows based on background color +.reveal.has-dark-background .controls { + color: #fff; +} +.reveal.has-light-background .controls { + color: #000; +} + +// Disable active states on touch devices +.reveal.no-hover .controls .controls-arrow:hover, +.reveal.no-hover .controls .controls-arrow:active { + @include controlsArrowTransform( $controlsArrowAngle ); +} + +// Edge aligned controls layout +@media screen and (min-width: 500px) { + + $spacing: 0.8em; + + .reveal .controls[data-controls-layout="edges"] { + & { + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + .navigate-left, + .navigate-right, + .navigate-up, + .navigate-down { + bottom: auto; + right: auto; + } + + .navigate-left { + top: 50%; + left: $spacing; + margin-top: -$controlArrowSize/2; + } + + .navigate-right { + top: 50%; + right: $spacing; + margin-top: -$controlArrowSize/2; + } + + .navigate-up { + top: $spacing; + left: 50%; + margin-left: -$controlArrowSize/2; + } + + .navigate-down { + bottom: $spacing - $controlArrowSpacing + 0.3em; + left: 50%; + margin-left: -$controlArrowSize/2; + } + } + +} + + +/********************************************* + * PROGRESS BAR + *********************************************/ + +.reveal .progress { + position: absolute; + display: none; + height: 3px; + width: 100%; + bottom: 0; + left: 0; + z-index: 10; + + background-color: rgba( 0, 0, 0, 0.2 ); + color: #fff; +} + .reveal .progress:after { + content: ''; + display: block; + position: absolute; + height: 10px; + width: 100%; + top: -10px; + } + .reveal .progress span { + display: block; + height: 100%; + width: 0px; + + background-color: currentColor; + transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); + } + +/********************************************* + * SLIDE NUMBER + *********************************************/ + +.reveal .slide-number { + position: absolute; + display: block; + right: 8px; + bottom: 8px; + z-index: 31; + font-family: Helvetica, sans-serif; + font-size: 12px; + line-height: 1; + color: #fff; + background-color: rgba( 0, 0, 0, 0.4 ); + padding: 5px; +} + +.reveal .slide-number a { + color: currentColor; +} + +.reveal .slide-number-delimiter { + margin: 0 3px; +} + +/********************************************* + * SLIDES + *********************************************/ + +.reveal { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; + touch-action: pinch-zoom; +} + +.reveal .slides { + position: absolute; + width: 100%; + height: 100%; + top: 0; + right: 0; + bottom: 0; + left: 0; + margin: auto; + pointer-events: none; + + overflow: visible; + z-index: 1; + text-align: center; + perspective: 600px; + perspective-origin: 50% 40%; +} + +.reveal .slides>section { + perspective: 600px; +} + +.reveal .slides>section, +.reveal .slides>section>section { + display: none; + position: absolute; + width: 100%; + padding: 20px 0px; + pointer-events: auto; + + z-index: 10; + transform-style: flat; + transition: transform-origin 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985), + transform 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985), + visibility 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985), + opacity 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); +} + +/* Global transition speed settings */ +.reveal[data-transition-speed="fast"] .slides section { + transition-duration: 400ms; +} +.reveal[data-transition-speed="slow"] .slides section { + transition-duration: 1200ms; +} + +/* Slide-specific transition speed overrides */ +.reveal .slides section[data-transition-speed="fast"] { + transition-duration: 400ms; +} +.reveal .slides section[data-transition-speed="slow"] { + transition-duration: 1200ms; +} + +.reveal .slides>section.stack { + padding-top: 0; + padding-bottom: 0; + pointer-events: none; + height: 100%; +} + +.reveal .slides>section.present, +.reveal .slides>section>section.present { + display: block; + z-index: 11; + opacity: 1; +} + +.reveal .slides>section:empty, +.reveal .slides>section>section:empty, +.reveal .slides>section[data-background-interactive], +.reveal .slides>section>section[data-background-interactive] { + pointer-events: none; +} + +.reveal.center, +.reveal.center .slides, +.reveal.center .slides section { + min-height: 0 !important; +} + +/* Don't allow interaction with invisible slides */ +.reveal .slides>section.future, +.reveal .slides>section>section.future, +.reveal .slides>section.past, +.reveal .slides>section>section.past { + pointer-events: none; +} + +.reveal.overview .slides>section, +.reveal.overview .slides>section>section { + pointer-events: auto; +} + +.reveal .slides>section.past, +.reveal .slides>section.future, +.reveal .slides>section>section.past, +.reveal .slides>section>section.future { + opacity: 0; +} + + +/********************************************* + * Mixins for readability of transitions + *********************************************/ + +@mixin transition-global($style) { + .reveal .slides section[data-transition=#{$style}], + .reveal.#{$style} .slides section:not([data-transition]) { + @content; + } +} +@mixin transition-stack($style) { + .reveal .slides section[data-transition=#{$style}].stack, + .reveal.#{$style} .slides section.stack { + @content; + } +} +@mixin transition-horizontal-past($style) { + .reveal .slides>section[data-transition=#{$style}].past, + .reveal .slides>section[data-transition~=#{$style}-out].past, + .reveal.#{$style} .slides>section:not([data-transition]).past { + @content; + } +} +@mixin transition-horizontal-future($style) { + .reveal .slides>section[data-transition=#{$style}].future, + .reveal .slides>section[data-transition~=#{$style}-in].future, + .reveal.#{$style} .slides>section:not([data-transition]).future { + @content; + } +} + +@mixin transition-vertical-past($style) { + .reveal .slides>section>section[data-transition=#{$style}].past, + .reveal .slides>section>section[data-transition~=#{$style}-out].past, + .reveal.#{$style} .slides>section>section:not([data-transition]).past { + @content; + } +} +@mixin transition-vertical-future($style) { + .reveal .slides>section>section[data-transition=#{$style}].future, + .reveal .slides>section>section[data-transition~=#{$style}-in].future, + .reveal.#{$style} .slides>section>section:not([data-transition]).future { + @content; + } +} + +/********************************************* + * SLIDE TRANSITION + * Aliased 'linear' for backwards compatibility + *********************************************/ + +@each $stylename in slide, linear { + .reveal.#{$stylename} section { + backface-visibility: hidden; + } + @include transition-horizontal-past(#{$stylename}) { + transform: translate(-150%, 0); + } + @include transition-horizontal-future(#{$stylename}) { + transform: translate(150%, 0); + } + @include transition-vertical-past(#{$stylename}) { + transform: translate(0, -150%); + } + @include transition-vertical-future(#{$stylename}) { + transform: translate(0, 150%); + } +} + +/********************************************* + * CONVEX TRANSITION + * Aliased 'default' for backwards compatibility + *********************************************/ + +@each $stylename in default, convex { + @include transition-stack(#{$stylename}) { + transform-style: preserve-3d; + } + + @include transition-horizontal-past(#{$stylename}) { + transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0); + } + @include transition-horizontal-future(#{$stylename}) { + transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0); + } + @include transition-vertical-past(#{$stylename}) { + transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0); + } + @include transition-vertical-future(#{$stylename}) { + transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0); + } +} + +/********************************************* + * CONCAVE TRANSITION + *********************************************/ + +@include transition-stack(concave) { + transform-style: preserve-3d; +} + +@include transition-horizontal-past(concave) { + transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0); +} +@include transition-horizontal-future(concave) { + transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0); +} +@include transition-vertical-past(concave) { + transform: translate3d(0, -80%, 0) rotateX(-70deg) translate3d(0, -80%, 0); +} +@include transition-vertical-future(concave) { + transform: translate3d(0, 80%, 0) rotateX(70deg) translate3d(0, 80%, 0); +} + + +/********************************************* + * ZOOM TRANSITION + *********************************************/ + +@include transition-global(zoom) { + transition-timing-function: ease; +} +@include transition-horizontal-past(zoom) { + visibility: hidden; + transform: scale(16); +} +@include transition-horizontal-future(zoom) { + visibility: hidden; + transform: scale(0.2); +} +@include transition-vertical-past(zoom) { + transform: scale(16); +} +@include transition-vertical-future(zoom) { + transform: scale(0.2); +} + + +/********************************************* + * CUBE TRANSITION + * + * WARNING: + * this is deprecated and will be removed in a + * future version. + *********************************************/ + +.reveal.cube .slides { + perspective: 1300px; +} + +.reveal.cube .slides section { + padding: 30px; + min-height: 700px; + backface-visibility: hidden; + box-sizing: border-box; + transform-style: preserve-3d; +} + .reveal.center.cube .slides section { + min-height: 0; + } + .reveal.cube .slides section:not(.stack):before { + content: ''; + position: absolute; + display: block; + width: 100%; + height: 100%; + left: 0; + top: 0; + background: rgba(0,0,0,0.1); + border-radius: 4px; + transform: translateZ( -20px ); + } + .reveal.cube .slides section:not(.stack):after { + content: ''; + position: absolute; + display: block; + width: 90%; + height: 30px; + left: 5%; + bottom: 0; + background: none; + z-index: 1; + + border-radius: 4px; + box-shadow: 0px 95px 25px rgba(0,0,0,0.2); + transform: translateZ(-90px) rotateX( 65deg ); + } + +.reveal.cube .slides>section.stack { + padding: 0; + background: none; +} + +.reveal.cube .slides>section.past { + transform-origin: 100% 0%; + transform: translate3d(-100%, 0, 0) rotateY(-90deg); +} + +.reveal.cube .slides>section.future { + transform-origin: 0% 0%; + transform: translate3d(100%, 0, 0) rotateY(90deg); +} + +.reveal.cube .slides>section>section.past { + transform-origin: 0% 100%; + transform: translate3d(0, -100%, 0) rotateX(90deg); +} + +.reveal.cube .slides>section>section.future { + transform-origin: 0% 0%; + transform: translate3d(0, 100%, 0) rotateX(-90deg); +} + + +/********************************************* + * PAGE TRANSITION + * + * WARNING: + * this is deprecated and will be removed in a + * future version. + *********************************************/ + +.reveal.page .slides { + perspective-origin: 0% 50%; + perspective: 3000px; +} + +.reveal.page .slides section { + padding: 30px; + min-height: 700px; + box-sizing: border-box; + transform-style: preserve-3d; +} + .reveal.page .slides section.past { + z-index: 12; + } + .reveal.page .slides section:not(.stack):before { + content: ''; + position: absolute; + display: block; + width: 100%; + height: 100%; + left: 0; + top: 0; + background: rgba(0,0,0,0.1); + transform: translateZ( -20px ); + } + .reveal.page .slides section:not(.stack):after { + content: ''; + position: absolute; + display: block; + width: 90%; + height: 30px; + left: 5%; + bottom: 0; + background: none; + z-index: 1; + + border-radius: 4px; + box-shadow: 0px 95px 25px rgba(0,0,0,0.2); + + -webkit-transform: translateZ(-90px) rotateX( 65deg ); + } + +.reveal.page .slides>section.stack { + padding: 0; + background: none; +} + +.reveal.page .slides>section.past { + transform-origin: 0% 0%; + transform: translate3d(-40%, 0, 0) rotateY(-80deg); +} + +.reveal.page .slides>section.future { + transform-origin: 100% 0%; + transform: translate3d(0, 0, 0); +} + +.reveal.page .slides>section>section.past { + transform-origin: 0% 0%; + transform: translate3d(0, -40%, 0) rotateX(80deg); +} + +.reveal.page .slides>section>section.future { + transform-origin: 0% 100%; + transform: translate3d(0, 0, 0); +} + + +/********************************************* + * FADE TRANSITION + *********************************************/ + +.reveal .slides section[data-transition=fade], +.reveal.fade .slides section:not([data-transition]), +.reveal.fade .slides>section>section:not([data-transition]) { + transform: none; + transition: opacity 0.5s; +} + + +.reveal.fade.overview .slides section, +.reveal.fade.overview .slides>section>section { + transition: none; +} + + +/********************************************* + * NO TRANSITION + *********************************************/ + +@include transition-global(none) { + transform: none; + transition: none; +} + + +/********************************************* + * PAUSED MODE + *********************************************/ + +.reveal .pause-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: black; + visibility: hidden; + opacity: 0; + z-index: 100; + transition: all 1s ease; +} + +.reveal .pause-overlay .resume-button { + position: absolute; + bottom: 20px; + right: 20px; + color: #ccc; + border-radius: 2px; + padding: 6px 14px; + border: 2px solid #ccc; + font-size: 16px; + background: transparent; + cursor: pointer; + + &:hover { + color: #fff; + border-color: #fff; + } +} + +.reveal.paused .pause-overlay { + visibility: visible; + opacity: 1; +} + + +/********************************************* + * FALLBACK + *********************************************/ + +.no-transforms { + overflow-y: auto; +} + +.no-transforms .reveal { + overflow: visible; +} + +.no-transforms .reveal .slides { + position: relative; + width: 80%; + max-width: 1280px; + height: auto; + top: 0; + margin: 0 auto; + text-align: center; +} + +.no-transforms .reveal .controls, +.no-transforms .reveal .progress { + display: none; +} + +.no-transforms .reveal .slides section { + display: block; + opacity: 1; + position: relative; + height: auto; + min-height: 0; + top: 0; + left: 0; + margin: 10vh 0; + margin: 70px 0; + transform: none; +} + +.reveal .no-transition, +.reveal .no-transition * { + transition: none !important; +} + + +/********************************************* + * PER-SLIDE BACKGROUNDS + *********************************************/ + +.reveal .backgrounds { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + perspective: 600px; +} + .reveal .slide-background { + display: none; + position: absolute; + width: 100%; + height: 100%; + opacity: 0; + visibility: hidden; + overflow: hidden; + + background-color: rgba( 0, 0, 0, 0 ); + + transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); + } + + .reveal .slide-background-content { + position: absolute; + width: 100%; + height: 100%; + + background-position: 50% 50%; + background-repeat: no-repeat; + background-size: cover; + } + + .reveal .slide-background.stack { + display: block; + } + + .reveal .slide-background.present { + opacity: 1; + visibility: visible; + z-index: 2; + } + + .print-pdf .reveal .slide-background { + opacity: 1 !important; + visibility: visible !important; + } + +/* Video backgrounds */ +.reveal .slide-background video { + position: absolute; + width: 100%; + height: 100%; + max-width: none; + max-height: none; + top: 0; + left: 0; + object-fit: cover; +} + .reveal .slide-background[data-background-size="contain"] video { + object-fit: contain; + } + +/* Immediate transition style */ +.reveal[data-background-transition=none]>.backgrounds .slide-background, +.reveal>.backgrounds .slide-background[data-background-transition=none] { + transition: none; +} + +/* Slide */ +.reveal[data-background-transition=slide]>.backgrounds .slide-background, +.reveal>.backgrounds .slide-background[data-background-transition=slide] { + opacity: 1; + backface-visibility: hidden; +} + .reveal[data-background-transition=slide]>.backgrounds .slide-background.past, + .reveal>.backgrounds .slide-background.past[data-background-transition=slide] { + transform: translate(-100%, 0); + } + .reveal[data-background-transition=slide]>.backgrounds .slide-background.future, + .reveal>.backgrounds .slide-background.future[data-background-transition=slide] { + transform: translate(100%, 0); + } + + .reveal[data-background-transition=slide]>.backgrounds .slide-background>.slide-background.past, + .reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=slide] { + transform: translate(0, -100%); + } + .reveal[data-background-transition=slide]>.backgrounds .slide-background>.slide-background.future, + .reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=slide] { + transform: translate(0, 100%); + } + + +/* Convex */ +.reveal[data-background-transition=convex]>.backgrounds .slide-background.past, +.reveal>.backgrounds .slide-background.past[data-background-transition=convex] { + opacity: 0; + transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0); +} +.reveal[data-background-transition=convex]>.backgrounds .slide-background.future, +.reveal>.backgrounds .slide-background.future[data-background-transition=convex] { + opacity: 0; + transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0); +} + +.reveal[data-background-transition=convex]>.backgrounds .slide-background>.slide-background.past, +.reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=convex] { + opacity: 0; + transform: translate3d(0, -100%, 0) rotateX(90deg) translate3d(0, -100%, 0); +} +.reveal[data-background-transition=convex]>.backgrounds .slide-background>.slide-background.future, +.reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=convex] { + opacity: 0; + transform: translate3d(0, 100%, 0) rotateX(-90deg) translate3d(0, 100%, 0); +} + + +/* Concave */ +.reveal[data-background-transition=concave]>.backgrounds .slide-background.past, +.reveal>.backgrounds .slide-background.past[data-background-transition=concave] { + opacity: 0; + transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0); +} +.reveal[data-background-transition=concave]>.backgrounds .slide-background.future, +.reveal>.backgrounds .slide-background.future[data-background-transition=concave] { + opacity: 0; + transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0); +} + +.reveal[data-background-transition=concave]>.backgrounds .slide-background>.slide-background.past, +.reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=concave] { + opacity: 0; + transform: translate3d(0, -100%, 0) rotateX(-90deg) translate3d(0, -100%, 0); +} +.reveal[data-background-transition=concave]>.backgrounds .slide-background>.slide-background.future, +.reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=concave] { + opacity: 0; + transform: translate3d(0, 100%, 0) rotateX(90deg) translate3d(0, 100%, 0); +} + +/* Zoom */ +.reveal[data-background-transition=zoom]>.backgrounds .slide-background, +.reveal>.backgrounds .slide-background[data-background-transition=zoom] { + transition-timing-function: ease; +} + +.reveal[data-background-transition=zoom]>.backgrounds .slide-background.past, +.reveal>.backgrounds .slide-background.past[data-background-transition=zoom] { + opacity: 0; + visibility: hidden; + transform: scale(16); +} +.reveal[data-background-transition=zoom]>.backgrounds .slide-background.future, +.reveal>.backgrounds .slide-background.future[data-background-transition=zoom] { + opacity: 0; + visibility: hidden; + transform: scale(0.2); +} + +.reveal[data-background-transition=zoom]>.backgrounds .slide-background>.slide-background.past, +.reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=zoom] { + opacity: 0; + visibility: hidden; + transform: scale(16); +} +.reveal[data-background-transition=zoom]>.backgrounds .slide-background>.slide-background.future, +.reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=zoom] { + opacity: 0; + visibility: hidden; + transform: scale(0.2); +} + + +/* Global transition speed settings */ +.reveal[data-transition-speed="fast"]>.backgrounds .slide-background { + transition-duration: 400ms; +} +.reveal[data-transition-speed="slow"]>.backgrounds .slide-background { + transition-duration: 1200ms; +} + + +/********************************************* + * OVERVIEW + *********************************************/ + +.reveal.overview { + perspective-origin: 50% 50%; + perspective: 700px; + + .slides { + // Fixes overview rendering errors in FF48+, not applied to + // other browsers since it degrades performance + -moz-transform-style: preserve-3d; + } + + .slides section { + height: 100%; + top: 0 !important; + opacity: 1 !important; + overflow: hidden; + visibility: visible !important; + cursor: pointer; + box-sizing: border-box; + } + .slides section:hover, + .slides section.present { + outline: 10px solid rgba(150,150,150,0.4); + outline-offset: 10px; + } + .slides section .fragment { + opacity: 1; + transition: none; + } + .slides section:after, + .slides section:before { + display: none !important; + } + .slides>section.stack { + padding: 0; + top: 0 !important; + background: none; + outline: none; + overflow: visible; + } + + .backgrounds { + perspective: inherit; + + // Fixes overview rendering errors in FF48+, not applied to + // other browsers since it degrades performance + -moz-transform-style: preserve-3d; + } + + .backgrounds .slide-background { + opacity: 1; + visibility: visible; + + // This can't be applied to the slide itself in Safari + outline: 10px solid rgba(150,150,150,0.1); + outline-offset: 10px; + } + + .backgrounds .slide-background.stack { + overflow: visible; + } +} + +// Disable transitions transitions while we're activating +// or deactivating the overview mode. +.reveal.overview .slides section, +.reveal.overview-deactivating .slides section { + transition: none; +} + +.reveal.overview .backgrounds .slide-background, +.reveal.overview-deactivating .backgrounds .slide-background { + transition: none; +} + + +/********************************************* + * RTL SUPPORT + *********************************************/ + +.reveal.rtl .slides, +.reveal.rtl .slides h1, +.reveal.rtl .slides h2, +.reveal.rtl .slides h3, +.reveal.rtl .slides h4, +.reveal.rtl .slides h5, +.reveal.rtl .slides h6 { + direction: rtl; + font-family: sans-serif; +} + +.reveal.rtl pre, +.reveal.rtl code { + direction: ltr; +} + +.reveal.rtl ol, +.reveal.rtl ul { + text-align: right; +} + +.reveal.rtl .progress span { + float: right +} + +/********************************************* + * PARALLAX BACKGROUND + *********************************************/ + +.reveal.has-parallax-background .backgrounds { + transition: all 0.8s ease; +} + +/* Global transition speed settings */ +.reveal.has-parallax-background[data-transition-speed="fast"] .backgrounds { + transition-duration: 400ms; +} +.reveal.has-parallax-background[data-transition-speed="slow"] .backgrounds { + transition-duration: 1200ms; +} + + +/********************************************* + * OVERLAY FOR LINK PREVIEWS AND HELP + *********************************************/ + +.reveal > .overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1000; + background: rgba( 0, 0, 0, 0.9 ); + opacity: 0; + visibility: hidden; + transition: all 0.3s ease; +} + .reveal > .overlay.visible { + opacity: 1; + visibility: visible; + } + + .reveal > .overlay .spinner { + position: absolute; + display: block; + top: 50%; + left: 50%; + width: 32px; + height: 32px; + margin: -16px 0 0 -16px; + z-index: 10; + background-image: url(data:image/gif;base64,R0lGODlhIAAgAPMAAJmZmf%2F%2F%2F6%2Bvr8nJybW1tcDAwOjo6Nvb26ioqKOjo7Ozs%2FLy8vz8%2FAAAAAAAAAAAACH%2FC05FVFNDQVBFMi4wAwEAAAAh%2FhpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh%2BQQJCgAAACwAAAAAIAAgAAAE5xDISWlhperN52JLhSSdRgwVo1ICQZRUsiwHpTJT4iowNS8vyW2icCF6k8HMMBkCEDskxTBDAZwuAkkqIfxIQyhBQBFvAQSDITM5VDW6XNE4KagNh6Bgwe60smQUB3d4Rz1ZBApnFASDd0hihh12BkE9kjAJVlycXIg7CQIFA6SlnJ87paqbSKiKoqusnbMdmDC2tXQlkUhziYtyWTxIfy6BE8WJt5YJvpJivxNaGmLHT0VnOgSYf0dZXS7APdpB309RnHOG5gDqXGLDaC457D1zZ%2FV%2FnmOM82XiHRLYKhKP1oZmADdEAAAh%2BQQJCgAAACwAAAAAIAAgAAAE6hDISWlZpOrNp1lGNRSdRpDUolIGw5RUYhhHukqFu8DsrEyqnWThGvAmhVlteBvojpTDDBUEIFwMFBRAmBkSgOrBFZogCASwBDEY%2FCZSg7GSE0gSCjQBMVG023xWBhklAnoEdhQEfyNqMIcKjhRsjEdnezB%2BA4k8gTwJhFuiW4dokXiloUepBAp5qaKpp6%2BHo7aWW54wl7obvEe0kRuoplCGepwSx2jJvqHEmGt6whJpGpfJCHmOoNHKaHx61WiSR92E4lbFoq%2BB6QDtuetcaBPnW6%2BO7wDHpIiK9SaVK5GgV543tzjgGcghAgAh%2BQQJCgAAACwAAAAAIAAgAAAE7hDISSkxpOrN5zFHNWRdhSiVoVLHspRUMoyUakyEe8PTPCATW9A14E0UvuAKMNAZKYUZCiBMuBakSQKG8G2FzUWox2AUtAQFcBKlVQoLgQReZhQlCIJesQXI5B0CBnUMOxMCenoCfTCEWBsJColTMANldx15BGs8B5wlCZ9Po6OJkwmRpnqkqnuSrayqfKmqpLajoiW5HJq7FL1Gr2mMMcKUMIiJgIemy7xZtJsTmsM4xHiKv5KMCXqfyUCJEonXPN2rAOIAmsfB3uPoAK%2B%2BG%2Bw48edZPK%2BM6hLJpQg484enXIdQFSS1u6UhksENEQAAIfkECQoAAAAsAAAAACAAIAAABOcQyEmpGKLqzWcZRVUQnZYg1aBSh2GUVEIQ2aQOE%2BG%2BcD4ntpWkZQj1JIiZIogDFFyHI0UxQwFugMSOFIPJftfVAEoZLBbcLEFhlQiqGp1Vd140AUklUN3eCA51C1EWMzMCezCBBmkxVIVHBWd3HHl9JQOIJSdSnJ0TDKChCwUJjoWMPaGqDKannasMo6WnM562R5YluZRwur0wpgqZE7NKUm%2BFNRPIhjBJxKZteWuIBMN4zRMIVIhffcgojwCF117i4nlLnY5ztRLsnOk%2BaV%2BoJY7V7m76PdkS4trKcdg0Zc0tTcKkRAAAIfkECQoAAAAsAAAAACAAIAAABO4QyEkpKqjqzScpRaVkXZWQEximw1BSCUEIlDohrft6cpKCk5xid5MNJTaAIkekKGQkWyKHkvhKsR7ARmitkAYDYRIbUQRQjWBwJRzChi9CRlBcY1UN4g0%2FVNB0AlcvcAYHRyZPdEQFYV8ccwR5HWxEJ02YmRMLnJ1xCYp0Y5idpQuhopmmC2KgojKasUQDk5BNAwwMOh2RtRq5uQuPZKGIJQIGwAwGf6I0JXMpC8C7kXWDBINFMxS4DKMAWVWAGYsAdNqW5uaRxkSKJOZKaU3tPOBZ4DuK2LATgJhkPJMgTwKCdFjyPHEnKxFCDhEAACH5BAkKAAAALAAAAAAgACAAAATzEMhJaVKp6s2nIkolIJ2WkBShpkVRWqqQrhLSEu9MZJKK9y1ZrqYK9WiClmvoUaF8gIQSNeF1Er4MNFn4SRSDARWroAIETg1iVwuHjYB1kYc1mwruwXKC9gmsJXliGxc%2BXiUCby9ydh1sOSdMkpMTBpaXBzsfhoc5l58Gm5yToAaZhaOUqjkDgCWNHAULCwOLaTmzswadEqggQwgHuQsHIoZCHQMMQgQGubVEcxOPFAcMDAYUA85eWARmfSRQCdcMe0zeP1AAygwLlJtPNAAL19DARdPzBOWSm1brJBi45soRAWQAAkrQIykShQ9wVhHCwCQCACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiRMDjI0Fd30%2FiI2UA5GSS5UDj2l6NoqgOgN4gksEBgYFf0FDqKgHnyZ9OX8HrgYHdHpcHQULXAS2qKpENRg7eAMLC7kTBaixUYFkKAzWAAnLC7FLVxLWDBLKCwaKTULgEwbLA4hJtOkSBNqITT3xEgfLpBtzE%2FjiuL04RGEBgwWhShRgQExHBAAh%2BQQJCgAAACwAAAAAIAAgAAAE7xDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfZiCqGk5dTESJeaOAlClzsJsqwiJwiqnFrb2nS9kmIcgEsjQydLiIlHehhpejaIjzh9eomSjZR%2BipslWIRLAgMDOR2DOqKogTB9pCUJBagDBXR6XB0EBkIIsaRsGGMMAxoDBgYHTKJiUYEGDAzHC9EACcUGkIgFzgwZ0QsSBcXHiQvOwgDdEwfFs0sDzt4S6BK4xYjkDOzn0unFeBzOBijIm1Dgmg5YFQwsCMjp1oJ8LyIAACH5BAkKAAAALAAAAAAgACAAAATwEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GGl6NoiPOH16iZKNlH6KmyWFOggHhEEvAwwMA0N9GBsEC6amhnVcEwavDAazGwIDaH1ipaYLBUTCGgQDA8NdHz0FpqgTBwsLqAbWAAnIA4FWKdMLGdYGEgraigbT0OITBcg5QwPT4xLrROZL6AuQAPUS7bxLpoWidY0JtxLHKhwwMJBTHgPKdEQAACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GAULDJCRiXo1CpGXDJOUjY%2BYip9DhToJA4RBLwMLCwVDfRgbBAaqqoZ1XBMHswsHtxtFaH1iqaoGNgAIxRpbFAgfPQSqpbgGBqUD1wBXeCYp1AYZ19JJOYgH1KwA4UBvQwXUBxPqVD9L3sbp2BNk2xvvFPJd%2BMFCN6HAAIKgNggY0KtEBAAh%2BQQJCgAAACwAAAAAIAAgAAAE6BDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfYIDMaAFdTESJeaEDAIMxYFqrOUaNW4E4ObYcCXaiBVEgULe0NJaxxtYksjh2NLkZISgDgJhHthkpU4mW6blRiYmZOlh4JWkDqILwUGBnE6TYEbCgevr0N1gH4At7gHiRpFaLNrrq8HNgAJA70AWxQIH1%2BvsYMDAzZQPC9VCNkDWUhGkuE5PxJNwiUK4UfLzOlD4WvzAHaoG9nxPi5d%2BjYUqfAhhykOFwJWiAAAIfkECQoAAAAsAAAAACAAIAAABPAQyElpUqnqzaciSoVkXVUMFaFSwlpOCcMYlErAavhOMnNLNo8KsZsMZItJEIDIFSkLGQoQTNhIsFehRww2CQLKF0tYGKYSg%2BygsZIuNqJksKgbfgIGepNo2cIUB3V1B3IvNiBYNQaDSTtfhhx0CwVPI0UJe0%2Bbm4g5VgcGoqOcnjmjqDSdnhgEoamcsZuXO1aWQy8KAwOAuTYYGwi7w5h%2BKr0SJ8MFihpNbx%2B4Erq7BYBuzsdiH1jCAzoSfl0rVirNbRXlBBlLX%2BBP0XJLAPGzTkAuAOqb0WT5AH7OcdCm5B8TgRwSRKIHQtaLCwg1RAAAOwAAAAAAAAAAAA%3D%3D); + + visibility: visible; + opacity: 0.6; + transition: all 0.3s ease; + } + + .reveal > .overlay header { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 40px; + z-index: 2; + border-bottom: 1px solid #222; + } + .reveal > .overlay header a { + display: inline-block; + width: 40px; + height: 40px; + line-height: 36px; + padding: 0 10px; + float: right; + opacity: 0.6; + + box-sizing: border-box; + } + .reveal > .overlay header a:hover { + opacity: 1; + } + .reveal > .overlay header a .icon { + display: inline-block; + width: 20px; + height: 20px; + + background-position: 50% 50%; + background-size: 100%; + background-repeat: no-repeat; + } + .reveal > .overlay header a.close .icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABkklEQVRYR8WX4VHDMAxG6wnoJrABZQPYBCaBTWAD2g1gE5gg6OOsXuxIlr40d81dfrSJ9V4c2VLK7spHuTJ/5wpM07QXuXc5X0opX2tEJcadjHuV80li/FgxTIEK/5QBCICBD6xEhSMGHgQPgBgLiYVAB1dpSqKDawxTohFw4JSEA3clzgIBPCURwE2JucBR7rhPJJv5OpJwDX+SfDjgx1wACQeJG1aChP9K/IMmdZ8DtESV1WyP3Bt4MwM6sj4NMxMYiqUWHQu4KYA/SYkIjOsm3BXYWMKFDwU2khjCQ4ELJUJ4SmClRArOCmSXGuKma0fYD5CbzHxFpCSGAhfAVSSUGDUk2BWZaff2g6GE15BsBQ9nwmpIGDiyHQddwNTMKkbZaf9fajXQca1EX44puJZUsnY0ObGmITE3GVLCbEhQUjGVt146j6oasWN+49Vph2w1pZ5EansNZqKBm1txbU57iRRcZ86RWMDdWtBJUHBHwoQPi1GV+JCbntmvok7iTX4/Up9mgyTc/FJYDTcndgH/AA5A/CHsyEkVAAAAAElFTkSuQmCC); + } + .reveal > .overlay header a.external .icon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAcElEQVRYR+2WSQoAIQwEzf8f7XiOMkUQxUPlGkM3hVmiQfQR9GYnH1SsAQlI4DiBqkCMoNb9y2e90IAEJPAcgdznU9+engMaeJ7Azh5Y1U67gAho4DqBqmB1buAf0MB1AlVBek83ZPkmJMGc1wAR+AAqod/B97TRpQAAAABJRU5ErkJggg==); + } + + .reveal > .overlay .viewport { + position: absolute; + display: flex; + top: 40px; + right: 0; + bottom: 0; + left: 0; + } + + .reveal > .overlay.overlay-preview .viewport iframe { + width: 100%; + height: 100%; + max-width: 100%; + max-height: 100%; + border: 0; + + opacity: 0; + visibility: hidden; + transition: all 0.3s ease; + } + + .reveal > .overlay.overlay-preview.loaded .viewport iframe { + opacity: 1; + visibility: visible; + } + + .reveal > .overlay.overlay-preview.loaded .viewport-inner { + position: absolute; + z-index: -1; + left: 0; + top: 45%; + width: 100%; + text-align: center; + letter-spacing: normal; + } + .reveal > .overlay.overlay-preview .x-frame-error { + opacity: 0; + transition: opacity 0.3s ease 0.3s; + } + .reveal > .overlay.overlay-preview.loaded .x-frame-error { + opacity: 1; + } + + .reveal > .overlay.overlay-preview.loaded .spinner { + opacity: 0; + visibility: hidden; + transform: scale(0.2); + } + + .reveal > .overlay.overlay-help .viewport { + overflow: auto; + color: #fff; + } + + .reveal > .overlay.overlay-help .viewport .viewport-inner { + width: 600px; + margin: auto; + padding: 20px 20px 80px 20px; + text-align: center; + letter-spacing: normal; + } + + .reveal > .overlay.overlay-help .viewport .viewport-inner .title { + font-size: 20px; + } + + .reveal > .overlay.overlay-help .viewport .viewport-inner table { + border: 1px solid #fff; + border-collapse: collapse; + font-size: 16px; + } + + .reveal > .overlay.overlay-help .viewport .viewport-inner table th, + .reveal > .overlay.overlay-help .viewport .viewport-inner table td { + width: 200px; + padding: 14px; + border: 1px solid #fff; + vertical-align: middle; + } + + .reveal > .overlay.overlay-help .viewport .viewport-inner table th { + padding-top: 20px; + padding-bottom: 20px; + } + + +/********************************************* + * PLAYBACK COMPONENT + *********************************************/ + +.reveal .playback { + position: absolute; + left: 15px; + bottom: 20px; + z-index: 30; + cursor: pointer; + transition: all 400ms ease; + -webkit-tap-highlight-color: rgba( 0, 0, 0, 0 ); +} + +.reveal.overview .playback { + opacity: 0; + visibility: hidden; +} + + +/********************************************* + * CODE HIGHLGIHTING + *********************************************/ + +.reveal .hljs table { + margin: initial; +} + +.reveal .hljs-ln-code, +.reveal .hljs-ln-numbers { + padding: 0; + border: 0; +} + +.reveal .hljs-ln-numbers { + opacity: 0.6; + padding-right: 0.75em; + text-align: right; + vertical-align: top; +} + +.reveal .hljs.has-highlights tr:not(.highlight-line) { + opacity: 0.4; +} + +.reveal .hljs:not(:first-child).fragment { + position: absolute; + top: 0; + left: 0; + width: 100%; + box-sizing: border-box; +} + + +/********************************************* + * ROLLING LINKS + *********************************************/ + +.reveal .roll { + display: inline-block; + line-height: 1.2; + overflow: hidden; + + vertical-align: top; + perspective: 400px; + perspective-origin: 50% 50%; +} + .reveal .roll:hover { + background: none; + text-shadow: none; + } +.reveal .roll span { + display: block; + position: relative; + padding: 0 2px; + + pointer-events: none; + transition: all 400ms ease; + transform-origin: 50% 0%; + transform-style: preserve-3d; + backface-visibility: hidden; +} + .reveal .roll:hover span { + background: rgba(0,0,0,0.5); + transform: translate3d( 0px, 0px, -45px ) rotateX( 90deg ); + } +.reveal .roll span:after { + content: attr(data-title); + + display: block; + position: absolute; + left: 0; + top: 0; + padding: 0 2px; + backface-visibility: hidden; + transform-origin: 50% 0%; + transform: translate3d( 0px, 110%, 0px ) rotateX( -90deg ); +} + + +/********************************************* + * SPEAKER NOTES + *********************************************/ + +$notesWidthPercent: 25%; + +// Hide on-page notes +.reveal aside.notes { + display: none; +} + +// An interface element that can optionally be used to show the +// speaker notes to all viewers, on top of the presentation +.reveal .speaker-notes { + display: none; + position: absolute; + width: $notesWidthPercent / (1-$notesWidthPercent/100) * 1%; + height: 100%; + top: 0; + left: 100%; + padding: 14px 18px 14px 18px; + z-index: 1; + font-size: 18px; + line-height: 1.4; + border: 1px solid rgba( 0, 0, 0, 0.05 ); + color: #222; + background-color: #f5f5f5; + overflow: auto; + box-sizing: border-box; + text-align: left; + font-family: Helvetica, sans-serif; + -webkit-overflow-scrolling: touch; + + .notes-placeholder { + color: #ccc; + font-style: italic; + } + + &:focus { + outline: none; + } + + &:before { + content: 'Speaker notes'; + display: block; + margin-bottom: 10px; + opacity: 0.5; + } +} + + +.reveal.show-notes { + max-width: 100% - $notesWidthPercent; + overflow: visible; +} + +.reveal.show-notes .speaker-notes { + display: block; +} + +@media screen and (min-width: 1600px) { + .reveal .speaker-notes { + font-size: 20px; + } +} + +@media screen and (max-width: 1024px) { + .reveal.show-notes { + border-left: 0; + max-width: none; + max-height: 70%; + max-height: 70vh; + overflow: visible; + } + + .reveal.show-notes .speaker-notes { + top: 100%; + left: 0; + width: 100%; + height: (30/0.7)*1%; + height: 30vh; + border: 0; + } +} + +@media screen and (max-width: 600px) { + .reveal.show-notes { + max-height: 60%; + max-height: 60vh; + } + + .reveal.show-notes .speaker-notes { + top: 100%; + height: (40/0.6)*1%; + height: 40vh; + } + + .reveal .speaker-notes { + font-size: 14px; + } +} + + +/********************************************* + * ZOOM PLUGIN + *********************************************/ + +.zoomed .reveal *, +.zoomed .reveal *:before, +.zoomed .reveal *:after { + backface-visibility: visible !important; +} + +.zoomed .reveal .progress, +.zoomed .reveal .controls { + opacity: 0; +} + +.zoomed .reveal .roll span { + background: none; +} + +.zoomed .reveal .roll span:after { + visibility: hidden; +} diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/source/beige.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/source/beige.scss new file mode 100755 index 0000000..5564f53 --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/source/beige.scss @@ -0,0 +1,39 @@ +/** + * Beige theme for reveal.js. + * + * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se + */ + + +// Default mixins and settings ----------------- +@import "../template/mixins"; +@import "../template/settings"; +// --------------------------------------------- + + + +// Include theme-specific fonts +@import url(../../lib/font/league-gothic/league-gothic.css); +@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); + + +// Override theme settings (see ../template/settings.scss) +$mainColor: #333; +$headingColor: #333; +$headingTextShadow: none; +$backgroundColor: #f7f3de; +$linkColor: #8b743d; +$linkColorHover: lighten( $linkColor, 20% ); +$selectionBackgroundColor: rgba(79, 64, 28, 0.99); +$heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); + +// Background generator +@mixin bodyBackground() { + @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); +} + + + +// Theme template ------------------------------ +@import "../template/theme"; +// --------------------------------------------- \ No newline at end of file diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/source/black.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/source/black.scss new file mode 100755 index 0000000..4720c8a --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/source/black.scss @@ -0,0 +1,49 @@ +/** + * Black theme for reveal.js. This is the opposite of the 'white' theme. + * + * By Hakim El Hattab, http://hakim.se + */ + + +// Default mixins and settings ----------------- +@import "../template/mixins"; +@import "../template/settings"; +// --------------------------------------------- + + +// Include theme-specific fonts +@import url(../../lib/font/source-sans-pro/source-sans-pro.css); + + +// Override theme settings (see ../template/settings.scss) +$backgroundColor: #191919; + +$mainColor: #fff; +$headingColor: #fff; + +$mainFontSize: 42px; +$mainFont: 'Source Sans Pro', Helvetica, sans-serif; +$headingFont: 'Source Sans Pro', Helvetica, sans-serif; +$headingTextShadow: none; +$headingLetterSpacing: normal; +$headingTextTransform: uppercase; +$headingFontWeight: 600; +$linkColor: #42affa; +$linkColorHover: lighten( $linkColor, 15% ); +$selectionBackgroundColor: lighten( $linkColor, 25% ); + +$heading1Size: 2.5em; +$heading2Size: 1.6em; +$heading3Size: 1.3em; +$heading4Size: 1.0em; + +section.has-light-background { + &, h1, h2, h3, h4, h5, h6 { + color: #222; + } +} + + +// Theme template ------------------------------ +@import "../template/theme"; +// --------------------------------------------- \ No newline at end of file diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/source/blood.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/source/blood.scss new file mode 100755 index 0000000..4533fc0 --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/source/blood.scss @@ -0,0 +1,78 @@ +/** + * Blood theme for reveal.js + * Author: Walther http://github.com/Walther + * + * Designed to be used with highlight.js theme + * "monokai_sublime.css" available from + * https://github.com/isagalaev/highlight.js/ + * + * For other themes, change $codeBackground accordingly. + * + */ + + // Default mixins and settings ----------------- +@import "../template/mixins"; +@import "../template/settings"; +// --------------------------------------------- + +// Include theme-specific fonts + +@import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic); + +// Colors used in the theme +$blood: #a23; +$coal: #222; +$codeBackground: #23241f; + +$backgroundColor: $coal; + +// Main text +$mainFont: Ubuntu, 'sans-serif'; +$mainColor: #eee; + +// Headings +$headingFont: Ubuntu, 'sans-serif'; +$headingTextShadow: 2px 2px 2px $coal; + +// h1 shadow, borrowed humbly from +// (c) Default theme by Hakim El Hattab +$heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); + +// Links +$linkColor: $blood; +$linkColorHover: lighten( $linkColor, 20% ); + +// Text selection +$selectionBackgroundColor: $blood; +$selectionColor: #fff; + + +// Theme template ------------------------------ +@import "../template/theme"; +// --------------------------------------------- + +// some overrides after theme template import + +.reveal p { + font-weight: 300; + text-shadow: 1px 1px $coal; +} + +.reveal h1, +.reveal h2, +.reveal h3, +.reveal h4, +.reveal h5, +.reveal h6 { + font-weight: 700; +} + +.reveal p code { + background-color: $codeBackground; + display: inline-block; + border-radius: 7px; +} + +.reveal small code { + vertical-align: baseline; +} \ No newline at end of file diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/source/league.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/source/league.scss new file mode 100755 index 0000000..46ea04a --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/source/league.scss @@ -0,0 +1,34 @@ +/** + * League theme for reveal.js. + * + * This was the default theme pre-3.0.0. + * + * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se + */ + + +// Default mixins and settings ----------------- +@import "../template/mixins"; +@import "../template/settings"; +// --------------------------------------------- + + + +// Include theme-specific fonts +@import url(../../lib/font/league-gothic/league-gothic.css); +@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); + +// Override theme settings (see ../template/settings.scss) +$headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); +$heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); + +// Background generator +@mixin bodyBackground() { + @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); +} + + + +// Theme template ------------------------------ +@import "../template/theme"; +// --------------------------------------------- \ No newline at end of file diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/source/moon.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/source/moon.scss new file mode 100755 index 0000000..e47e5b5 --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/source/moon.scss @@ -0,0 +1,57 @@ +/** + * Solarized Dark theme for reveal.js. + * Author: Achim Staebler + */ + + +// Default mixins and settings ----------------- +@import "../template/mixins"; +@import "../template/settings"; +// --------------------------------------------- + + + +// Include theme-specific fonts +@import url(../../lib/font/league-gothic/league-gothic.css); +@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); + +/** + * Solarized colors by Ethan Schoonover + */ +html * { + color-profile: sRGB; + rendering-intent: auto; +} + +// Solarized colors +$base03: #002b36; +$base02: #073642; +$base01: #586e75; +$base00: #657b83; +$base0: #839496; +$base1: #93a1a1; +$base2: #eee8d5; +$base3: #fdf6e3; +$yellow: #b58900; +$orange: #cb4b16; +$red: #dc322f; +$magenta: #d33682; +$violet: #6c71c4; +$blue: #268bd2; +$cyan: #2aa198; +$green: #859900; + +// Override theme settings (see ../template/settings.scss) +$mainColor: $base1; +$headingColor: $base2; +$headingTextShadow: none; +$backgroundColor: $base03; +$linkColor: $blue; +$linkColorHover: lighten( $linkColor, 20% ); +$selectionBackgroundColor: $magenta; + + + +// Theme template ------------------------------ +@import "../template/theme"; +// --------------------------------------------- diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/source/night.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/source/night.scss new file mode 100755 index 0000000..d49a282 --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/source/night.scss @@ -0,0 +1,34 @@ +/** + * Black theme for reveal.js. + * + * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se + */ + + +// Default mixins and settings ----------------- +@import "../template/mixins"; +@import "../template/settings"; +// --------------------------------------------- + + +// Include theme-specific fonts +@import url(https://fonts.googleapis.com/css?family=Montserrat:700); +@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); + + +// Override theme settings (see ../template/settings.scss) +$backgroundColor: #111; + +$mainFont: 'Open Sans', sans-serif; +$linkColor: #e7ad52; +$linkColorHover: lighten( $linkColor, 20% ); +$headingFont: 'Montserrat', Impact, sans-serif; +$headingTextShadow: none; +$headingLetterSpacing: -0.03em; +$headingTextTransform: none; +$selectionBackgroundColor: #e7ad52; + + +// Theme template ------------------------------ +@import "../template/theme"; +// --------------------------------------------- \ No newline at end of file diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/source/serif.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/source/serif.scss new file mode 100755 index 0000000..ec3fcb3 --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/source/serif.scss @@ -0,0 +1,35 @@ +/** + * A simple theme for reveal.js presentations, similar + * to the default theme. The accent color is brown. + * + * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. + */ + + +// Default mixins and settings ----------------- +@import "../template/mixins"; +@import "../template/settings"; +// --------------------------------------------- + + + +// Override theme settings (see ../template/settings.scss) +$mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; +$mainColor: #000; +$headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; +$headingColor: #383D3D; +$headingTextShadow: none; +$headingTextTransform: none; +$backgroundColor: #F0F1EB; +$linkColor: #51483D; +$linkColorHover: lighten( $linkColor, 20% ); +$selectionBackgroundColor: #26351C; + +.reveal a { + line-height: 1.3em; +} + + +// Theme template ------------------------------ +@import "../template/theme"; +// --------------------------------------------- diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/source/simple.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/source/simple.scss new file mode 100755 index 0000000..394c9cd --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/source/simple.scss @@ -0,0 +1,43 @@ +/** + * A simple theme for reveal.js presentations, similar + * to the default theme. The accent color is darkblue. + * + * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. + * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se + */ + + +// Default mixins and settings ----------------- +@import "../template/mixins"; +@import "../template/settings"; +// --------------------------------------------- + + + +// Include theme-specific fonts +@import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); +@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); + + +// Override theme settings (see ../template/settings.scss) +$mainFont: 'Lato', sans-serif; +$mainColor: #000; +$headingFont: 'News Cycle', Impact, sans-serif; +$headingColor: #000; +$headingTextShadow: none; +$headingTextTransform: none; +$backgroundColor: #fff; +$linkColor: #00008B; +$linkColorHover: lighten( $linkColor, 20% ); +$selectionBackgroundColor: rgba(0, 0, 0, 0.99); + +section.has-dark-background { + &, h1, h2, h3, h4, h5, h6 { + color: #fff; + } +} + + +// Theme template ------------------------------ +@import "../template/theme"; +// --------------------------------------------- \ No newline at end of file diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/source/sky.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/source/sky.scss new file mode 100755 index 0000000..3fee67c --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/source/sky.scss @@ -0,0 +1,46 @@ +/** + * Sky theme for reveal.js. + * + * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se + */ + + +// Default mixins and settings ----------------- +@import "../template/mixins"; +@import "../template/settings"; +// --------------------------------------------- + + + +// Include theme-specific fonts +@import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); +@import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); + + +// Override theme settings (see ../template/settings.scss) +$mainFont: 'Open Sans', sans-serif; +$mainColor: #333; +$headingFont: 'Quicksand', sans-serif; +$headingColor: #333; +$headingLetterSpacing: -0.08em; +$headingTextShadow: none; +$backgroundColor: #f7fbfc; +$linkColor: #3b759e; +$linkColorHover: lighten( $linkColor, 20% ); +$selectionBackgroundColor: #134674; + +// Fix links so they are not cut off +.reveal a { + line-height: 1.3em; +} + +// Background generator +@mixin bodyBackground() { + @include radial-gradient( #add9e4, #f7fbfc ); +} + + + +// Theme template ------------------------------ +@import "../template/theme"; +// --------------------------------------------- diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/source/solarized.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/source/solarized.scss new file mode 100755 index 0000000..912be56 --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/source/solarized.scss @@ -0,0 +1,63 @@ +/** + * Solarized Light theme for reveal.js. + * Author: Achim Staebler + */ + + +// Default mixins and settings ----------------- +@import "../template/mixins"; +@import "../template/settings"; +// --------------------------------------------- + + + +// Include theme-specific fonts +@import url(../../lib/font/league-gothic/league-gothic.css); +@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); + + +/** + * Solarized colors by Ethan Schoonover + */ +html * { + color-profile: sRGB; + rendering-intent: auto; +} + +// Solarized colors +$base03: #002b36; +$base02: #073642; +$base01: #586e75; +$base00: #657b83; +$base0: #839496; +$base1: #93a1a1; +$base2: #eee8d5; +$base3: #fdf6e3; +$yellow: #b58900; +$orange: #cb4b16; +$red: #dc322f; +$magenta: #d33682; +$violet: #6c71c4; +$blue: #268bd2; +$cyan: #2aa198; +$green: #859900; + +// Override theme settings (see ../template/settings.scss) +$mainColor: $base00; +$headingColor: $base01; +$headingTextShadow: none; +$backgroundColor: $base3; +$linkColor: $blue; +$linkColorHover: lighten( $linkColor, 20% ); +$selectionBackgroundColor: $magenta; + +// Background generator +// @mixin bodyBackground() { +// @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) ); +// } + + + +// Theme template ------------------------------ +@import "../template/theme"; +// --------------------------------------------- diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/source/white.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/source/white.scss new file mode 100755 index 0000000..7f06ffd --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/source/white.scss @@ -0,0 +1,49 @@ +/** + * White theme for reveal.js. This is the opposite of the 'black' theme. + * + * By Hakim El Hattab, http://hakim.se + */ + + +// Default mixins and settings ----------------- +@import "../template/mixins"; +@import "../template/settings"; +// --------------------------------------------- + + +// Include theme-specific fonts +@import url(../../lib/font/source-sans-pro/source-sans-pro.css); + + +// Override theme settings (see ../template/settings.scss) +$backgroundColor: #fff; + +$mainColor: #222; +$headingColor: #222; + +$mainFontSize: 42px; +$mainFont: 'Source Sans Pro', Helvetica, sans-serif; +$headingFont: 'Source Sans Pro', Helvetica, sans-serif; +$headingTextShadow: none; +$headingLetterSpacing: normal; +$headingTextTransform: uppercase; +$headingFontWeight: 600; +$linkColor: #2a76dd; +$linkColorHover: lighten( $linkColor, 15% ); +$selectionBackgroundColor: lighten( $linkColor, 25% ); + +$heading1Size: 2.5em; +$heading2Size: 1.6em; +$heading3Size: 1.3em; +$heading4Size: 1.0em; + +section.has-dark-background { + &, h1, h2, h3, h4, h5, h6 { + color: #fff; + } +} + + +// Theme template ------------------------------ +@import "../template/theme"; +// --------------------------------------------- \ No newline at end of file diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/template/mixins.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/template/mixins.scss new file mode 100755 index 0000000..e0c5606 --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/template/mixins.scss @@ -0,0 +1,29 @@ +@mixin vertical-gradient( $top, $bottom ) { + background: $top; + background: -moz-linear-gradient( top, $top 0%, $bottom 100% ); + background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) ); + background: -webkit-linear-gradient( top, $top 0%, $bottom 100% ); + background: -o-linear-gradient( top, $top 0%, $bottom 100% ); + background: -ms-linear-gradient( top, $top 0%, $bottom 100% ); + background: linear-gradient( top, $top 0%, $bottom 100% ); +} + +@mixin horizontal-gradient( $top, $bottom ) { + background: $top; + background: -moz-linear-gradient( left, $top 0%, $bottom 100% ); + background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) ); + background: -webkit-linear-gradient( left, $top 0%, $bottom 100% ); + background: -o-linear-gradient( left, $top 0%, $bottom 100% ); + background: -ms-linear-gradient( left, $top 0%, $bottom 100% ); + background: linear-gradient( left, $top 0%, $bottom 100% ); +} + +@mixin radial-gradient( $outer, $inner, $type: circle ) { + background: $outer; + background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); + background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) ); + background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); + background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); + background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); + background: radial-gradient( center, $type cover, $inner 0%, $outer 100% ); +} \ No newline at end of file diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/template/settings.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/template/settings.scss new file mode 100755 index 0000000..5a917f8 --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/template/settings.scss @@ -0,0 +1,45 @@ +// Base settings for all themes that can optionally be +// overridden by the super-theme + +// Background of the presentation +$backgroundColor: #2b2b2b; + +// Primary/body text +$mainFont: 'Lato', sans-serif; +$mainFontSize: 40px; +$mainColor: #eee; + +// Vertical spacing between blocks of text +$blockMargin: 20px; + +// Headings +$headingMargin: 0 0 $blockMargin 0; +$headingFont: 'League Gothic', Impact, sans-serif; +$headingColor: #eee; +$headingLineHeight: 1.2; +$headingLetterSpacing: normal; +$headingTextTransform: uppercase; +$headingTextShadow: none; +$headingFontWeight: normal; +$heading1TextShadow: $headingTextShadow; + +$heading1Size: 3.77em; +$heading2Size: 2.11em; +$heading3Size: 1.55em; +$heading4Size: 1.00em; + +$codeFont: monospace; + +// Links and actions +$linkColor: #13DAEC; +$linkColorHover: lighten( $linkColor, 20% ); + +// Text selection +$selectionBackgroundColor: #FF5E99; +$selectionColor: #fff; + +// Generates the presentation background, can be overridden +// to return a background image or gradient +@mixin bodyBackground() { + background: $backgroundColor; +} diff --git a/themes/reveal-hugo/assets/reveal-js/css/theme/template/theme.scss b/themes/reveal-hugo/assets/reveal-js/css/theme/template/theme.scss new file mode 100755 index 0000000..9ccfaf5 --- /dev/null +++ b/themes/reveal-hugo/assets/reveal-js/css/theme/template/theme.scss @@ -0,0 +1,325 @@ +// Base theme template for reveal.js + +/********************************************* + * GLOBAL STYLES + *********************************************/ + +body { + @include bodyBackground(); + background-color: $backgroundColor; +} + +.reveal { + font-family: $mainFont; + font-size: $mainFontSize; + font-weight: normal; + color: $mainColor; +} + +::selection { + color: $selectionColor; + background: $selectionBackgroundColor; + text-shadow: none; +} + +::-moz-selection { + color: $selectionColor; + background: $selectionBackgroundColor; + text-shadow: none; +} + +.reveal .slides section, +.reveal .slides section>section { + line-height: 1.3; + font-weight: inherit; +} + +/********************************************* + * HEADERS + *********************************************/ + +.reveal h1, +.reveal h2, +.reveal h3, +.reveal h4, +.reveal h5, +.reveal h6 { + margin: $headingMargin; + color: $headingColor; + + font-family: $headingFont; + font-weight: $headingFontWeight; + line-height: $headingLineHeight; + letter-spacing: $headingLetterSpacing; + + text-transform: $headingTextTransform; + text-shadow: $headingTextShadow; + + word-wrap: break-word; +} + +.reveal h1 {font-size: $heading1Size; } +.reveal h2 {font-size: $heading2Size; } +.reveal h3 {font-size: $heading3Size; } +.reveal h4 {font-size: $heading4Size; } + +.reveal h1 { + text-shadow: $heading1TextShadow; +} + + +/********************************************* + * OTHER + *********************************************/ + +.reveal p { + margin: $blockMargin 0; + line-height: 1.3; +} + +/* Ensure certain elements are never larger than the slide itself */ +.reveal img, +.reveal video, +.reveal iframe { + max-width: 95%; + max-height: 95%; +} +.reveal strong, +.reveal b { + font-weight: bold; +} + +.reveal em { + font-style: italic; +} + +.reveal ol, +.reveal dl, +.reveal ul { + display: inline-block; + + text-align: left; + margin: 0 0 0 1em; +} + +.reveal ol { + list-style-type: decimal; +} + +.reveal ul { + list-style-type: disc; +} + +.reveal ul ul { + list-style-type: square; +} + +.reveal ul ul ul { + list-style-type: circle; +} + +.reveal ul ul, +.reveal ul ol, +.reveal ol ol, +.reveal ol ul { + display: block; + margin-left: 40px; +} + +.reveal dt { + font-weight: bold; +} + +.reveal dd { + margin-left: 40px; +} + +.reveal blockquote { + display: block; + position: relative; + width: 70%; + margin: $blockMargin auto; + padding: 5px; + + font-style: italic; + background: rgba(255, 255, 255, 0.05); + box-shadow: 0px 0px 2px rgba(0,0,0,0.2); +} + .reveal blockquote p:first-child, + .reveal blockquote p:last-child { + display: inline-block; + } + +.reveal q { + font-style: italic; +} + +.reveal pre { + display: block; + position: relative; + width: 90%; + margin: $blockMargin auto; + + text-align: left; + font-size: 0.55em; + font-family: $codeFont; + line-height: 1.2em; + + word-wrap: break-word; + + box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); +} + +.reveal code { + font-family: $codeFont; + text-transform: none; +} + +.reveal pre code { + display: block; + padding: 5px; + overflow: auto; + max-height: 400px; + word-wrap: normal; +} + +.reveal table { + margin: auto; + border-collapse: collapse; + border-spacing: 0; +} + +.reveal table th { + font-weight: bold; +} + +.reveal table th, +.reveal table td { + text-align: left; + padding: 0.2em 0.5em 0.2em 0.5em; + border-bottom: 1px solid; +} + +.reveal table th[align="center"], +.reveal table td[align="center"] { + text-align: center; +} + +.reveal table th[align="right"], +.reveal table td[align="right"] { + text-align: right; +} + +.reveal table tbody tr:last-child th, +.reveal table tbody tr:last-child td { + border-bottom: none; +} + +.reveal sup { + vertical-align: super; + font-size: smaller; +} +.reveal sub { + vertical-align: sub; + font-size: smaller; +} + +.reveal small { + display: inline-block; + font-size: 0.6em; + line-height: 1.2em; + vertical-align: top; +} + +.reveal small * { + vertical-align: top; +} + + +/********************************************* + * LINKS + *********************************************/ + +.reveal a { + color: $linkColor; + text-decoration: none; + + -webkit-transition: color .15s ease; + -moz-transition: color .15s ease; + transition: color .15s ease; +} + .reveal a:hover { + color: $linkColorHover; + + text-shadow: none; + border: none; + } + +.reveal .roll span:after { + color: #fff; + background: darken( $linkColor, 15% ); +} + + +/********************************************* + * IMAGES + *********************************************/ + +.reveal section img { + margin: 15px 0px; + background: rgba(255,255,255,0.12); + border: 4px solid $mainColor; + + box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); +} + + .reveal section img.plain { + border: 0; + box-shadow: none; + } + + .reveal a img { + -webkit-transition: all .15s linear; + -moz-transition: all .15s linear; + transition: all .15s linear; + } + + .reveal a:hover img { + background: rgba(255,255,255,0.2); + border-color: $linkColor; + + box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); + } + + +/********************************************* + * NAVIGATION CONTROLS + *********************************************/ + +.reveal .controls { + color: $linkColor; +} + + +/********************************************* + * PROGRESS BAR + *********************************************/ + +.reveal .progress { + background: rgba(0,0,0,0.2); + color: $linkColor; +} + .reveal .progress span { + -webkit-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); + -moz-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); + transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); + } + +/********************************************* + * PRINT BACKGROUND + *********************************************/ + @media print { + .backgrounds { + background-color: $backgroundColor; + } +} diff --git a/themes/reveal-hugo/exampleSite/.forestry/settings.yml b/themes/reveal-hugo/exampleSite/.forestry/settings.yml new file mode 100644 index 0000000..8130263 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/.forestry/settings.yml @@ -0,0 +1,12 @@ +--- +new_page_extension: md +auto_deploy: false +admin_path: +webhook_url: +sections: +upload_dir: "./exampleSite/static/uploads" +public_path: "/uploads" +front_matter_path: '' +use_front_matter_path: false +file_template: ":filename:" +version: 0.38.1 diff --git a/themes/reveal-hugo/exampleSite/assets/custom-theme.scss b/themes/reveal-hugo/exampleSite/assets/custom-theme.scss new file mode 100644 index 0000000..4f8462a --- /dev/null +++ b/themes/reveal-hugo/exampleSite/assets/custom-theme.scss @@ -0,0 +1,35 @@ +@import "reveal-js/css/theme/template/mixins"; +@import "reveal-js/css/theme/template/settings"; + +$backgroundColor: rgb(3, 129, 45); + +$mainColor: #fff; +$headingColor: #fff; + +$mainFontSize: 38px; +$mainFont: 'Source Sans Pro', Helvetica, sans-serif; +$headingFont: 'Source Sans Pro', Helvetica, sans-serif; +$headingTextShadow: none; +$headingLetterSpacing: normal; +$headingTextTransform: uppercase; +$headingFontWeight: 600; +$linkColor: #42affa; +$linkColorHover: lighten( $linkColor, 15% ); +$selectionBackgroundColor: lighten( $linkColor, 25% ); + +$heading1Size: 2.5em; +$heading2Size: 1.6em; +$heading3Size: 1.3em; +$heading4Size: 1.0em; + +@import "reveal-js/css/theme/template/theme"; + +section.has-light-background { + &, h1, h2, h3, h4, h5, h6 { + color: #222; + } +} + +.reveal pre { + margin: 50px auto; +} diff --git a/themes/reveal-hugo/exampleSite/config.toml b/themes/reveal-hugo/exampleSite/config.toml new file mode 100644 index 0000000..b201cf0 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/config.toml @@ -0,0 +1,37 @@ +baseURL = "https://example.com/" +languageCode = "en-us" +title = "A Hugo theme for creating Reveal.js presentations" +disableKinds = ["sitemap", "RSS"] +theme = "." +themesDir = "../" + +# uncomment for browsing at file:/// +# relativeURLs = true +# uglyURLs = true + +[author] +name = "Josh Dzielak" + +# currently only the unsafe mode for goldmark is supported +[markup.goldmark.renderer] +unsafe = true + +# choose between Hugo compile-time or Highlight.js +# syntax highlighting for code inside of code fences +[markup.highlight] +codeFences = false # use highlight.js +# codeFences = true # use hugo highlighting at compile time +style = "tango" # set a style for hugo highlighting + +[outputFormats.Reveal] +baseName = "index" +mediaType = "text/html" +isHTML = true + +[params.reveal_hugo] +history = true + +# used in content/template-example +[params.reveal_hugo.templates.grey] +background = "#424242" +transition = "convex" \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/content/_index.md b/themes/reveal-hugo/exampleSite/content/_index.md new file mode 100644 index 0000000..fba3be6 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/_index.md @@ -0,0 +1,22 @@ ++++ +title = "reveal-hugo" +description = "A Hugo theme for creating Reveal.js presentations" +outputs = ["Reveal"] +[reveal_hugo] +custom_theme = "reveal-hugo/themes/robot-lung.css" +margin = 0.2 +highlight_theme = "color-brewer" +transition = "slide" +transition_speed = "fast" +[reveal_hugo.templates.hotpink] +class = "hotpink" +background = "#FF4081" ++++ + +# 📽️ + +# reveal-hugo + +A Hugo theme for creating Reveal.js presentations. + +~ made by [@dzello](https://dzello.com/) ~ \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/content/bundle-example/continued.md b/themes/reveal-hugo/exampleSite/content/bundle-example/continued.md new file mode 100644 index 0000000..b2a4381 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/bundle-example/continued.md @@ -0,0 +1,16 @@ ++++ ++++ + +If more markdown files are present in the bundle, their contents will be added to the presentation. + +--- + +Specify `weight` in the frontmatter if it's necessary to order them. + +--- + +If you don't want them to be included, specify `layout = "list"` in the front matter instead of `layout = "bundle"`. + +--- + +## THE END \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/content/bundle-example/index.md b/themes/reveal-hugo/exampleSite/content/bundle-example/index.md new file mode 100644 index 0000000..087bffe --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/bundle-example/index.md @@ -0,0 +1,30 @@ ++++ +title = "Bundle example presentation" +outputs = ["Reveal"] +layout = "bundle" +[reveal_hugo] +theme = "night" +margin = 0.2 ++++ + +# Page Bundles + +--- + +[Hugo page bundles](https://gohugo.io/content-management/page-bundles/) are a useful way to organize content. + +--- + +To create a reveal-hugo presentation from the `index.md` file of a leaf page bundle, you need to specify the layout manually. + +```toml +layout = "bundle" +``` + +--- + +Why? By default, reveal-hugo doesn't create pages for single template types (foo.md), only for list template types (_index.md). + +--- + +This technique can also be used to output an HTML file for any section of a presentation, should you need to. diff --git a/themes/reveal-hugo/exampleSite/content/custom-theme-example/_index.md b/themes/reveal-hugo/exampleSite/content/custom-theme-example/_index.md new file mode 100644 index 0000000..dd09946 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/custom-theme-example/_index.md @@ -0,0 +1,74 @@ ++++ +title = "Custom theme example presentation" +outputs = ["Reveal"] +[reveal_hugo] +custom_theme = "custom-theme.scss" +custom_theme_compile = true ++++ + +## 🖌 ️ + +## Custom Themes + +*with Hugo Pipes* + +--- + +This presentation uses a custom Reveal.js theme written in SCSS that is compiled by Hugo, using [Hugo pipes](https://gohugo.io/hugo-pipes/). + +--- + +Hugo pipes compiles the source code of the theme, located in `assets/custom-theme.scss`, into CSS. + +--- + +## 😄 + +No separate build process is required, which means you can iterate on your theme and your content at the same time. + +--- + +To set a custom theme and use Hugo to compile it: + +```toml +[reveal_hugo] +custom_theme = "custom-theme.scss" +custom_theme_compile = true +``` + +`custom-theme.scss` must live in the `assets` folder. + +--- + +To pass compilation options, use the `custom_theme_options` param: + +```toml +[reveal_hugo.custom_theme_options] +targetPath = "css/custom-theme.css" +enableSourceMap = true +``` + +See all the [available options](https://gohugo.io/hugo-pipes/scss-sass/#options). + +--- + +Note: to use a custom theme that doesn't need compilation, put it in the `static` directory and do not set the `custom_theme_compile` parameter. It will be served to the browser directly. + +--- + +Write a custom Reveal.js theme in four steps: + +```text +1. Import `mixins` and `settings` from the templates directory +2. Override variables and functions for colors, fonts and sizes +3. Import `theme` from the templates directory +4. Add any additional selectors to override the built CSS +``` + +--- + +See the [Reveal.js theme docs](https://github.com/hakimel/reveal.js/blob/master/css/theme/README.md) to learn what overrides are possible. + +--- + +See `assets/custom-theme.scss` or any file in `assets/reveal-js/css/theme/source` for an example. diff --git a/themes/reveal-hugo/exampleSite/content/extending-layout-example/_index.md b/themes/reveal-hugo/exampleSite/content/extending-layout-example/_index.md new file mode 100644 index 0000000..108d840 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/extending-layout-example/_index.md @@ -0,0 +1,53 @@ ++++ +title = "Extend layout with configuration" +outputs = ["Reveal"] +[reveal_hugo] +theme = "night" +margin = 0.2 +custom_css = "css/custom.css" +custom_js = "js/custom.js" ++++ + +### Extending an existing layout + +If you are using an existing theme and you want to a specific CSS class or add a dynamic function using javascript. It is possible to extend existing layout. + +--- + +### Extending CSS + +You can use `partials` or you can specify `custom_css` in your configuration : + +```toml +[reveal_hugo] +custom_css = "css/custom.css" +``` + +The `custom.css` can be present in `static/css/custom.css` + + +--- + +### Extending with javascript + +Same as CSS you can extend your presentation with javascript using `partials` or with `custom_js` in your configuration: + +```toml +[reveal_hugo] +custom_js = "js/custom.js" +``` + + +The `custom.js` can be present in `static/js/custom.js` + + +--- + +{{< slide class="custom" id="customjs" >}} +## Extend layout example +Here the slide has an additional css class `custom` using `slide` *shortcode*. This class is hosted in a custom CSS. + +If you click on this text background-color will using a custom javascript file. + + + diff --git a/themes/reveal-hugo/exampleSite/content/highlightjs-linenumbers-example/_index.md b/themes/reveal-hugo/exampleSite/content/highlightjs-linenumbers-example/_index.md new file mode 100644 index 0000000..a285336 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/highlightjs-linenumbers-example/_index.md @@ -0,0 +1,160 @@ ++++ +title = "Reveal.js 3.9.0 highlighting example" +outputs = ["Reveal"] + +[reveal_hugo] +theme = "white" +highlight_theme = "vs" ++++ + +## Multiline highlighting with Highlight.js + +--- + +This presentation shows the use of the [new highlighting features](https://github.com/hakimel/reveal.js/blob/master/README.md#step-by-step-highlights) which were introduced with Reveal.js [v3.9.0](https://github.com/hakimel/reveal.js/releases/tag/3.9.0). + +--- + +## Prerequisite + +Disable `codeFences` in to your `config.toml` to prevent Hugo's built-in highlighting for code inside of `---` fences. + +{{< highlight toml "style=github" >}} +[markup.highlight] +codeFences = false +{{< /highlight >}} + +--- + +## Theme + +Specify a theme for Highlight.js in `config.toml` + +{{< highlight toml "style=github" >}} +[params.reveal_hugo] +highlight_theme = "github" +{{< /highlight >}} + +--- + +...or in the `_index.md` front matter + +{{< highlight toml "style=github" >}} +[reveal_hugo] +highlight_theme = "github" +{{< /highlight >}} + +--- + +## Usage + +The line highlighting is configured by adding `{}` immediately after the language selection of the markdown code block. + +{{< highlight md >}} +```foo{} + +``` +{{< /highlight >}} + +--- + +## Just line numbers + +`{}` + +{{< highlight md >}} +```go{} +package main +import "fmt" +func main() { + fmt.Println("Hello world!") +} +``` +{{< /highlight >}} + +```go{} +package main +import "fmt" +func main() { + fmt.Println("Hello world!") +} +``` + +--- + +## Highlight specific lines + +`{}` + +{{< highlight md >}} +```go{1,3-5} +package main +import "fmt" +func main() { + fmt.Println("Hello world!") +} +``` +{{< /highlight >}} +```go{1,3-5} +package main +import "fmt" +func main() { + fmt.Println("Hello world!") +} +``` + +--- + +## Multi step highlight + +`{}` + +{{< highlight md >}} +```go{1|2|3-5} +package main +import "fmt" +func main() { + fmt.Println("Hello world!") +} +``` +{{< /highlight >}} + +```go{1|2|3-5} +package main +import "fmt" +func main() { + fmt.Println("Hello world!") +} +``` +--- + +## Hiding the line numbers + +There is no Reveal.js parameter to use line highlighting *without* line numbers. +However it can be achieved by adding the some [custom CSS](https://github.com/dzello/reveal-hugo#adding-html-to-the-layout). + +{{< highlight html "style=github" >}} + +{{< /highlight >}} + +--- + +💡 Put the custom CSS in either of these partials: + +```text +# for all presentations +layouts/partials/reveal-hugo/body.html +``` + +```text +# for one presentation +layouts/partials/{presentation-name}/reveal-hugo/body.html +``` + +--- + +Thanks! \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/content/home/configuration.md b/themes/reveal-hugo/exampleSite/content/home/configuration.md new file mode 100644 index 0000000..1d13e9b --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/home/configuration.md @@ -0,0 +1,170 @@ ++++ +weight = 21 ++++ + +# Configuration + +Place configuration values in `config.toml` or a presentation's front matter (`_index.md`). + +--- + +## Reveal.js themes + +Themes control the look and feel of your presentation. Set the `theme` param to any [valid Reveal.js theme](https://github.com/hakimel/reveal.js/#theming). + +```toml +[params.reveal_hugo] +theme = "moon" +``` + +--- + +## Use a custom theme + +To use a custom Reveal.js theme, place the CSS file in the `static` directory and set the `custom_theme` param. + +```toml +[params.reveal_hugo] +custom_theme = "reveal-hugo/themes/robot-lung.css" +``` + +--- + +### Use a custom theme (advanced) + +To use Hugo pipes to build a custom Reveal.js theme, place the source file (SCSS / PostCSS) in the `assets` directory and set the `custom_theme_compile` param. + +```toml +[params.reveal_hugo] +custom_theme = "reveal-hugo/themes/custom-theme.scss" +custom_theme_compile = true +``` + + + +💡 See the [custom theme example presentation](/custom-theme-example/) for more details. + + + +--- + +## Bundled themes + +reveal-hugo comes with 2 extra Reveal.js themes: + +- [robot-lung](https://github.com/dzello/revealjs-themes#robot-lung) (this one) +- [sunblind](https://github.com/dzello/revealjs-themes#sunblind) + +
+ + + +They live in the `static/reveal-hugo/themes` folder and also [on Github](https://github.com/dzello/revealjs-themes). + + + +--- + +## Reveal.js params + +Set **snakecase** versions of Reveal.js params, which will be camelized and passed to `Reveal.initialize`. + +```toml +[params.reveal_hugo] +history = true +slide_number = true +transition = 'zoom' +transition_speed = 'fast' +``` + +[Full list of params](https://github.com/hakimel/reveal.js/#configuration) + +--- + +## highlight.js themes + +To change the syntax highlighting theme, set the `highlight_theme` +to a valid [highlight.js theme name](https://highlightjs.org/static/demo/). + +```toml +[params.reveal_hugo] +highlight_theme = "zenburn" +``` + +--- + +## Extending the layout + +Use partials to add HTML to the page for one or all presentations at a time. + + +💡 This is the recommended way to add script and style tags to customize your presentations. + + +--- + +Here is where to put partials for different presentations and places in the DOM. +

+ +| Presentation | Before </head> | Before </body> | +|--------------|---------------------------------|---------------------------------| +| All | reveal-hugo/head.html | reveal-hugo/body.html | +| Root | home/reveal-hugo/head.html | home/reveal-hugo/body.html | +| Section | {section}/reveal-hugo/head.html | {section}/reveal-hugo/body.html | + +  + + + +💡 You can also create an `end.html` to put content before the end of the `.reveal` div tag. + + + +--- + +## Custom CSS Example + +In `home/reveal-hugo/head.html`: + +```html + +``` + +--- + +## Custom JS Example + +In `home/reveal-hugo/body.html`: + +```html + +``` + +--- + +### Extending the layout +#### (alternative) + +You can declare a custom CSS or javascript in your configuration. + +```toml +[reveal_hugo] +custom_css = "css/custom.css" +custom_js = "js/custom.js" +``` + + + +These files can be located in `static/css`, `static/js` folder + +💡 See the [extending layout example](/extending-layout-example/#) for more details. + + diff --git a/themes/reveal-hugo/exampleSite/content/home/features.md b/themes/reveal-hugo/exampleSite/content/home/features.md new file mode 100644 index 0000000..5d70186 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/home/features.md @@ -0,0 +1,25 @@ ++++ +weight = 10 ++++ + +## What's included? + +- All Reveal.js HTML, CSS and JS (v3.9.2) +- All out-of-the-box Reveal.js themes +- Two custom Reveal.js themes (including this one) + +
+
+ +[see the code on github](https://github.com/dzello/reveal-hugo) + +--- + +## Features + +- Write slides in Markdown in one or more files +- Shortcodes for fragments, sections, slides & more +- All Reveal.js parameters can be customized +- Any Hugo section can be output as a presentation +- Supports offline development or using a CDN + diff --git a/themes/reveal-hugo/exampleSite/content/home/resources.md b/themes/reveal-hugo/exampleSite/content/home/resources.md new file mode 100644 index 0000000..e19cbc1 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/home/resources.md @@ -0,0 +1,43 @@ ++++ +weight = 42 ++++ + +# Resources + +--- + +## Code and docs + +- [reveal-hugo Github README](https://github.com/dzello/reveal-hugo) +- [Content for this presentation](https://github.com/dzello/reveal-hugo/tree/master/exampleSite) + +--- + +## External resources + +- [Reveal.js](https://revealjs.com/) +- [Hugo docs](https://gohugo.io/) +- [Hugo output format docs](https://gohugo.io/templates/output-formats/) + +--- + +## Designed to... + +- Deploy to [Netlify](https://netlify.com/) +- Edit with [Forestry](https://forestry.io/) + +--- + +# 🙏 + +Contribute by opening issues and pull requests. + +--- + +# Thanks! + +--- + +# ↩️ + +#### [Start over](#) diff --git a/themes/reveal-hugo/exampleSite/content/home/shortcodes/fragment.md b/themes/reveal-hugo/exampleSite/content/home/shortcodes/fragment.md new file mode 100644 index 0000000..e53592c --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/home/shortcodes/fragment.md @@ -0,0 +1,41 @@ ++++ +weight = 30 ++++ + +## Fragment + +The `fragment` shortcode makes content appear incrementally. + +``` +{{%/* fragment */%}} One {{%/* /fragment */%}} +{{%/* fragment */%}} Two {{%/* /fragment */%}} +{{%/* fragment */%}} Three {{%/* /fragment */%}} +``` + +{{% fragment %}} One {{% /fragment %}} +{{% fragment %}} Two {{% /fragment %}} +{{% fragment %}} Three {{% /fragment %}} + +--- + +## Frag + +The `frag` shortcode is more terse than `fragment`. It accepts a `c` attribute. + +``` +{{}} +{{}} +{{}} +``` + +{{< frag c="One" >}} +{{< frag c="Two" >}} +{{< frag c="Three" >}} + +--- + +Both `fragment` and `frag` accept two additional parameters: + +- `class`: sets the class of the wrapping `span` element +- `index`: controls the order in which sections will appear + diff --git a/themes/reveal-hugo/exampleSite/content/home/shortcodes/introduction.md b/themes/reveal-hugo/exampleSite/content/home/shortcodes/introduction.md new file mode 100644 index 0000000..2978a52 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/home/shortcodes/introduction.md @@ -0,0 +1,11 @@ ++++ +weight = 29 ++++ + +# Shortcodes + +--- + +Hugo's shortcodes are similar to functions or templates that extend what you can do with Markdown. + +[Shortcode documentation](https://gohugo.io/content-management/shortcodes/) \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/content/home/shortcodes/markdown.md b/themes/reveal-hugo/exampleSite/content/home/shortcodes/markdown.md new file mode 100644 index 0000000..0c49b4e --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/home/shortcodes/markdown.md @@ -0,0 +1,38 @@ ++++ +weight = 36 ++++ + +{{< markdown >}} + +## Markdown + +Reveal.js has its own [markdown processor](https://github.com/hakimel/reveal.js#markdown). To use that instead of Hugo, surround a slide with the markdown shortcode. + +```markdown +{{}} + +# Hello world! + +{{}} +``` + +
+ +💡 Make sure to use the `{{}}` shortcode syntax to avoid rendering by Hugo. + + +--- + + + +Reveal.js markdown uses HTML comments to change slide properties, like background color. + +```markdown +{{}} + +# I'm a colorful slide +{{}} +``` + +{{< /markdown >}} + diff --git a/themes/reveal-hugo/exampleSite/content/home/shortcodes/other.md b/themes/reveal-hugo/exampleSite/content/home/shortcodes/other.md new file mode 100644 index 0000000..fda5276 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/home/shortcodes/other.md @@ -0,0 +1,49 @@ ++++ +weight = 38 ++++ + +## Notes + +Add speaker notes (with markdown) to your presentation with the `note` shortcode. Type 's' to see this slide's speaker notes. + +```markdown +--- + +{{%/* note */%}} +- You found the **speaker notes**! +{{%/* /note */%}} + +--- +``` + +{{% note %}} +- You found the **speaker notes**! +{{% /note %}} + +--- + +{{< slide notes="You found the notes!" >}} + +## Notes + +You can also add notes with the `slide` shortcode and `notes` attribute: + +```markdown +--- + +{{%/* slide notes="You found the notes!" */%}} + +--- +``` + +--- + +
+

Write slides in HTML

+

Use a section tag with a data-noprocess attribute to avoid any processing by reveal-hugo.

+
+<section data-noprocess>
+  <h1>Hello world!</h1>
+</section>
+ 💡 This is useful if you can't get Markdown to output exactly what you want. +
diff --git a/themes/reveal-hugo/exampleSite/content/home/shortcodes/section.md b/themes/reveal-hugo/exampleSite/content/home/shortcodes/section.md new file mode 100644 index 0000000..797ba21 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/home/shortcodes/section.md @@ -0,0 +1,44 @@ ++++ +weight = 33 ++++ + +{{% section %}} + +## Section + +The `section` shortcode groups slides into a **vertical display**. + +
+ +use the down arrow or swipe down to continue + +
+🔽 + +--- + +Put the shortcode around the slides you want to group together. + +```markdown +{{%/* section */%}} + +## Section slide 1 + +--- + +## Section slide 2 + +{{%/* /section */%}} +``` + +Keep going down. + +--- + +## That's it! + +Use the right arrow or swipe right to continue. + +{{% /section %}} + + diff --git a/themes/reveal-hugo/exampleSite/content/home/shortcodes/slide.md b/themes/reveal-hugo/exampleSite/content/home/shortcodes/slide.md new file mode 100644 index 0000000..3ce5b8c --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/home/shortcodes/slide.md @@ -0,0 +1,250 @@ ++++ +weight = 34 ++++ + +## Slide + +Use this shortcode when you need to customize slide attributes like id, class, background color and transition. + +--- + +{{< slide class="hello" >}} + +## Slide + +Add the shortcode above the slide's content, below the `---`. + +```markdown +--- + +{{}} + +## Hello, world! + +--- +``` + +--- + +{{< slide transition="zoom" transition-speed="fast" >}} + +## Custom slide 1 + +Did you notice? This slide has a fast zoom transition. + +```markdown +--- + +{{}} + +## Custom slide 1 + +--- +``` + +--- + +{{< slide background-color="#FF4081" >}} + +## Custom slide 2 + +This slide has a different background color. + +```markdown +--- + +{{}} + +## Custom slide 2 + +--- +``` + +--- + +{{< slide background-image="/images/alex-litvin-790876-unsplash.jpg" background-color="#000000" >}} + +## Custom slide 3 + +This slide has a background image. + +```markdown +--- + +{{}} + +--- +``` + +(credit Alex Litvin) + +--- + +{{< slide id="custom-slide" >}} + +💡 Tip: Setting a slide's `id` attribute makes it easy to link to from other parts of the presentation. +

+ +```markdown +--- + +{{}} + +## Custom slide + +--- +``` + +--- + +```markdown +[Try the link](#custom-slide) +``` + +
+ +[Try the link](#custom-slide) + +--- + +Slide attribute possibilities from the [Reveal.js docs](https://github.com/hakimel/reveal.js): + +- `autoslide` +- `state` +- `background` +- `background-color` +- `background-image` +- `background-size` +- `background-position` +- `background-repeat` + +--- + +- `background-video` +- `background-video-loop` +- `background-video-muted` +- `background-interactive` +- `background-iframe` +- `background-transition` +- `transition` (can have different in and out transitions) +- `transition-speed` +- `notes` (can also use the note shortcode) +- `timing` + +--- + +{{% section %}} + +## Slide templates + +Store sets of common slide attributes in front matter variables and apply them to slides with the template attribute. + +
+ +navigate down to learn more + +
+🔽 + +--- + +Create templates in config.toml, _index.md or the current page's front matter. Put them under the **templates** key with a meaningful name: + +```toml +[reveal_hugo.templates.hotpink] +class = "hotpink" +background = "#FF4081" +``` + +--- + +{{< slide template="hotpink" >}} + +Apply the template using the **template** attribute of the slide shortcode: + +```markdown +{{}} + +# I'm a hot pink slide! +``` + +--- + +If a template exists in multiple configurations, it's properties will be merged. If a property is declared multiple times, the order of precedence is: + +- page +- section (_index.md) +- site (config.toml) + +{{% /section %}} + +--- + +{{% section %}} + +{{< slide content="home.reusable" >}} + +--- + +{{< slide content="common.nested.reusable" >}} + +{{% /section %}} + +--- + +{{% section %}} + +## Slide-specific CSS + +Add more variety to your presentation by applying slide-specific CSS. + +
+ +navigate down to learn more + +
+🔽 + +--- + +First, use the `slide` shortcode to give the slide a class: + +```markdown +--- + +{{}} + +# 📈 + +# 📊 + +--- +``` + +--- + +Next, use a layout extension partial like `reveal-hugo/head.html` to add CSS selectors: + +```html + +``` + +--- + +{{< slide class="side-by-side" >}} + +# 📈 + +# 📊 + +{{% /section %}} diff --git a/themes/reveal-hugo/exampleSite/content/home/usage.md b/themes/reveal-hugo/exampleSite/content/home/usage.md new file mode 100644 index 0000000..a9ebe9d --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/home/usage.md @@ -0,0 +1,109 @@ ++++ +weight = 20 ++++ + +# Usage + +--- + +## Prerequisite + +First, add this to your `config.toml`: + +```toml +[outputFormats.Reveal] +baseName = "index" +mediaType = "text/html" +isHTML = true +``` + +--- + +### Presentation at site root + +Create `content/_index.md`: + +```markdown ++++ +outputs = ["Reveal"] ++++ + +# Slide 1 + +Hello world! +``` + +--- + +### Add slides + +Separate them by `---` surrounded by blank lines: + +``` +# Slide 1 + +Hello world! + +--- + +# Slide 2 + +Hello program! +``` + +--- + +### Add slides with other files + +Add slides to `content/home/*.md` + +```markdown ++++ +weight = 10 ++++ + +# Slide 3 + +--- + +# Slide 4 +``` + +💡 Tip: Use `weight` to specify the order that files should be considered. + +--- + +### Presentation at '/{section}/' + +Add slides to `content/{section}/_index.md`: + +```markdown ++++ +outputs = ["Reveal"] ++++ + +# Slide 1 + +--- + +# Slide 2 +``` + +--- + +Add slides from other files in `content/{section}/*.md` + +```markdown ++++ +weight = 10 ++++ + +# Slide 3 + +--- + +# Slide 4 +``` + +💡 Tip: Use `weight` to specify the order that files should be considered. + diff --git a/themes/reveal-hugo/exampleSite/content/hugo-hl-example/_index.md b/themes/reveal-hugo/exampleSite/content/hugo-hl-example/_index.md new file mode 100644 index 0000000..279254c --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/hugo-hl-example/_index.md @@ -0,0 +1,113 @@ ++++ +title = "Hugo highlighting example" +outputs = ["Reveal"] + +[reveal_hugo] +theme = "simple" ++++ + +## Hugo Highlighter Presentation + +This is an example of a presentation using Hugo's compile-time syntax highlighter. + +--- + +Reveal.js uses Javascript for syntax highlighting (via Highlight.js). This might slow the presentation down if many slides contain code. + +--- + +Hugo has a built-in [compile-time highlighter](https://gohugo.io/content-management/syntax-highlighting/), and it's lightning fast too! + +--- + +You can enable it using the `highlight` shortcode. + +{{< highlight go >}} +{{}} + +package main + +import "fmt" + +func main() { + fmt.Println("Hello world!") +} + +{{}} +{{< /highlight >}} + +--- + +Several options are supported, check [Hugo's documentation](https://gohugo.io/content-management/syntax-highlighting/). + +{{< highlight go "style=github,linenos=inline,hl_lines=8" >}} +{{}} + +package main + +import "fmt" + +func main() { + fmt.Println("Hello world!") +} + +{{}} +{{< / highlight >}} + +--- + +You can also use Hugo's highlighter in markdown code fences, +by putting this in `config.toml`: + +{{< highlight toml "style=github" >}} + +# use Hugo's hl in markdown (with or without a language tag) +[markup.highlight] +codeFences = true +style = "github" + +{{< /highlight >}} + +(This can only be enabled globally for all presentations.) + +--- + +- Highlight.js is automatically disabled in code blocks highlighted by Hugo. +- The two highlighters can be even mixed. + +{{< highlight go >}} +package main + +import "fmt" + +func main() { + fmt.Println("Hello world!") +} +{{< / highlight >}} + +```go +package main + +import "fmt" + +func main() { + fmt.Println("Hello world!") +} +``` + +--- + +If you don't need highlight.js at all, you can prevent it from loading. + +{{< highlight toml "style=github" >}} + +# This works both in config.toml and a presentation's front +# matter. Default plugins include highlight.js, so disable them +# and load those that we want manually. + +[params.reveal_hugo] +load_default_plugins = false +plugins = [ + "reveal-js/plugin/zoom-js/zoom.js", + "reveal-js/plugin/notes/notes.js", +] diff --git a/themes/reveal-hugo/exampleSite/content/logo-example/_index.md b/themes/reveal-hugo/exampleSite/content/logo-example/_index.md new file mode 100644 index 0000000..d943296 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/logo-example/_index.md @@ -0,0 +1,103 @@ ++++ +title = "Logo presentation example" +outputs = ["Reveal"] +[logo] +src = "github-logo.png" +alt = "GitHub logo with Octocat" +[reveal_hugo] +custom_theme = "reveal-hugo/themes/robot-lung.css" +margin = 0.2 ++++ + +## logo-example + +This presentation shows how to add a logo to each slide, like the GitHub one you see above. + +You can generalize the concept to add any additional markup to your presentations. + +--- + +[See the code for this presentation](https://github.com/dzello/reveal-hugo/blob/master/exampleSite/content/logo-example/_index.md) + +--- + +First, create a partial called `body.html` and put it in this directory: + +```text +layouts/partials/{section}/reveal-hugo/body.html +``` + +--- + +Substitute `{section}` for `home` if you are adding a logo to the presentation at `content/_index.md`. Otherwise, substitute the name of the Hugo section where your presentation lives. + +--- + +The presentation you're looking at right now is in `content/logo-example`, so the partial to add the logo lives in: + +```text +layouts/partials/logo-example/reveal-hugo/body.html +``` + +--- + +💡 Tip: to make the logo appear in every presentation, put it here: + +```text +layouts/partials/reveal-hugo/body.html +``` + +--- + +💡 Tip: In addition to `body.html`, you can create partials `head.html` and `end.html` in any of those directories. + +--- + +- head.html: Add markup just before the closing `` tag +- body.html: Add markup just before the closing `` tag +- end.html: Add markup just before the closing of the Reveal.js `div.slides` container + +--- + +Once the partial exists in `body.html`, we can add our image tag to it: + +```html + +``` + +--- + +In this example, the src and alt attributes are set to values from the content's front matter or site's configuration, which you can see in `logo-example/_index.md`: + +```toml +[logo] +src = "/images/github-logo.png" +alt = "GitHub logo with Octocat" +``` + +--- + +To position the logo, we can add a style tag to `body.html`: + +```html + +``` + + +💡 Depending on the theme you're using, your styles will be different.
You may also prefer to put your CSS in an external file or your Reveal.js theme. +
+ +--- + +# 🤗 + +That's it. + +Happy Hugo-ing! \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/content/logo-example/github-logo.png b/themes/reveal-hugo/exampleSite/content/logo-example/github-logo.png new file mode 100644 index 0000000..9a6e56c Binary files /dev/null and b/themes/reveal-hugo/exampleSite/content/logo-example/github-logo.png differ diff --git a/themes/reveal-hugo/exampleSite/content/plugin-example/_index.md b/themes/reveal-hugo/exampleSite/content/plugin-example/_index.md new file mode 100644 index 0000000..507eb5a --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/plugin-example/_index.md @@ -0,0 +1,83 @@ ++++ +title = "plugin-example" +description = "Shows how a Reveal.js plugin can be added and used" +outputs = ["Reveal"] +[reveal_hugo] +theme = "night" +margin = 0.2 +plugins = ["plugin/gallery/gallery.plugin.js"] ++++ + +# plugin-example + +--- + +This presentation demonstrates how a Reveal.js plugin can be added. + +--- + +The plugin is called [revealjs-simple-gallery](https://github.com/marcins/revealjs-simple-gallery). + +--- + +It can make any slide an image gallery. Here are a few examples. + +--- + + + +--- + + + +--- + + + +--- + +See the [revealjs-simple-gallery GitHub repo](https://github.com/marcins/revealjs-simple-gallery) to learn about more customization options. + +--- + +These were the steps to use this plugin for this reveal-hugo presentation. + +--- + +### 1 + +Copy the plugin CSS and JavaScript into the static directory + +--- + +### 2 + +Add the JavaScript file path to the `plugins` field in the front matter + +--- + +### 3 + +Create a `head.html` partial inside of `layouts/partials/plugin-example/reveal-hugo` + +--- + +### 4 + +In `head.html`, add a stylesheet link tag that loads the plugin CSS + +--- + +## THE END \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/content/plugin-example/sample1.jpg b/themes/reveal-hugo/exampleSite/content/plugin-example/sample1.jpg new file mode 100644 index 0000000..497d5d1 Binary files /dev/null and b/themes/reveal-hugo/exampleSite/content/plugin-example/sample1.jpg differ diff --git a/themes/reveal-hugo/exampleSite/content/plugin-example/sample2.jpg b/themes/reveal-hugo/exampleSite/content/plugin-example/sample2.jpg new file mode 100644 index 0000000..a62dbdf Binary files /dev/null and b/themes/reveal-hugo/exampleSite/content/plugin-example/sample2.jpg differ diff --git a/themes/reveal-hugo/exampleSite/content/plugin-example/sample3.jpg b/themes/reveal-hugo/exampleSite/content/plugin-example/sample3.jpg new file mode 100644 index 0000000..dad2884 Binary files /dev/null and b/themes/reveal-hugo/exampleSite/content/plugin-example/sample3.jpg differ diff --git a/themes/reveal-hugo/exampleSite/content/section-example/_index.md b/themes/reveal-hugo/exampleSite/content/section-example/_index.md new file mode 100644 index 0000000..5d42bc3 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/section-example/_index.md @@ -0,0 +1,19 @@ ++++ +title = "Section presentation example" +outputs = ["Reveal"] +[reveal_hugo] +theme = "night" +margin = 0.2 ++++ + +# Section Presentation + +This is an example of a section presentation. + +--- + +Section presentations are completely separate from the root presentation and each other. + +--- + +Additional content files can be placed in the section and will be added to the presentation in the order of their weight. \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/content/section-example/presentation.md b/themes/reveal-hugo/exampleSite/content/section-example/presentation.md new file mode 100644 index 0000000..0309317 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/section-example/presentation.md @@ -0,0 +1,8 @@ ++++ +weight = 10 ++++ + +# Including... + +Content from files like this one. + diff --git a/themes/reveal-hugo/exampleSite/content/template-example/_index.md b/themes/reveal-hugo/exampleSite/content/template-example/_index.md new file mode 100644 index 0000000..5b1ec68 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/template-example/_index.md @@ -0,0 +1,45 @@ ++++ +title = "Template presentation" +outputs = ["Reveal"] +[reveal_hugo] +theme = "night" +margin = 0.2 +[reveal_hugo.templates.blue] +background = "#0011DD" +transition = "zoom" ++++ + +## Template Example + +--- + +This presentation shows how to take advantage of reveal-hugo's slide template feature. + +--- + +Slide templates let you specify groups of slide attributes in one place and reuse them throughout the presentation. + +--- + +{{< slide template="blue" >}} + +Here's an example of using a template called `blue`, defined in the front matter of this presentation's `_index.md` file. + +--- + +The template can contain any valid slide customization params: + +```toml +[reveal_hugo.templates.blue] +background = "#0011DD" +transition = "zoom" +``` + +--- + +Then add it to any slide using the slide shortcode: + +``` +{{}} +``` + diff --git a/themes/reveal-hugo/exampleSite/content/template-example/continued.md b/themes/reveal-hugo/exampleSite/content/template-example/continued.md new file mode 100644 index 0000000..85ac367 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/content/template-example/continued.md @@ -0,0 +1,16 @@ ++++ ++++ + +{{< slide template="grey" >}} + +Templates can be specified in `config.toml` as well, for reusability across multiple presentations. + +``` +[params.reveal_hugo.templates.grey] +background = "#424242" +transition = "convex" +``` + +--- + +## THE END \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/data/common/nested.toml b/themes/reveal-hugo/exampleSite/data/common/nested.toml new file mode 100644 index 0000000..1d5cd59 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/data/common/nested.toml @@ -0,0 +1,19 @@ +reusable = ''' + +You can organize reusables into folder. + +An an `example` key in `data/common/nested.toml` + +```toml +example = "I'm a slide" +``` +
+ +Set the `content` attribute to "common.nested.example": + +```markdown +{{< slide content="common.nested.example" >}} +``` + +''' + diff --git a/themes/reveal-hugo/exampleSite/data/home.toml b/themes/reveal-hugo/exampleSite/data/home.toml new file mode 100644 index 0000000..92a7aac --- /dev/null +++ b/themes/reveal-hugo/exampleSite/data/home.toml @@ -0,0 +1,46 @@ +# Note: it seems that under goldmark, markdown in data templates has issues. +# In particular "---" is converted to
even inside code fences! + +reusable = ''' + +## Reusable slides + +Store markdown in a [data template](https://gohugo.io/templates/data-templates/) and reuse it in multiple sections or presentations. + +
+ +navigate down to learn more + +
+🔽 + +--- + +Add a `example` key to data/home.toml: + +```toml +example = "I'm a slide" +``` +
+ +Set the `content` attribute to "home.example": + +```markdown +{{< slide content="home.example" >}} +``` + +--- + +💡 Each data template entry can contain one or more slides, separated by `---` with newlines. + +--- + +💡 All other slide shortcode attributes (background, transition, etc.) can be used and will be applied to each slide in the data template entry. + +--- + +💡 Adding a new file in `data` folder requires to restart `hugo` + +💡 Symbolinc links are not allowed in `data` folder + +''' diff --git a/themes/reveal-hugo/exampleSite/layouts/partials/highlightjs-linenumbers-example/reveal-hugo/body.html b/themes/reveal-hugo/exampleSite/layouts/partials/highlightjs-linenumbers-example/reveal-hugo/body.html new file mode 100644 index 0000000..64a94d9 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/layouts/partials/highlightjs-linenumbers-example/reveal-hugo/body.html @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/layouts/partials/home/reveal-hugo/body.html b/themes/reveal-hugo/exampleSite/layouts/partials/home/reveal-hugo/body.html new file mode 100644 index 0000000..1dba7f9 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/layouts/partials/home/reveal-hugo/body.html @@ -0,0 +1,9 @@ + + + + diff --git a/themes/reveal-hugo/exampleSite/layouts/partials/home/reveal-hugo/end.html b/themes/reveal-hugo/exampleSite/layouts/partials/home/reveal-hugo/end.html new file mode 100644 index 0000000..39d6fcd --- /dev/null +++ b/themes/reveal-hugo/exampleSite/layouts/partials/home/reveal-hugo/end.html @@ -0,0 +1,4 @@ +
+
+
+
diff --git a/themes/reveal-hugo/exampleSite/layouts/partials/home/reveal-hugo/head.html b/themes/reveal-hugo/exampleSite/layouts/partials/home/reveal-hugo/head.html new file mode 100644 index 0000000..c99b743 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/layouts/partials/home/reveal-hugo/head.html @@ -0,0 +1,39 @@ + + + diff --git a/themes/reveal-hugo/exampleSite/layouts/partials/logo-example/reveal-hugo/body.html b/themes/reveal-hugo/exampleSite/layouts/partials/logo-example/reveal-hugo/body.html new file mode 100644 index 0000000..b54ef2f --- /dev/null +++ b/themes/reveal-hugo/exampleSite/layouts/partials/logo-example/reveal-hugo/body.html @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/layouts/partials/plugin-example/reveal-hugo/head.html b/themes/reveal-hugo/exampleSite/layouts/partials/plugin-example/reveal-hugo/head.html new file mode 100644 index 0000000..7c4c42d --- /dev/null +++ b/themes/reveal-hugo/exampleSite/layouts/partials/plugin-example/reveal-hugo/head.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/resources/_gen/assets/scss/custom-theme.scss_b53257441d1f91bc860cc5c6b2e22276.content b/themes/reveal-hugo/exampleSite/resources/_gen/assets/scss/custom-theme.scss_b53257441d1f91bc860cc5c6b2e22276.content new file mode 100644 index 0000000..f59f50f --- /dev/null +++ b/themes/reveal-hugo/exampleSite/resources/_gen/assets/scss/custom-theme.scss_b53257441d1f91bc860cc5c6b2e22276.content @@ -0,0 +1 @@ +body{background:#03812d;background-color:#03812d}.reveal{font-family:source sans pro,Helvetica,sans-serif;font-size:38px;font-weight:400;color:#fff}::selection{color:#fff;background:#bee4fd;text-shadow:none}::-moz-selection{color:#fff;background:#bee4fd;text-shadow:none}.reveal .slides section,.reveal .slides section>section{line-height:1.3;font-weight:inherit}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{margin:0 0 20px;color:#fff;font-family:source sans pro,Helvetica,sans-serif;font-weight:600;line-height:1.2;letter-spacing:normal;text-transform:uppercase;text-shadow:none;word-wrap:break-word}.reveal h1{font-size:2.5em}.reveal h2{font-size:1.6em}.reveal h3{font-size:1.3em}.reveal h4{font-size:1em}.reveal h1{text-shadow:none}.reveal p{margin:20px 0;line-height:1.3}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal strong,.reveal b{font-weight:700}.reveal em{font-style:italic}.reveal ol,.reveal dl,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal dt{font-weight:700}.reveal dd{margin-left:40px}.reveal blockquote{display:block;position:relative;width:70%;margin:20px auto;padding:5px;font-style:italic;background:rgba(255,255,255,.05);box-shadow:0 0 2px rgba(0,0,0,.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:20px auto;text-align:left;font-size:.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0 5px 15px rgba(0,0,0,.15)}.reveal code{font-family:monospace;text-transform:none}.reveal pre code{display:block;padding:5px;overflow:auto;max-height:400px;word-wrap:normal}.reveal table{margin:auto;border-collapse:collapse;border-spacing:0}.reveal table th{font-weight:700}.reveal table th,.reveal table td{text-align:left;padding:.2em .5em;border-bottom:1px solid}.reveal table th[align=center],.reveal table td[align=center]{text-align:center}.reveal table th[align=right],.reveal table td[align=right]{text-align:right}.reveal table tbody tr:last-child th,.reveal table tbody tr:last-child td{border-bottom:none}.reveal sup{vertical-align:super;font-size:smaller}.reveal sub{vertical-align:sub;font-size:smaller}.reveal small{display:inline-block;font-size:.6em;line-height:1.2em;vertical-align:top}.reveal small *{vertical-align:top}.reveal a{color:#42affa;text-decoration:none;-webkit-transition:color .15s ease;-moz-transition:color .15s ease;transition:color .15s ease}.reveal a:hover{color:#8dcffc;text-shadow:none;border:none}.reveal .roll span:after{color:#fff;background:#068de9}.reveal section img{margin:15px 0;background:rgba(255,255,255,.12);border:4px solid #fff;box-shadow:0 0 10px rgba(0,0,0,.15)}.reveal section img.plain{border:0;box-shadow:none}.reveal a img{-webkit-transition:all .15s linear;-moz-transition:all .15s linear;transition:all .15s linear}.reveal a:hover img{background:rgba(255,255,255,.2);border-color:#42affa;box-shadow:0 0 20px rgba(0,0,0,.55)}.reveal .controls{color:#42affa}.reveal .progress{background:rgba(0,0,0,.2);color:#42affa}.reveal .progress span{-webkit-transition:width 800ms cubic-bezier(0.26,0.86,0.44,0.985);-moz-transition:width 800ms cubic-bezier(0.26,0.86,0.44,0.985);transition:width 800ms cubic-bezier(0.26,0.86,0.44,0.985)}@media print{.backgrounds{background-color:#03812d}}section.has-light-background,section.has-light-background h1,section.has-light-background h2,section.has-light-background h3,section.has-light-background h4,section.has-light-background h5,section.has-light-background h6{color:#222}.reveal pre{margin:50px auto} \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/resources/_gen/assets/scss/custom-theme.scss_b53257441d1f91bc860cc5c6b2e22276.json b/themes/reveal-hugo/exampleSite/resources/_gen/assets/scss/custom-theme.scss_b53257441d1f91bc860cc5c6b2e22276.json new file mode 100644 index 0000000..c97ff64 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/resources/_gen/assets/scss/custom-theme.scss_b53257441d1f91bc860cc5c6b2e22276.json @@ -0,0 +1 @@ +{"Target":"_.min.debb4e7703d02f02d0510843db28b0aecb70d4c1394da8410aac6d3593ceec29.css","MediaType":"text/css","Data":{"Integrity":"sha256-3rtOdwPQLwLQUQhD2yiwrstw1ME5TahBCqxtNZPO7Ck="}} \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/static/_redirects b/themes/reveal-hugo/exampleSite/static/_redirects new file mode 100644 index 0000000..044d170 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/static/_redirects @@ -0,0 +1,2 @@ +# Redirect default Netlify subdomain to primary domain +https://reveal-hugo.netlify.com/* https://reveal-hugo.dzello.com/:splat 301! \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/static/css/custom.css b/themes/reveal-hugo/exampleSite/static/css/custom.css new file mode 100644 index 0000000..0ceb533 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/static/css/custom.css @@ -0,0 +1,11 @@ +.custom em{ + color: #a32843 +} + +.custom code{ + color: #ff2f86 +} + +.customjs { + background-color: #504e9e +} \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/static/favicon.ico b/themes/reveal-hugo/exampleSite/static/favicon.ico new file mode 100755 index 0000000..7d8fdf1 Binary files /dev/null and b/themes/reveal-hugo/exampleSite/static/favicon.ico differ diff --git a/themes/reveal-hugo/exampleSite/static/images/alex-litvin-790876-unsplash.jpg b/themes/reveal-hugo/exampleSite/static/images/alex-litvin-790876-unsplash.jpg new file mode 100644 index 0000000..ff0712b Binary files /dev/null and b/themes/reveal-hugo/exampleSite/static/images/alex-litvin-790876-unsplash.jpg differ diff --git a/themes/reveal-hugo/exampleSite/static/js/custom.js b/themes/reveal-hugo/exampleSite/static/js/custom.js new file mode 100644 index 0000000..01adab6 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/static/js/custom.js @@ -0,0 +1,3 @@ +document.getElementById("customjs").addEventListener("click", function(){ + this.className += " customjs" +}) \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/static/plugin/gallery/gallery.css b/themes/reveal-hugo/exampleSite/static/plugin/gallery/gallery.css new file mode 100644 index 0000000..58d3514 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/static/plugin/gallery/gallery.css @@ -0,0 +1,67 @@ +.reveal ul.gallery { + position: relative; + list-style-type: none; + margin: 0; + padding: 0; + width: 960px; + height: 700px; +} + +.reveal ul.gallery[data-mode=full-screen] { + width: 100%; + height: 100%; +} + +.gallery li { + display: block; + position: absolute; + top: 0; + left: 0; + width: 960px; + height: 700px; + opacity: 0; + -webkit-transition: opacity 0.3s ease-in-out; + -moz-transition: opacity 0.3s ease-in-out; + transition: opacity 0.3s ease-in-out; +} + +.gallery[data-mode=full-screen] li { + width: 100%; + height: 100%; + background-size: 100% 100%; + background-attachment:fixed; + background-position: center; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} + + +.gallery .active { + opacity: 1; +} + +.gallery .inactive { + opacity: 0; +} + +.gallery img { + display: block; + position: absolute; + top: 0; + left: 0; + border: none !important; +} + +.gallery label { + display: block; + position: absolute; + bottom: 20px; + min-width: 150px; + left: 0; + padding: 10px; + background-color: rgba(0, 0, 0, 0.6); + color: #fff; + font-size: 24px; +} \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/static/plugin/gallery/gallery.plugin.js b/themes/reveal-hugo/exampleSite/static/plugin/gallery/gallery.plugin.js new file mode 100644 index 0000000..c6ba1c9 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/static/plugin/gallery/gallery.plugin.js @@ -0,0 +1,119 @@ +(function(Gallery) { + var galleryTimer, galleryMode; + + Gallery.step = function (items, iterations) { + var length = items.length, + ptr = 0, + loops = 0; + + return function () { + if (iterations > 0 && loops === iterations) { + return; + } + items[ptr].className = "inactive"; + if (ptr === length - 1) { + loops++; + if (iterations === 0 || loops < iterations) { + ptr = 0; + } + } else { + ptr++; + } + items[ptr].className = "active"; + }; + }; + + Gallery.start = function (galleryNode, contextNode) { + contextNode = contextNode || document.body.firstChild; + galleryMode = galleryNode.dataset.mode || 'normal'; + + if (galleryMode === 'full-screen') { + // FIXME remove depenency on Reveal, have a callback? function + // that will get a root node to move full screen slides to (ie. slidesNode) + + // for full screen mode we need to: + // - take the gallery out of the flow and insert it before "slides" + // - hide slides + // - make it full screen + + var placeholder = document.createElement("div"); + placeholder.id = "gallery-placeholder"; + galleryNode.parentNode.replaceChild(placeholder, galleryNode); + + if (contextNode.parentNode) { + contextNode.parentNode.insertBefore(galleryNode, contextNode); + } + } + + var items = Array.prototype.slice.apply(galleryNode.querySelectorAll("li")); + items.forEach(function (item, index) { + if (index === 0) { + item.className = "active"; + } else { + item.className = "inactive"; + } + var label = item.querySelector("label"); + var img = item.querySelector("img"); + + if (galleryMode === 'full-screen') { + img.style.display = "none"; + item.style.backgroundImage = "url(" + img.src + ")"; + } else { + img.style.display = ""; + } + + if (!label && img.attributes.alt) { + label = document.createElement("label"); + label.innerHTML = img.attributes.alt.value; + item.appendChild(label); + } + }); + + var iterations = galleryNode.dataset.iterations ? +galleryNode.dataset.iterations : 1; + var interval = (galleryNode.dataset.interval || 1) * 1000; + galleryTimer = setInterval(Gallery.step(items, iterations), interval); + }; + + // FIXME Gallery.stop should take elem and root nodes as well + Gallery.stop = function (galleryNode, contextNode) { + clearInterval(galleryTimer); + + if (galleryMode === "full-screen") { + // - put the gallery back where it was + var placeholder = document.getElementById("gallery-placeholder"); + placeholder.parentNode.replaceChild(galleryNode, placeholder); + + var items = Array.prototype.slice.apply(galleryNode.querySelectorAll("li")); + items.forEach(function (item, index) { + var img = item.querySelector("img"); + item.style.backgroundImage = ""; + img.style.display = ""; + }); + } + }; +})(window.Gallery = window.Gallery || {});(function() { + if( typeof window.addEventListener === 'function' ) { + var slidesNode = document.querySelector(".slides"); + Reveal.addEventListener("slidechanged", function (event) { + console.log(event) + var galleryNode = event.previousSlide.querySelector('.gallery') || document.querySelector('.reveal > .gallery'); + if (galleryNode) { + Gallery.stop(galleryNode, slidesNode); + } + + galleryNode = event.currentSlide.querySelector('.gallery'); + if (galleryNode) { + Gallery.start(galleryNode, slidesNode); + } + + }); + + // during initial load + if (Reveal.getCurrentSlide()) { + var galleryNode = Reveal.getCurrentSlide().querySelector('.gallery'); + if (galleryNode) { + Gallery.start(galleryNode, slidesNode); + } + } + } +})(); \ No newline at end of file diff --git a/themes/reveal-hugo/exampleSite/static/reveal-hugo/themes/robot-lung.css b/themes/reveal-hugo/exampleSite/static/reveal-hugo/themes/robot-lung.css new file mode 100644 index 0000000..5d94683 --- /dev/null +++ b/themes/reveal-hugo/exampleSite/static/reveal-hugo/themes/robot-lung.css @@ -0,0 +1,340 @@ +/** + + [ robot-lung ] + + A hot pink theme for Reveal.js with Roboto fonts and a colorful border. + By Josh Dzielak, https://dzello.com/, License MIT + + The bold border is optional and requires some HTML. To use it: + + 1. Add 4 divs to your HTML page: +
+
+
+
+ + 2. Set { margin: 0.2 } in the Reveal.js initializer to make sure + your presentation content doesn't collide with the frame. + + Like the theme but don't like the colors? Don't fret. Just change + $borderColor and/or $linkColor below to something else and rebuild. + + Or if you don't want to rebuild the theme just override the .line background + property with some CSS: + + .line { + background: ; + } + +*/ +@import url(https://fonts.googleapis.com/css?family=Roboto+Slab:300,700); +@import url(https://fonts.googleapis.com/css?family=Roboto:700); +section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 { + color: #141414; } + +.reveal .controls { + right: 50px; + bottom: 50px; } + +.line { + content: ''; + position: fixed; + background: #FF4081; + z-index: 105; } + .line.top { + left: 0; + top: 0; + width: 100%; + height: 30px; } + @media (max-width: 840px) { + .line.top { + height: 15px; } } + .line.bottom { + left: 0; + top: auto; + bottom: 0; + width: 100%; + height: 30px; } + @media (max-width: 840px) { + .line.bottom { + height: 15px; } } + .line.left { + left: 0; + top: 0; + width: 30px; + height: 200%; } + @media (max-width: 840px) { + .line.left { + width: 15px; } } + .line.right { + left: auto; + right: 0; + top: 0; + width: 30px; + height: 200%; } + @media (max-width: 840px) { + .line.right { + width: 15px; } } + +.reveal.has-dark-background .line { + display: none; } + +/********************************************* + * GLOBAL STYLES + *********************************************/ +body { + background: #fff; + background-color: #fff; } + +.reveal { + font-family: "Roboto Slab", serif; + font-size: 32px; + font-weight: normal; + color: #363636; } + +::selection { + color: #fff; + background: #ffc0d5; + text-shadow: none; } + +::-moz-selection { + color: #fff; + background: #ffc0d5; + text-shadow: none; } + +.reveal .slides > section, +.reveal .slides > section > section { + line-height: 1.3; + font-weight: inherit; } + +/********************************************* + * HEADERS + *********************************************/ +.reveal h1, +.reveal h2, +.reveal h3, +.reveal h4, +.reveal h5, +.reveal h6 { + margin: 0 0 20px 0; + color: #141414; + font-family: "Roboto", sans-serif; + font-weight: 700; + line-height: 1.2; + letter-spacing: normal; + text-transform: uppercase; + text-shadow: none; + word-wrap: break-word; } + +.reveal h1 { + font-size: 2.6em; } + +.reveal h2 { + font-size: 2.2em; } + +.reveal h3 { + font-size: 1.7em; } + +.reveal h4 { + font-size: 1.4em; } + +.reveal h1 { + text-shadow: none; } + +/********************************************* + * OTHER + *********************************************/ +.reveal p { + margin: 20px 0; + line-height: 1.3; } + +/* Ensure certain elements are never larger than the slide itself */ +.reveal img, +.reveal video, +.reveal iframe { + max-width: 95%; + max-height: 95%; } + +.reveal strong, +.reveal b { + font-weight: bold; } + +.reveal em { + font-style: italic; } + +.reveal ol, +.reveal dl, +.reveal ul { + display: inline-block; + text-align: left; + margin: 0 0 0 1em; } + +.reveal ol { + list-style-type: decimal; } + +.reveal ul { + list-style-type: disc; } + +.reveal ul ul { + list-style-type: square; } + +.reveal ul ul ul { + list-style-type: circle; } + +.reveal ul ul, +.reveal ul ol, +.reveal ol ol, +.reveal ol ul { + display: block; + margin-left: 40px; } + +.reveal dt { + font-weight: bold; } + +.reveal dd { + margin-left: 40px; } + +.reveal blockquote { + display: block; + position: relative; + width: 70%; + margin: 20px auto; + padding: 5px; + font-style: italic; + background: rgba(255, 255, 255, 0.05); + box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } + +.reveal blockquote p:first-child, +.reveal blockquote p:last-child { + display: inline-block; } + +.reveal q { + font-style: italic; } + +.reveal pre { + display: block; + position: relative; + width: 90%; + margin: 20px auto; + text-align: left; + font-size: 0.55em; + font-family: monospace; + line-height: 1.2em; + word-wrap: break-word; + box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } + +.reveal code { + font-family: monospace; + text-transform: none; } + +.reveal pre code { + display: block; + padding: 5px; + overflow: auto; + max-height: 400px; + word-wrap: normal; } + +.reveal table { + margin: auto; + border-collapse: collapse; + border-spacing: 0; } + +.reveal table th { + font-weight: bold; } + +.reveal table th, +.reveal table td { + text-align: left; + padding: 0.2em 0.5em 0.2em 0.5em; + border-bottom: 1px solid; } + +.reveal table th[align="center"], +.reveal table td[align="center"] { + text-align: center; } + +.reveal table th[align="right"], +.reveal table td[align="right"] { + text-align: right; } + +.reveal table tbody tr:last-child th, +.reveal table tbody tr:last-child td { + border-bottom: none; } + +.reveal sup { + vertical-align: super; } + +.reveal sub { + vertical-align: sub; } + +.reveal small { + display: inline-block; + font-size: 0.6em; + line-height: 1.2em; + vertical-align: top; } + +.reveal small * { + vertical-align: top; } + +/********************************************* + * LINKS + *********************************************/ +.reveal a { + color: #FF4081; + text-decoration: none; + -webkit-transition: color .15s ease; + -moz-transition: color .15s ease; + transition: color .15s ease; } + +.reveal a:hover { + color: #ff8db3; + text-shadow: none; + border: none; } + +.reveal .roll span:after { + color: #fff; + background: #f30053; } + +/********************************************* + * IMAGES + *********************************************/ +.reveal section img { + margin: 15px 0px; + background: rgba(255, 255, 255, 0.12); + border: 4px solid #363636; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } + +.reveal section img.plain { + border: 0; + box-shadow: none; } + +.reveal a img { + -webkit-transition: all .15s linear; + -moz-transition: all .15s linear; + transition: all .15s linear; } + +.reveal a:hover img { + background: rgba(255, 255, 255, 0.2); + border-color: #FF4081; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } + +/********************************************* + * NAVIGATION CONTROLS + *********************************************/ +.reveal .controls { + color: #FF4081; } + +/********************************************* + * PROGRESS BAR + *********************************************/ +.reveal .progress { + background: rgba(0, 0, 0, 0.2); + color: #FF4081; } + +.reveal .progress span { + -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); + -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); + transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +.reveal .progress { + z-index: 1000; + color: #FF80A1; } diff --git a/themes/reveal-hugo/images/reveal-hugo-hello-world.png b/themes/reveal-hugo/images/reveal-hugo-hello-world.png new file mode 100644 index 0000000..10d9901 Binary files /dev/null and b/themes/reveal-hugo/images/reveal-hugo-hello-world.png differ diff --git a/themes/reveal-hugo/images/screenshot.png b/themes/reveal-hugo/images/screenshot.png new file mode 100644 index 0000000..7b6a0f4 Binary files /dev/null and b/themes/reveal-hugo/images/screenshot.png differ diff --git a/themes/reveal-hugo/images/tn.png b/themes/reveal-hugo/images/tn.png new file mode 100644 index 0000000..00c28ae Binary files /dev/null and b/themes/reveal-hugo/images/tn.png differ diff --git a/themes/reveal-hugo/layouts/_default/baseof.reveal.html b/themes/reveal-hugo/layouts/_default/baseof.reveal.html new file mode 100644 index 0000000..a25a4d7 --- /dev/null +++ b/themes/reveal-hugo/layouts/_default/baseof.reveal.html @@ -0,0 +1,36 @@ + + + + {{ partial "layout/head" . }} + {{ partial "layout/theme" . }} + + {{- partial "reveal-hugo/head" . -}} + + {{- $sectionHeadPartial := printf "%s/reveal-hugo/head" (.Page.Section | default "home") -}} + {{- if fileExists (printf "layouts/partials/%s.html" $sectionHeadPartial) -}}{{ partial $sectionHeadPartial . }}{{- end }} + + +
+
+ {{- block "main" . -}}{{- end -}} +
+ + {{- partial "reveal-hugo/end" . -}} + + {{- $sectionHeadPartial := printf "%s/reveal-hugo/end" (.Page.Section | default "home") -}} + {{- if fileExists (printf "layouts/partials/%s.html" $sectionHeadPartial) -}}{{ partial $sectionHeadPartial . }}{{- end }} +
+ {{- partial "layout/javascript" . }} + + {{- partial "reveal-hugo/body" . }} + + {{- $sectionBodyPartial := printf "%s/reveal-hugo/body" (.Page.Section | default "home") -}} + {{- if fileExists (printf "layouts/partials/%s.html" $sectionBodyPartial) -}}{{ partial $sectionBodyPartial . }}{{- end }} + + diff --git a/themes/reveal-hugo/layouts/_default/bundle.reveal.html b/themes/reveal-hugo/layouts/_default/bundle.reveal.html new file mode 100644 index 0000000..62fb5c8 --- /dev/null +++ b/themes/reveal-hugo/layouts/_default/bundle.reveal.html @@ -0,0 +1,4 @@ +{{ define "main" }} + {{ partial "reveal-hugo/slides" (slice .Page) }} + {{ partial "reveal-hugo/slides" (.Resources.ByType "page") }} +{{ end }} diff --git a/themes/reveal-hugo/layouts/_default/index.reveal.html b/themes/reveal-hugo/layouts/_default/index.reveal.html new file mode 100644 index 0000000..1b4b67c --- /dev/null +++ b/themes/reveal-hugo/layouts/_default/index.reveal.html @@ -0,0 +1,4 @@ +{{ define "main" }} + {{ partial "reveal-hugo/slides" (slice .Page) }} + {{ partial "reveal-hugo/slides" (where .Site.RegularPages "Type" "home") }} +{{ end }} diff --git a/themes/reveal-hugo/layouts/_default/list.reveal.html b/themes/reveal-hugo/layouts/_default/list.reveal.html new file mode 100644 index 0000000..63e4b9d --- /dev/null +++ b/themes/reveal-hugo/layouts/_default/list.reveal.html @@ -0,0 +1,4 @@ +{{ define "main" }} + {{ partial "reveal-hugo/slides" (slice .Page) }} + {{ partial "reveal-hugo/slides" (where .Pages "Kind" "page") }} +{{ end }} diff --git a/themes/reveal-hugo/layouts/_default/single.reveal.html b/themes/reveal-hugo/layouts/_default/single.reveal.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/reveal-hugo/layouts/partials/layout/head.html b/themes/reveal-hugo/layouts/partials/layout/head.html new file mode 100644 index 0000000..085923a --- /dev/null +++ b/themes/reveal-hugo/layouts/partials/layout/head.html @@ -0,0 +1,7 @@ + +{{ or .Page.Title .Site.Title }} +{{ with $.Param "description" }}{{ end }} +{{ with .Site.Author.name }}{{ end }} + + + \ No newline at end of file diff --git a/themes/reveal-hugo/layouts/partials/layout/javascript.html b/themes/reveal-hugo/layouts/partials/layout/javascript.html new file mode 100644 index 0000000..fe99cb9 --- /dev/null +++ b/themes/reveal-hugo/layouts/partials/layout/javascript.html @@ -0,0 +1,63 @@ + + + + +{{- $reveal_location := $.Param "reveal_hugo.reveal_cdn" | default "reveal-js" -}} + + + + + + + + + + +{{ if $.Param "reveal_hugo.load_default_plugins" | default true }} + {{ $default_plugins := slice "plugin/markdown/marked.js" "plugin/markdown/markdown.js" "plugin/highlight/highlight.js" "plugin/zoom-js/zoom.js" }} + {{ range $default_plugins }} + + {{ end }} + + +{{ end }} + +{{ range $.Param "reveal_hugo.plugins" }} + +{{ end }} +{{- $custom_js := $.Param "reveal_hugo.custom_js" -}} +{{- if $custom_js -}} + +{{- end -}} diff --git a/themes/reveal-hugo/layouts/partials/layout/theme.html b/themes/reveal-hugo/layouts/partials/layout/theme.html new file mode 100644 index 0000000..a4f7c86 --- /dev/null +++ b/themes/reveal-hugo/layouts/partials/layout/theme.html @@ -0,0 +1,28 @@ + +{{- $reveal_location := $.Param "reveal_hugo.reveal_cdn" | default "reveal-js" -}} +{{- $highlight_location := $.Param "reveal_hugo.highlight_cdn" | default "highlight-js" -}} +{{- $custom_theme := $.Param "reveal_hugo.custom_theme" -}} + + +{{- $custom_theme := $.Param "reveal_hugo.custom_theme" -}} +{{- if $custom_theme -}} + {{- $custom_theme_options := $.Param "reveal_hugo.custom_theme_options" | default dict -}} + {{- if $.Param "reveal_hugo.custom_theme_compile" -}} + {{ $asset := resources.Get $custom_theme | resources.ExecuteAsTemplate "_.scss" . | toCSS $custom_theme_options | minify | fingerprint }} + + {{- else -}} + + {{- end -}} +{{ else -}} + {{- $theme := $.Param "reveal_hugo.theme" | default "black" -}} + +{{ end -}} +{{ if $.Param "reveal_hugo.load_default_plugins" | default true -}} + + {{- $highlight_theme := $.Param "reveal_hugo.highlight_theme" | default "default" -}} + +{{- end }} +{{- $custom_css := $.Param "reveal_hugo.custom_css" -}} +{{- if $custom_css -}} + +{{- end -}} diff --git a/themes/reveal-hugo/layouts/partials/reveal-hugo/body.html b/themes/reveal-hugo/layouts/partials/reveal-hugo/body.html new file mode 100644 index 0000000..f2dd4bf --- /dev/null +++ b/themes/reveal-hugo/layouts/partials/reveal-hugo/body.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/reveal-hugo/layouts/partials/reveal-hugo/end.html b/themes/reveal-hugo/layouts/partials/reveal-hugo/end.html new file mode 100644 index 0000000..1ca9f46 --- /dev/null +++ b/themes/reveal-hugo/layouts/partials/reveal-hugo/end.html @@ -0,0 +1 @@ + diff --git a/themes/reveal-hugo/layouts/partials/reveal-hugo/head.html b/themes/reveal-hugo/layouts/partials/reveal-hugo/head.html new file mode 100644 index 0000000..ed1e892 --- /dev/null +++ b/themes/reveal-hugo/layouts/partials/reveal-hugo/head.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/reveal-hugo/layouts/partials/reveal-hugo/slides.html b/themes/reveal-hugo/layouts/partials/reveal-hugo/slides.html new file mode 100644 index 0000000..0bed8a9 --- /dev/null +++ b/themes/reveal-hugo/layouts/partials/reveal-hugo/slides.html @@ -0,0 +1,26 @@ + +{{ range . -}} + + {{- if ne (len .Content) 0 -}} + + {{- $content := replace .Content "
\n\n
" "
" -}} + + + {{- $content := replaceRE ` + {{- $content := replaceRE `()` `$1" data-line-numbers>` $content -}} + + {{- $content := replaceRE `()` `$1" data-line-numbers="$2">` $content -}} + + {{- $content := replace $content "
" "
" -}} + + {{- range (split $content "
") -}} + + {{- if not (in . "data-noprocess") -}} +
+ {{- end -}} + {{- . | safeHTML -}} +
+ {{- end -}} + {{- end -}} +{{- end }} diff --git a/themes/reveal-hugo/layouts/shortcodes/frag.html b/themes/reveal-hugo/layouts/shortcodes/frag.html new file mode 100644 index 0000000..c1de8c8 --- /dev/null +++ b/themes/reveal-hugo/layouts/shortcodes/frag.html @@ -0,0 +1,4 @@ + + {{ .Get "c" }} + \ No newline at end of file diff --git a/themes/reveal-hugo/layouts/shortcodes/fragment.html b/themes/reveal-hugo/layouts/shortcodes/fragment.html new file mode 100644 index 0000000..bcd5627 --- /dev/null +++ b/themes/reveal-hugo/layouts/shortcodes/fragment.html @@ -0,0 +1,6 @@ +{{/* Render .Inner before processing the shortcode. */}} +{{ $_hugo_config := `{ "version": 1 }` }} + + {{ .Inner }} + \ No newline at end of file diff --git a/themes/reveal-hugo/layouts/shortcodes/markdown.html b/themes/reveal-hugo/layouts/shortcodes/markdown.html new file mode 100644 index 0000000..f5effbc --- /dev/null +++ b/themes/reveal-hugo/layouts/shortcodes/markdown.html @@ -0,0 +1,8 @@ +
+ +
\ No newline at end of file diff --git a/themes/reveal-hugo/layouts/shortcodes/note.html b/themes/reveal-hugo/layouts/shortcodes/note.html new file mode 100644 index 0000000..f5ee55e --- /dev/null +++ b/themes/reveal-hugo/layouts/shortcodes/note.html @@ -0,0 +1,4 @@ +{{/* Markdown is not rendered inside