-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathindex.qmd
87 lines (81 loc) · 1.94 KB
/
index.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
execute:
echo: false
page-layout: full
editor_options:
chunk_output_type: console
---
```{r}
#| message: false
library(tidyverse)
library(gt)
library(glue)
workshops <- read_csv("workshops.csv") |>
mutate(
day_1 = glue("[{day_1}](/workshops/{day_1_slug}/)"),
day_2 = glue("[{day_2}](/workshops/{day_2_slug}/)"),
day_2 = if_else(type == "2-day", "", day_2),
day_2_instructor = if_else(type == "2-day", "", day_2_instructor),
day_1_link = glue("[{day_1_link}]({day_1_link})"),
day_2_link = glue("[{day_2_link}]({day_2_link})"),
day_2_link = if_else(type == "2-day", "", day_2_link),
type = paste0("**", type, " workshops**")
) |>
select(-room, -contains("slug"))
```
Choose one of the 2-day workshops or a 1-day workshop for each day.
```{r}
#| results: asis
workshops |>
gt(groupname_col = "type", process_md = TRUE) |>
fmt_url(columns = c(day_1, day_2, day_1_link, day_2_link)) |>
cols_width(
no ~ pct(8),
day_1 ~ pct(46),
day_2 ~ pct(46)
) |>
cols_align(
align = "left",
columns = c(day_1, day_2)
) |>
tab_style(
style = cell_borders(
sides = c("right"),
style = "solid"
),
locations = cells_body(
columns = day_1,
rows = c(5:18)
)
) |>
tab_style(
style = cell_borders(
sides = c("right"),
style = "solid"
),
locations = cells_body(
columns = c(no, day_2),
rows = everything()
)
) |>
cols_merge(
columns = c(day_1, day_1_instructor, day_1_link),
pattern = "{1}<br> {2}<br> {3}"
) |>
cols_merge(
columns = c(day_2, day_2_instructor, day_2_link),
pattern = "{1}<br> {2}<br> {3}"
) |>
tab_style(
style = list(
cell_fill(color = "lightgray")
),
locations = cells_row_groups()
) |>
cols_label(
day_1 = "Day 1 - Sep 17",
day_2 = "Day 2 - Sep 18",
no = ""
) |>
tab_options(quarto.disable_processing = TRUE)
```