-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathindex.Rmd
More file actions
61 lines (49 loc) · 1.17 KB
/
index.Rmd
File metadata and controls
61 lines (49 loc) · 1.17 KB
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
---
title: "Living Data Tutorials"
description: |
Open educational resources from the Living Data Project.
site: distill::distill_website
repository_url: https://github.com/Living-Data-Tutorials/website
creative_commons: CC BY-NC
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
<style>
.zoom {
transition: transform .2s;
}
.zoom:hover {
-ms-transform: scale(1.15); /* IE 9 */
-webkit-transform: scale(1.15); /* Safari 3-8 */
transform: scale(1.15);
}
p {
margin-bottom: 0 !Important;
}
</style>
```{r, results='asis'}
cat("<div style='
display: grid;
grid-template-columns: auto auto auto;
column-gap: 25px;
row-gap: 15px;'>")
## Extract menu item named "Tutorials" in navbar from _site.yaml
right_navbar = yaml::read_yaml("_site.yml")$navbar$right
for(tuts in right_navbar ) {
if( tuts$text == "Tutorials" ) break
}
## Print logos as links to tutorial
for(t in tuts$menu) {
cat("<div class='zoom'>")
if(is.null(t$logo)) {
# print text if no logo provided
cat(glue::glue(""))
}
else {
cat(glue::glue("[]({t$href})"))
}
cat("\n\n</div>")
}
```
<div>