---
params:
    staff_id: "{{INPUT_STAFF_ID}}"
title: "{{STAFF_NAME}}"
image: "images/staff/{{INPUT_STAFF_ID}}.jpg"
format:
  html:
    page-layout: full
    link-external-newwindow: true
about:
    id: about-block
    template: trestles
    image-shape: round
    links:
      - icon: envelope
        text: "Email"
        href: "mailto:{{INPUT_EMAIL}}"
      - icon: globe
        text: "More"
        href: "{{INPUT_EXTERNAL_LINK}}"
---
   
```{r setup}
#| echo: false
#| warning: false
#| message: false

source("../staff_list.R")
```
::: {#about-block}

```{r bio}
#| results: asis
#| echo: false

staff_member <- staff_list[[params$staff_id]]

cat(staff_member[["bio"]])
```

:::

# Related Projects

```{r list-projects}
#| results: 'asis'
#| echo: false
for (project in project_list) {
    if (staff_member$id %in% project$related_staff) {
        generate_markdown_for_projects(project)
    }
}
```

# Related publications

```{r list-publications}
#| results: 'asis'
#| echo: false
for (publication in publication_list) {
    if (staff_member$id %in% publication$related_staff) {
        generate_markdown_for_publications(publication)
    }
}
```
