From 69140abcf10ca2e7322f5dd57f291fa65e5f5ea7 Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 8 Jul 2025 14:48:27 +0200 Subject: [PATCH] Gestion petit MIA-PS --- index.qmd | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/index.qmd b/index.qmd index c5c1b2c..ca8867e 100644 --- a/index.qmd +++ b/index.qmd @@ -28,20 +28,21 @@ format: ```{r} #| output: asis -img_files <- fs::dir_ls("images", glob="*") -back_files <- fs::dir_ls("background", glob="*") +img_files <- fs::dir_ls("images", glob = "*") +back_files <- fs::dir_ls("background", glob = "*") quotes_list <- readLines("quotes.txt") for (img in img_files) { - for (back in back_files){ - for (quote in quotes_list){ - cat("# ", quote, "{background-image='",back,"'}", "\n", - glue::glue("![]({img})"), "{fig-align='center' .r-stretch}\n\n", - sep = "") - } - } + for (back in back_files) { + for (quote in quotes_list) { + cat("# ", quote, " {background-image='", back, "' background-repeat='", ifelse(back == "background/miaps.png", "repeat", "no-repeat"), "' background-size='", ifelse(back == "background/miaps.png", "400px", "100%"), "'}", "\n", + glue::glue("![]({img})"), "{fig-align='center' .r-stretch}\n\n", + sep = "" + ) + } + } }