Skip to content

Commit

Permalink
docs(sessions): 📝 move schedule to be Markdown table, not use R (#43)
Browse files Browse the repository at this point in the history
## Description

This starts removing the need for R in the website and so it builds. Now
the schedule is a Markdown table that can be directly edited now.

## Reviewer Focus

This PR needs a quick review. 

## Checklist

- [x] Ran spell-check
- [x] Formatted Markdown
- [x] Rendered website locally
  • Loading branch information
lwjohnst86 authored Sep 26, 2024
1 parent a6026cf commit c7e850d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 70 deletions.
9 changes: 0 additions & 9 deletions preamble/_schedule-days.qmd

This file was deleted.

27 changes: 0 additions & 27 deletions preamble/schedule.csv

This file was deleted.

75 changes: 41 additions & 34 deletions preamble/schedule.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,45 @@ and others may be longer. Instead, it is meant to be an approximate
guide and overview.

::: panel-tabset
```{r schedule-table}
#| eval: true
#| echo: false
#| output: asis
library(dplyr)
add_link <- function(text, icon, link) {
colour <- "#138d75"
added_link <- paste0("<i class='fa-solid fa-", icon, "' style='color:", colour, "'></i>&nbsp;&nbsp;<a href=\"", link, "\">", text, "</a>")
if (link == "") {
added_link <- paste0("<i class='fa-solid fa-", icon, "' style='color:", colour, "'></i>&nbsp;&nbsp;", text)
}
return(htmltools::HTML(added_link))
}
schedule <- here::here("preamble/schedule.csv") %>%
readr::read_csv(col_types = "ccccc") %>%
mutate(across(everything(), ~ if_else(is.na(.x), "", .x))) %>%
mutate(
`Session topic` = list(`Session topic`, icon, link) %>%
purrr::pmap(~ add_link(..1, ..2, ..3)) %>%
unlist()
) %>%
select(-icon, -link)
unique(schedule$Day) %>%
purrr::map_chr( \(day) {
knitr::knit_child(
input = here::here("preamble/_schedule-days.qmd"),
envir = environment(),
quiet = TRUE
)
}) %>%
cat(sep = "\n")
```
## Day 1

| Time | Session topic |
|------------------------------------|------------------------------------|
| 9:30 | {{< fa mug-hot >}} Arrival. Coffee and snacks |
| 10:00 | [{{< fa person-chalkboard >}} Introduction to the course](../sessions/introduction.qmd) |
| 10:30 | [{{< fa laptop-code >}} TBD]() |
| 12:30 | {{< fa utensils >}} Lunch |
| 13:15 | [{{< fa user-group >}} Networking and social activity](../appendix/social.qmd#social-day-one) |
| 13:35 | [{{< fa laptop-code >}} TBD]() |
| 14:30 | {{< fa mug-hot >}} Break with coffee and snacks |
| 15:30 | [{{< fa laptop-code >}} TBD]() |
| 17:00 | [{{< fa comment-dots >}} End of day survey]() |

## Day 2

| Time | Session topic |
|------------------------------------|------------------------------------|
| 9:00 | [{{< fa laptop-code >}} TBD]() |
| 10:15 | {{< fa mug-hot >}} Break with coffee and snacks |
| 10:30 | [{{< fa laptop-code >}} TBD]() |
| 12:15 | {{< fa utensils >}} Lunch |
| 13:00 | [{{< fa user-group >}} Networking and social activity](../appendix/social.qmd#social-day-two) |
| 13:20 | TBD |
| 14:45 | {{< fa mug-hot >}} Break with coffee and snacks |
| 15:00 | TBD |
| 17:00 | [{{< fa comment-dots >}} End of day survey]() |

## Day 3

| Time | Session topic |
|------------------------------------|------------------------------------|
| 9:00 | [{{< fa laptop-code >}} TBD]() |
| 10:15 | {{< fa mug-hot >}} Break with coffee and snacks |
| 11:00 | [{{< fa laptop-code >}} TBD]() |
| 12:15 | {{< fa utensils >}} Lunch |
| 13:00 | [{{< fa user-group >}} Group project](../appendix/group-project.qmd) |
| 14:45 | {{< fa mug-hot >}} Break with coffee and snacks |
| 16:00 | [{{< fa user-group >}} Group project](../appendix/group-project.qmd) |
| 16:20 | [{{< fa person-chalkboard >}} Closing remarks](../sessions/what-next.qmd) |
| 16:45 | [{{< fa comment-dots >}} Short survey and farewell]() |
:::

0 comments on commit c7e850d

Please sign in to comment.