forked from EmilyMarkowitz-NOAA/template_website_cv
-
Notifications
You must be signed in to change notification settings - Fork 2
/
research.Rmd
92 lines (59 loc) · 1.62 KB
/
research.Rmd
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
---
title: "Research Interests"
description: 'Research Interests'
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning=FALSE,
error = FALSE, message = FALSE)
# date: "`r Sys.Date()`"
```
```{r, include = FALSE, eval = FALSE}
#expressly for troubleshooting scripts
# sections <- c("research")
# i<-1
# rmarkdown::render(paste0("./", sections[i], ".Rmd"),
# output_dir = "./docs/",
# output_file = paste0(sections[i], ".html"))
```
```{r}
dat0 <- cv %>%
dplyr::filter(page %in% c("research")) %>%
dplyr::arrange(section_long) %>%
dplyr::mutate(description_bullets = paste0(" - ", loc,
ifelse(is.na(Links_inline),
"",
paste0("\n - ", Links_inline))))
dat0$content <- glue::glue('
<div class = "row">
<div class = "col-md-2">
![]({dat0$img}){{width="100px"}}
</div>
<div class = "col-md-10">
### **{dat0$title}**.
{dat0$description_bullets}
<br>
</div>
</div>
')
dat <- data.frame()
for (i in unique(dat0$section_long)) {
a <- dat0 %>%
dplyr::filter(section_long == i)
dat <- rbind.data.frame(dat,
data.frame("section_long" = i,
"content" = paste(glue::glue('{a$content}
\n\n'), collapse = "")))
}
```
```{r, results='asis'}
# 'Glue' your content together
str <- glue::glue('<br>
<div class="boxed">
## {dat$section_long}
<br>
{dat$content}
</div>
')
# Paste your formatted and finished content in your document.
str
```