-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_prefix.qmd
91 lines (74 loc) · 3.62 KB
/
_prefix.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
88
89
90
91
```{r}
#| label: load-packages
#| include: false
#library(tidyverse)
#library(Rfast)
#library(lorem)
#library(knitr)
#library(stringr)
```
```{r}
#| label: card-contents
#| include: false
# The database of invitation cards.
# Each card has: name, title, subtitle, body, link.
card.db <- list(
hosting = c(
"Bring PEER to you!" ,
"Would you like to host a PEER field school?" ,
"Hosting is a great choice if you want to grow or strengthen your local community. Regional field schools typically cover our foundational material over 4-6 days. We’ll work with you to make sure our workshops meet your needs.",
"/model/localhost.qmd"
),
announcements = c(
"Join the list!",
"Curious about other possibilities?" ,
"Don't miss out on PEER events.\n\nJoin our announcements list to hear about upcoming field schools, virtual gateways, and other PEER events.",
"/contact.qmd"
),
upcoming = c(
"Upcoming events",
"Ready to grow your research skills?",
"PEER offers in-person and virtual events for emerging education researchers. Just getting started in education research, or curious about what PEER is like? Join us for a 90-minute virtual gateway workshop. Ready for a longer experience? Apply for an upcoming field school.",
"/events/#upcoming-field-schools"
),
virtual = c(
"Virtual Gateway Workshop",
"Free and online",
"Just getting started in education research, or curious about what PEER is like? Join us for a 90-minute virtual gateway workshop.",
"/events/virtual-gateway"
)
)
```
```{r}
#| label: load-cards
#| include: false
# Handle invitation cards
invitation.cards <- function(card.names=c("upcoming","announcements")) {
card.block <- paste0("::::::: {.quarto-listing .quarto-listing-container-grid .list .grid .quarto-listing-cols-",
length(card.names),
"}\n\n")
for(a in 1:length(card.names)) {
if(card.names[a] %in% names(card.db)) {
card.block <- paste0(card.block,
"::::: {.g-col-1 .card}\n:::: {.card-header .text-center .card-title .bg-primary}\n### ",
card.db[[card.names[a]]][1],
"\n::::\n\n::::{.card-body .text-left}\n:::{.card-subtitle .mb-2 .text-primary}\n",
card.db[[card.names[a]]][2],
"\n:::\n\n",
card.db[[card.names[a]]][3],
"\n\n::::\n\n::::{.card-footer .bg-transparent .border-top-0}\n\n:::{.more-info-button .text-center}\n\n[", card.db[[card.names[a]]][1], "](",
card.db[[card.names[a]]][4],
"){.btn role=\"button\" .btn-primary .rounded-pill}\n:::\n::::\n:::::\n\n"
)
} else {
card.block <- paste0(card.block,
"::::: {.g-col-1 .card}\n",
card.names[a],
" not found. \n:::::\n\n"
)
} #end if
} #end for
card.block <- paste0(card.block,":::::::\n\n")
return(card.block)
} # end function
```