-
Notifications
You must be signed in to change notification settings - Fork 0
/
pubs.qmd
56 lines (49 loc) · 1.33 KB
/
pubs.qmd
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
---
title: "Publications"
listing:
contents: "pubs/*/index.qmd"
sort:
- "date desc"
- "title"
type: grid
categories: numbered
feed: false
fields: [image, title, subtitle, categories, date]
page-layout: full
editor_options:
chunk_output_type: console
---
```{r, echo = FALSE, include = FALSE}
# Copy timeline.json to _site
file.copy("timeline.json", "_site")
# Copy PDFs to _site
file.copy("docs", "_site", recursive = TRUE)
```
<head>
<link rel="stylesheet" href="https://unpkg.com/d3-milestones/build/d3-milestones.css">
<script src="https://unpkg.com/d3-milestones/build/d3-milestones.min.js"></script>
</head>
<body>
<div id="timeline"></div>
<script>
// Load data from JSON file
fetch('timeline.json')
.then(response => response.json())
.then(data => {
// Process the loaded data
renderMilestones(data);
});
function renderMilestones(data) {
milestones('#timeline')
.mapping({
'timestamp': 'year',
'text': 'lab',
'url': 'url',
'textStyle': 'style'
})
.parseTime('%Y')
.aggregateBy('year')
.render(data);
}
</script>
</body>