class: title <style type="text/css"> .blue--hover:hover, .blue--hover:focus { color: var(--blue); } </style>
2
From Style Guide to xaringan Theme
xaringanthemer
Garrick Aden-Buie & Silvia Canelón
Professional, Polished, Presentable
--- class: header_background # Do you have your style guide? .flex.w-100.items-start.justify-center.mt4[ <div class="ba bw1 br3 b--silver w-80 pv2 silver f4 relative" style="padding-left:2.5em;"> <button class="absolute left-1 b--none silver pa0 ma0 blue--hover grow bg-white" id="fake-search"> <svg aria-hidden="true" role="img" viewBox="0 0 512 512" style="height:1em;width:1em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:currentColor;overflow:visible;position:relative;"><path d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"/></svg> </button> <div class="can-edit">airbnb branding guide</div> </div> ] -- <div class="animated bounceInLeft" style="position:absolute; bottom: 80px;"> <img src="assets/img/02/airbnb-colors.png" height="200" class="shadow-5" style="transform: rotate(-13deg); z-index: 13;" fig.alt = "Screenshot of the colors in AirBnB's branding guide." /> </div> <div class="animated bounceInUp delay-1s" style="position: absolute; bottom: 60px; left: 280px;"> <img src="assets/img/02/airbnb-fonts.png" height="200" class="shadow-5" style="transform: rotate(5deg); z-index: 12;" fig.alt = "Screenshot of the fonts in AirBnB's branding guide." /> </div> <div class="animated bounceInUp delay-2s" style="position: absolute; bottom: 140px; right: 340px;"> <img src="assets/img/02/airbnb-logos.png" height="210" class="shadow-5" style="transform: rotate(-5deg); z-index: 11;" fig.alt = "Screenshot of AirBnB's logos from their branding guide." /> </div> <div class="animated bounceInRight delay-3s" style="position: absolute; bottom: 40px; right: 80px;"> <img src="assets/img/02/airbnb-examples.png" height="200" class="shadow-5" style="transform: rotate(1deg); z-index: 10;" fig.alt = "Screenshot of AirBnB's logos from their branding guide." /> </div> <script type="text/javascript"> document.getElementById("fake-search").addEventListener("click", function() { slideshow.gotoNextSlide() }) </script> --- # Our favorite style guides - GOV.UK Design System
GOV.UK Design System
- Urban Institute Data Visualization Style Guide
Urban Institute Data Visualization Style Guide
- U.S. Web Design System
U.S. Web Design System
- Adele: A Design System Repository
Adele: A Design System Repository
--- class: break center middle <img src="assets/img/02/xaringanthemer.png" alt="xaringanthemer hex logo" style="filter: drop-shadow(0.1rem 0.5rem 0.3rem rgba(255, 0, 0, 0.5));"> --- layout: true # xaringanthemer --- ![A side-by-side comparison of the default xaringan theme with the xaringanthemer theme.](assets/img/02/xaringan-plus-themer.jpg) --- .pull-left[ ![Create a new R markdown document](assets/img/02/rstudio-new-rmarkdown.png) ] -- .pull-right[ ![Create a new R markdown document](assets/img/02/rstudio-new-xaringanthemer.png) ] --- ```` ```{r xaringan-themer, include=FALSE, warning=FALSE} library(xaringanthemer) style_duo_accent( primary_color = "#1381B0", secondary_color = "#FF961C", inverse_header_color = "#FFFFFF" ) ``` ```` --- ```` ```{r xaringan-themer, include=FALSE, warning=FALSE} library(xaringanthemer) *style_duo_accent( primary_color = "#1381B0", secondary_color = "#FF961C", inverse_header_color = "#FFFFFF" *) ``` ```` -- .pull-left[ <h3 class="mv1 tc bb bw1">Monotone</h3> - `style_mono_light()` - `style_mono_dark()` - `style_mono_accent()` - `style_mono_accent_inverse()` ] -- .pull-right[ <h3 class="mv1 tc bb bw1">Duotone</h3> - `style_duo()` - `style_duo_accent()` - `style_duo_accent_inverse()` ] --- class: header_background center middle # Activity Time .blue.f4[
[materials/act-01/02-style-guide](/materials/act-01/02-style-guide/#activity) ] Build your own complete .pkg[xaringan] theme with .pkg[xaringanthemer]