Sfoglia il codice sorgente

Add --variable rmarkdown-will-handle-deps

master
Garrick Aden-Buie 7 anni fa
parent
commit
38d01c5c03
3 ha cambiato i file con 10 aggiunte e 15 eliminazioni
  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 Vedi File

@@ -54,15 +54,6 @@ bulma_document <- function(
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(
htmltools::htmlDependency(
name = "bulma",
@@ -124,6 +115,7 @@ bulma_document <- function(
args = c(
css_files,
pandoc_args,
"--variable", "rmarkdown-will-handle-deps",
"--template",
bulma_file("bulma", "bulma.html")
),
@@ -132,7 +124,7 @@ bulma_document <- function(
clean_supporting = TRUE,
base_format = rmarkdown::html_document_base(
self_contained = TRUE, template = NULL,
pandoc_args = pandoc_args,
# pandoc_args = pandoc_args,
mathjax = mathjax,
extra_dependencies = extra_dependencies
)

+ 5
- 2
inst/bulma/bulma.html Vedi File

@@ -153,8 +153,11 @@ document.addEventListener("DOMContentLoaded", function(event) {
</script>

$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>
gumshoe.init({activeClass: "has-text-weight-semibold"});
const toc = document.querySelector('#toc-aside');

+ 3
- 3
tests/manual/layout/level/bulma_layout_level.Rmd Vedi File

@@ -49,15 +49,15 @@ bulma::bulma_level("Home", "Menu", "Bulma", "Reservations", "Contact")
### Heading/Number Style

```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

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


Loading…
Annulla
Salva