::: {style='text-align: right'} Manual{.button} Download Rmd{download=minidown.Rmd .button} :::

file.copy(
  system.file(package = "minidown", "rmarkdown", "templates", "mini_document", "skeleton", "skeleton.Rmd"),
  "skeleton.Rmd",
  overwrite = TRUE
)

all_framework <- identical(
  rmarkdown::metadata$output[["minidown::mini_document"]]$framework,
  "all"
)

```{=html}

```r
htmltools::tags$aside(htmltools::tags$p(
  htmltools::tags$label("Framework:", "for" = "select-framework"),
  htmltools::tags$select(
    purrr::imap(minidown:::frameworks, function(framework, nm) {
      htmltools::tags$option(
        nm, value = nm, "data-version" = framework$version
      )
    }),
    id = "select-framework",
    `data-minidown` = packageVersion("minidown")
  ),
  htmltools::tags$label("Theme:", id = "label-select-theme"),
  purrr::imap(minidown:::frameworks, function(framework, fnm) {
    htmltools::tags$select(
      purrr::map(names(framework$stylesheet), function(tnm) {
        htmltools::tags$option(tnm, value = paste0(fnm, '-', tnm, '.css'))
      }),
      id = paste0("select-theme-", fnm)
    )
  }),
  htmltools::tags$button("Apply!", id = "button-go")
), id = "aside-select-framework")


atusy/minidown documentation built on Feb. 19, 2022, 10:34 a.m.