class: center, middle, inverse, title-slide # Contribute to Open Source with Pretty Slides ## (And a short preview of a WIP package) ### Daniel Anderson ### June 2, 2018 --- class: center, middle # xaringan ### /ʃæ.'riŋ.ɡæn/ --- # What it is .pull-left[ * HTML-based slides * Produced with R Markdown * Styled with CSS ] .pull-right[ ![](assets/img/rmd.png) ] .footnote[Slides available at [datalorax.com/talks/cascadia18](http://www.datalorax.com/talks/cascadia18/)] --- # Themes This is the `uo` theme See All the available themes with `xaringan:::list_css()` ```r names(xaringan:::list_css()) ``` ``` ## [1] "default-fonts" "default" "duke-blue" ## [4] "hygge-duke" "hygge" "metropolis-fonts" ## [7] "metropolis" "rladies-fonts" "rladies" ## [10] "robot-fonts" "robot" "rutgers-fonts" ## [13] "rutgers" "tamu-fonts" "tamu" ## [16] "uo-fonts" "uo" ``` .footnote[Slides available at [datalorax.com/talks/cascadia18](http://www.datalorax.com/talks/cascadia18/)] --- # Specify a theme .pull-left[ .grey[.Large[**Default YAML**]] ``` --- title: "Presentation Ninja" subtitle: "⚔<br/>with xaringan" author: "Yihui Xie" date: "2016/12/12" output: xaringan::moon_reader: lib_dir: libs nature: highlightStyle: github highlightLines: true countIncrementalSlides: false --- ``` ] .pull-right[ .grey[.Large[**Add a theme**]] ``` --- title: "Presentation Ninja" subtitle: "⚔<br/>with xaringan" author: "Yihui Xie" date: "2016/12/12" output: xaringan::moon_reader: * css: ["default", "uo", "uo-fonts"] lib_dir: libs nature: highlightStyle: github highlightLines: true countIncrementalSlides: false --- ``` ] .footnote[Slides available at [datalorax.com/talks/cascadia18](http://www.datalorax.com/talks/cascadia18/)] --- # Where do the themes live? CSS Files ![](assets/img/css-files.png) .footnote[Slides available at [datalorax.com/talks/cascadia18](http://www.datalorax.com/talks/cascadia18/)] --- # How do you contribute your own theme? <br/> ### My advice 1. Start with an existing theme 1. Modify the CSS + Change .large[.bolder[.red[c].blue[o].green[l].yellow[o].purple[r].orange[s]]]! + Change fonts! (see [here](https://github.com/yihui/xaringan/wiki/Changing-fonts), import fonts with [google fonts](https://fonts.google.com)) + Consider changes to the background .footnote[Slides available at [datalorax.com/talks/cascadia18](http://www.datalorax.com/talks/cascadia18/)] --- # Look at CSS for [existing themes](https://github.com/yihui/xaringan/tree/master/inst/rmarkdown/templates/xaringan/resources) ![](assets/img/existing-themes.png) --- # Basically this .center[<img src = "https://i.pinimg.com/736x/33/fb/06/33fb067593a2a949e349a4e899c508d3--programming-humor-o-reilly.jpg", height = 480 />] .footnote[Slides available at [datalorax.com/talks/cascadia18](http://www.datalorax.com/talks/cascadia18/)] --- # Once you've settled on a theme 1. Pull out just the parts of your theme that are different from the default theme + Name the css file what you want your theme to be called (keep it simple and all lower case) 1. Put all of your fonts in a separate file, called `themename-fonts.css`. .footnote[Slides available at [datalorax.com/talks/cascadia18](http://www.datalorax.com/talks/cascadia18/)] -- ### When you're sure you're ready to contribute 1. Fork the [xaringan](https://github.com/yihui/xaringan) repo, and clone your fork locally. 1. Add your css files to `xaringan/inst/rmarkdown/templates/xaringan/resources` 1. Push the files to your fork 1. Submit a PR --- class: inverse center middle ## Quick new package preview .footnote[Slides available at [datalorax.com/talks/cascadia18](http://www.datalorax.com/talks/cascadia18/)] --- # [slidex](https://github.com/datalorax/slidex) https://github.com/datalorax/slidex Transition PowerPoint slides to xaringan slides * Currently exports one function: ```r convert_pptx("path/to/pptx", author = "Your Name") ``` .footnote[Slides available at [datalorax.com/talks/cascadia18](http://www.datalorax.com/talks/cascadia18/)] -- * Still a WIP - not perfect but can do a lot + Maintains bulleting (basically) + Maintains and reproduces tables + Maintains images + Maintains links + Easy selection of existing themes (additional `theme` argument). --- class: inverse background-image: url(https://github.com/datalorax/slidex/raw/master/docs/slidex-preview.gif) background-size: contain --- class: inverse center middle # Thanks!
[@datalorax_](https://twitter.com/datalorax_)
[@datalorax](https://github.com/datalorax)
[daniela@uoregon.edu](mailto:daniela@uoregon.edu) Slides available at [datalorax.com/talks/cascadia18](http://www.datalorax.com/talks/cascadia18/)