Skip to content

Commit 0f80dbd

Browse files
ake123TuomasBorman
andauthored
Add page for keynote speakers #24 (#25)
* #12,#22 * merge files * merge files * Delete data/.DS_Store * up * add speakers page * up --------- Co-authored-by: Tuomas Borman <[email protected]>
1 parent 50f851e commit 0f80dbd

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

_quarto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ website:
1414
collapse-below: lg
1515
right:
1616
#- href: pages/schedule.qmd
17-
#- href: pages/speakers.qmd
17+
- href: pages/speakers.qmd
1818
- href: pages/submissions.qmd
1919
#- href: pages/registration.qmd
2020
#- href: pages/carpentry-workshops.qmd

pages/speakers.qmd

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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("![](../images/keynote_speakers/%s)", 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

Comments
 (0)