|
- ---
- title: "Bulma Components"
- subtitle: "A Bulma Test Document"
- author:
- - name: Garrick Aden-Buie
- url: https://garrickadenbuie.com
- extra:
- - "First Affiliation"
- - "@tweeter345"
- date: '`r strftime(Sys.time(), "%A, %B %e, %Y")`'
- bulma:
- hero: ["info"]
- hero_body: "has-text-left"
- hero_button: "outlined"
- hero_links:
- - name: Github
- url: https://github.com/gadenbuie
- icon: '`r bulma::fa_icon("github")`'
- - name: Home
- url: https://garrickadenbuie.com
- icon: '`r bulma::fa_icon("home")`'
- output: bulma::bulma_document
- ---
-
- ```{r setup, include=FALSE}
- knitr::opts_chunk$set(echo = TRUE)
- library(bulma)
- ```
-
- ## Messages
-
- ### message full with title and delete button
-
- ```{r}
- bulma_message("Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- header = "Hello World", delete = TRUE)
-
- bulma_message("Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- header = "Hello World", delete = TRUE, width = "two-thirds", centered = TRUE)
-
- bulma_message("Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- header = "Hello World", delete = TRUE, width = "half", centered = FALSE)
- ```
-
- ### message full with title no delete button
-
- ```{r}
- bulma_message("Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- header = "Hello World")
- ```
-
- ### message full no title with delete button
-
- ```{r}
- bulma_message("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", delete = TRUE)
- ```
-
- <article class="message">
- <div class="message-header">
- <p></p>
- <button class="delete" aria-label="delete"></button>
- </div>
- <div class="message-body">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div>
- </article>
-
- ### message errors with bad header
-
- ```{r, error=TRUE}
- bulma_message("Test", header = TRUE)
- ```
-
- ### message with colors
-
- ```{r}
- m <- lapply(bulma_constants("colors")[1:10], function(color) {
- bulma_message("Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- header = paste("Color:", color), color = color)
- })
- htmltools::tagList(m)
- ```
-
- ### message body only
-
- ```{r, results="asis"}
- bulma_message("Lorem ipsum dolor sit amet, consectetur adipiscing elit.")
- ```
-
- ### message with size
-
- ```{r, results="asis"}
- m <- lapply(c("small", "medium", "large"), function (size) {
- bulma_message("Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- header = paste("Size:", size), size = size)
- })
- htmltools::tagList(m)
- ```
|