From 214a2f31b6ce49242d807c07c398fa9088f8520f Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Wed, 11 Sep 2024 15:32:20 +0200 Subject: [PATCH] refactor: :recycle: set project details as a callout block --- R/admin.R | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/R/admin.R b/R/admin.R index f346fa1..980bc46 100644 --- a/R/admin.R +++ b/R/admin.R @@ -160,15 +160,19 @@ admin_create_project <- function(path) { admin_list_projects_as_md <- function(type = "approved") { project_description_template <- " - \n - ### {id}: {project_title} - \n - {project_description} - \n - - Lead author: {full_name}, {job_position} at {affiliation} - - GitHub repository: [github.com/steno-aarhus/{id}](https://github.com/steno-aarhus/{id}) - {doi} - " +\n +::: {{.callout-note appearance='minimal' icon='false' collapse='true'}} +\n +### {id}: {project_title} +\n +{project_description} +\n +- Lead author: {full_name}, {job_position} at {affiliation} +- GitHub repository: [github.com/steno-aarhus/{id}](https://github.com/steno-aarhus/{id}) +{doi} +::: +\n +" admin_read_projects(type) |> purrr::map(\(project) format_doi_as_md_list(project)) |> purrr::map(\(project) glue::glue_data(project, project_description_template)) %>%