|
| 1 | +# Keynote speakers |
| 2 | + |
| 3 | +```{css, echo = FALSE} |
| 4 | +.justify { |
| 5 | + text-align: justify !important |
| 6 | +} |
| 7 | +``` |
| 8 | + |
| 9 | +```{r results="asis", echo=FALSE} |
| 10 | +# Read the CSV data |
| 11 | +speakers <- read.csv(file.path("..", "data", "keynote_speakers.csv")) |
| 12 | +
|
| 13 | +# Sort by order if specified |
| 14 | +if ("order" %in% colnames(speakers)) { |
| 15 | + speakers <- speakers[order(speakers$order), ] |
| 16 | +} |
| 17 | +
|
| 18 | +# Loop through each speaker |
| 19 | +for (i in 1:nrow(speakers)) { |
| 20 | + x <- speakers[i, ] |
| 21 | + |
| 22 | + cat(":::: {.columns}\n") |
| 23 | + cat("##", x$name, "\n") |
| 24 | + |
| 25 | + # 1st column (text) |
| 26 | + cat("::: {.column width=60%}\n") |
| 27 | + if (!is.na(x$position) && x$position != "") { |
| 28 | + cat("**", x$position, "**\n\n", sep="") |
| 29 | + } |
| 30 | + cat("::: {.justify}\n") |
| 31 | + cat(x$txt, "\n:::\n") |
| 32 | + if (!is.na(x$web) && x$web != "") { |
| 33 | + cat(sprintf("<%s>", x$web), "\n") |
| 34 | + } |
| 35 | + cat(":::\n") |
| 36 | + |
| 37 | + # horizontal spacing |
| 38 | + cat("::: {.column width=1%}\n:::\n") |
| 39 | + |
| 40 | + # 2nd column (image) |
| 41 | + cat("::: {.column width=30%}\n") |
| 42 | + if (!is.na(x$img_path) && x$img_path != "") { |
| 43 | + cat(sprintf("", x$img_path), "\n") |
| 44 | + } else { |
| 45 | + cat("<!-- Image will appear here when added -->\n") |
| 46 | + } |
| 47 | + cat(":::\n") |
| 48 | + cat("::::\n\n") |
| 49 | +} |
| 50 | +``` |
0 commit comments