Parcourir la source

Add --variable rmarkdown-will-handle-deps

master
Garrick Aden-Buie il y a 7 ans
Parent
révision
38d01c5c03
3 fichiers modifiés avec 10 ajouts et 15 suppressions
  1. +2
    -10
      R/bulma_document.R
  2. +5
    -2
      inst/bulma/bulma.html
  3. +3
    -3
      tests/manual/layout/level/bulma_layout_level.Rmd

+ 2
- 10
R/bulma_document.R Voir le fichier

css_files <- c(css_files, "--css", css_file) css_files <- c(css_files, "--css", css_file)
} }
} }
# rmarkdown::html_document_base(
# pandoc_args = c(
# css_files,
# pandoc_args,
# "--template",
# system.file("bulma", "bulma.html", package="bulma")
# ),
# ...
# )
deps <- list( deps <- list(
htmltools::htmlDependency( htmltools::htmlDependency(
name = "bulma", name = "bulma",
args = c( args = c(
css_files, css_files,
pandoc_args, pandoc_args,
"--variable", "rmarkdown-will-handle-deps",
"--template", "--template",
bulma_file("bulma", "bulma.html") bulma_file("bulma", "bulma.html")
), ),
clean_supporting = TRUE, clean_supporting = TRUE,
base_format = rmarkdown::html_document_base( base_format = rmarkdown::html_document_base(
self_contained = TRUE, template = NULL, self_contained = TRUE, template = NULL,
pandoc_args = pandoc_args,
# pandoc_args = pandoc_args,
mathjax = mathjax, mathjax = mathjax,
extra_dependencies = extra_dependencies extra_dependencies = extra_dependencies
) )

+ 5
- 2
inst/bulma/bulma.html Voir le fichier

</script> </script>


$if(toc)$ $if(toc)$
<script src="gumshoe.js"></script>
<script src="vanillajs-scrollspy.min.js"></script>
$if(rmarkdown-will-handle-deps)$
$else$
<script src="https://cdnjs.cloudflare.com/ajax/libs/gumshoe/3.5.1/js/gumshoe.min.js"></script>
<script src="https://raw.githubusercontent.com/ederssouza/vanillajs-scrollspy/master/dist/vanillajs-scrollspy.min.js"></script>
$endif$
<script> <script>
gumshoe.init({activeClass: "has-text-weight-semibold"}); gumshoe.init({activeClass: "has-text-weight-semibold"});
const toc = document.querySelector('#toc-aside'); const toc = document.querySelector('#toc-aside');

+ 3
- 3
tests/manual/layout/level/bulma_layout_level.Rmd Voir le fichier

### Heading/Number Style ### Heading/Number Style


```r ```r
bulma_level("Tweets" = 3456, Following = 123, Followers = "456K", Likes = 789, style = "header")
bulma_level("Tweets" = 3456, Following = 123, Followers = "456K", Likes = 789, type = "header")
``` ```


`r bulma_level("Tweets" = 3456, Following = 123, Followers = "456K", Likes = 789, style = "header")`
`r bulma_level("Tweets" = 3456, Following = 123, Followers = "456K", Likes = 789, type = "header")`


#### Dynamic Level #### Dynamic Level


```{r} ```{r}
iris_values <- purrr::map(iris, ~ length(unique(.))) iris_values <- purrr::map(iris, ~ length(unique(.)))
bulma_level(iris_values, style = "header")
bulma_level(iris_values, type = "header")
``` ```



Chargement…
Annuler
Enregistrer