Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,16 @@ website:
- open-research-cycle.qmd
- text: People
icon: people
# href: people/overview.qmd
menu:
- people.qmd
- leadership.qmd
- boards.qmd
- members.qmd
- people/overview.qmd
- people/management.qmd
- people/staff.qmd
- people/scientific-board.qmd
- people/advisory-board.qmd
- people/members.qmd
- people/fellows.qmd
- people/alumnae.qmd
- href: events.qmd
icon: calendar-event
text: Events
Expand Down Expand Up @@ -94,6 +99,7 @@ format:
css:
- https://raw.githubusercontent.com/lmu-osc/branding-resources/refs/heads/main/styles.css
- custom-navbar.css
- styles.css
toc: true
include-in-header:
- file: matomo_analytics.html
Expand Down
3 changes: 0 additions & 3 deletions boards.qmd

This file was deleted.

3 changes: 0 additions & 3 deletions leadership.qmd

This file was deleted.

3 changes: 0 additions & 3 deletions members.qmd

This file was deleted.

2 changes: 2 additions & 0 deletions people/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

This file describes the structure of the `people/` directory.
5 changes: 3 additions & 2 deletions people/_people_template.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ publications:


<!-- The "includes" below are templates for the different sections of the
member profile pages. Each document returns an R object that contains the
necessary HTML elements to render the section.
member profile pages. Each document returns one or several R objects that
contains the necessary HTML elements to render the section.
1. You can modify these templates to change the layout or content of each section. This will change the layout of all member profiles the next time the site is built.
- Make sure to keep using the HTMLtools functions like `div()`, `p()`, `img()`, etc. to create the HTML structure if you are creating an R object. Otherwise, the HTML will not render correctly--extra <a> tags will be added to your elements and this messes with spacing. Raw HTML, however, will work as expected.
2. You can also create new templates for additional sections if needed.
3. If you want to add some custom content for an individual member, you can do so directly in the member's .QMD file, outside of the includes. You will then need to insert the new R object containing HTML into the `profile` object below.
-->
Expand Down
74 changes: 74 additions & 0 deletions people/add_people_id.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@


file2 <- c("00001_felix example 2.qmd",
"00002_felix example 3.qmd",
"00003_felix example 4.qmd")


# check if file already has 5 leading digits
str_detect(file2, "\\d{5}.*.qmd")

# create string for new max value
find_and_pad_next_id <- function(files) {
# Extract the numeric part from the file names
ids <- str_extract(file2, "\\d{5}") %>%
as.numeric()

# Find the maximum ID and increment it by 1
next_id <- max(ids, na.rm = TRUE) + 1

# Format the new ID with leading zeros
str_pad(as.character(next_id), width = 5, side = "left", pad = "0")
}
# str_extract(file2, "\\d{5}") %>%
# as.numeric() %>%
# {max(.) + 1} %>%
# str_pad(width = 5, side = "left", pad = "0")


# find_current_max_id(file2)

# files <- c(list.files("./people/profiles"), file2)

# untagged_files <- files[!str_detect(files, "\\d{5}.*.qmd")]

# find_and_pad_next_id(file2)

find_current_max_id <- function(files) {
# Extract the numeric part from the file names
ids <- str_extract(files, "\\d{5}") %>%
as.numeric()

# Find the maximum ID
if (all(is.na(ids)) | length(ids) == 0) {
return(0) # If no IDs found, return 0
}
max(ids, na.rm = TRUE)
}

tag_files <- function(files) {
untagged_files <- files[!str_detect(files, "\\d{5}.*.qmd")]
current_max_id <- find_current_max_id(files)
new_labels <- vector("character", length(untagged_files))
vec_position <- 0
for (file in untagged_files) {
vec_position <- vec_position + 1
current_max_id <- current_max_id + 1
new_label <- str_pad(as.character(current_max_id), width = 5, side = "left", pad = "0")
new_labels[vec_position] <- paste0(new_label, "_", file)
}
return(new_labels)
}

# provided a vector with existing number tags
tag_files(files)

# bootstrap from 0 i.e. none of the # files have a 5 digit number tag
files[!str_detect(files, "\\d{5}.*.qmd")] %>%
tag_files()






40 changes: 40 additions & 0 deletions people/advisory-board.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
format:
html:
toc: true
toc-depth: 1
css:
- people.css
page-layout: full
include-in-header:
- text: |
<script src="../assets/javascript/display_name_hover.js" defer></script>
title: "Advisory Board"
editor: source
repo-actions: false
listing:
- id: current-advisory-board-listing
contents: profiles
template: people-listing.ejs
include:
membertype: "current advisory board"
- id: past-advisory-board-listing
contents: profiles
template: people-listing.ejs
include:
membertype: "past advisory board"
---





# Advisory Board
::: {#current-advisory-board-listing}
:::


# Previous Advisory Board
::: {#past-advisory-board-listing}
:::

5 changes: 5 additions & 0 deletions people/alumnae.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "Alumnae"
format: html
---

93 changes: 0 additions & 93 deletions people/felix_example copy 2.qmd

This file was deleted.

93 changes: 0 additions & 93 deletions people/felix_example copy.qmd

This file was deleted.

5 changes: 5 additions & 0 deletions people/fellows.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "Fellows"
format: html
---

Loading