| @@ -1,6 +1,12 @@ | |||
| #' Bulma Document Renderer | |||
| #' | |||
| #' TODO Document YAML options here. | |||
| #' @section YAML options: | |||
| #' You can pass additional options to the underlying template via the `bulma` | |||
| #' YAML item. The following options can be specified there. | |||
| #' \itemize{ | |||
| #' \item{`hero`: Classes applied to the hero containing the title} | |||
| #' \item{`hero_button`: Classes applied to the `header_links` buttons} | |||
| #' } | |||
| #' | |||
| #' @inheritDotParams rmarkdown::html_document_base | |||
| #' @export | |||
| @@ -70,7 +70,7 @@ $if(date)$ | |||
| $endif$ | |||
| $if(header-links)$ | |||
| $for(header-links)$ | |||
| <a class="button is-primary is-inverted is-outlined" href="$header-links.url$">$header-links.name$</a> | |||
| <a class="button $if(bulma.hero_button)$$for(bulma.hero_button)$$bulma.hero_button$$sep$ $endfor$$else$is-primary is-inverted is-outlined$endif$" href="$header-links.url$">$header-links.name$</a> | |||
| $endfor$ | |||
| $endif$ <!-- header-links --> | |||
| </div> | |||
| @@ -12,14 +12,15 @@ author: | |||
| extra: | |||
| - "Second Affiliation" | |||
| - "Very Cool Guy" | |||
| date: '`r strftime(Sys.time(), "%F %T")`' | |||
| date: '`r strftime(Sys.time(), "%A, %B %e, %Y")`' | |||
| header-links: | |||
| - name: Github | |||
| url: https://github.com/gerkelab | |||
| - name: Home | |||
| url: https://gerkelab.com | |||
| bulma: | |||
| hero: ["info", "bold"] | |||
| hero: ["dark"] | |||
| hero_button: ["is-secondary"] | |||
| output: bulma::bulma_document | |||
| editor_options: | |||
| chunk_output_type: console | |||