Skip to content

Commit

Permalink
[WIP] Add info page to home
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterius committed Oct 16, 2024
1 parent 2b1629c commit 7d0b27c
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
7 changes: 7 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ website:
href: "home_syllabus.html"
- text: "Pre-course"
href: "home_precourse.html"
- text: "Info"
href: "home_info.html"
- icon: "github"
href: "https://github.com/NBISweden/workshop-reproducible-research/"
page-footer:
Expand Down Expand Up @@ -106,3 +108,8 @@ filters:
- assets/custom.lua
- reveal-logo
- fontawesome

# For rendering location the info page; options are Stockholm or online.
# One or more separated by commas or semicolon; online doesn't display any
# location info.
location: stockholm
1 change: 1 addition & 0 deletions env/deploy/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
- r-here
- r-htmltable
- r-kableextra
- r-leaflet
- r-lubridate
- r-palmerpenguins
- r-readxl
Expand Down
66 changes: 66 additions & 0 deletions home_info.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Practical Info
subtitle: Venue, address, travel and contact information
toc: false
number-sections: false
sidebar: false
code-tools: false
format: html
---

```{r}
#| eval: true
#| include: false
library(yaml)
library(here)
library(leaflet)
library(readxl)
# Set location in _quarto.yml
loc <- sapply(unlist(strsplit(yaml::read_yaml(here("_quarto.yml"))$location,";|,")),trimws)
dfr <- readxl::read_xlsx("info.xlsx")
```

## Location

```{r}
#| echo: false
#| eval: true
#| results: "asis"
cat("\n::: {.panel-tabset}\n")
for (i in seq_along(loc)) {
p <- loc[i]
cat(paste0("\n### ", tools::toTitleCase(p), "\n"))
if(p %in% dfr$location){
dfr1 <- dfr[dfr$location %in% p, , drop = FALSE]
dfr1$address <- gsub(",", "<br>", dfr1$address)
icons <- awesomeIcons(icon = dfr1$marker_icon, markerColor = dfr1$marker_colour, iconColor = "#FFFFFF", library = "fa")
if(p != "online") {
cat(knitr::knit_child(input = "assets/_child-info.qmd", envir = environment(), quiet = TRUE))
cat("\n")
cat("\n", dfr1$address[1], "\n")
}
cat("\n", dfr1$description[1])
}else{
cat("No additional information is provided.")
}
cat("\n")
}
cat(":::\n")
```

## Contact

This workshop is run by the **National Bioinformatics Infrastructure Sweden
(NBIS)**. NBIS is a platform at [SciLifeLab](https://www.scilifelab.se/)
(Science For Life Laboratory) and the Swedish node of
[Elixir](https://elixir-europe.org/).

If you would like to get in touch with us regarding this workshop, please contact us at **edu.trr [at] nbis.se**.

***

![](assets/logos/nbis-scilifelab.svg){height="26px"}
Binary file added info.xlsx
Binary file not shown.

0 comments on commit 7d0b27c

Please sign in to comment.