-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimeline.html
More file actions
100 lines (88 loc) · 4.16 KB
/
Copy pathtimeline.html
File metadata and controls
100 lines (88 loc) · 4.16 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="favicon.png" sizes="32x32">
<link rel="apple-touch-icon" href="favicon.png">
<title>Chronological Timeline</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<!-- 1. PASTE THIS SIDEBAR ELEMENT RIGHT AT THE TOP OF THE BODY: -->
<div class="book-spine-sidebar">
<div class="spine-text">The Mathematicians' Library</div>
</div>
<!-- 2. WRAP EVERYTHING ELSE INSIDE THIS MAIN CONTAINER: -->
<div class="site-content-wrapper">
<header>
<h1>
The Mathematicians' Library
<span class="stacks-subtitle">
<!-- Elegant, gold-painted nesting symbol to show structural depth -->
<span class="stacks-branch-symbol">§</span>
<span>T</span>he <span>S</span>tacks
</span>
</h1>
<p><i>An online companion to <span class="inline-book-title">The Mathematicians' Library</span> by Thomas K. Briggs - <a href="about.html#buy">order your copy here</a><i></i></p>
<div class="nav-menu">
<span class="nav-label">View books:</span>
<a href="index.html" class="nav-btn" id="nav-chapter">by Chapter</a>
<a href="map.html" class="nav-btn" id="nav-map">on a Map</a>
<a href="timeline.html" class="nav-btn active" id="nav-timeline">on a Timeline</a>
<a href="tags.html" class="nav-btn" id="nav-tags">by Theme</a>
<a href="about.html" class="nav-btn" id="nav-about">About</a>
</div>
</header>
<main>
<h2>Chronological Archive Timeline</h2>
<div class="timeline-container" id="timeline-target"></div>
<footer></footer>
<hr>
<p style="font-style: italic; text-align: center;"> A <a href="https://mathsy.space" target="_blank">MathsyDotSpace</a> project by <a href="https://mathsy.space">TeaKayB</a></p>
</main>
<script>
fetch('data.json')
.then(res => res.json())
.then(books => {
books.sort((a, b) => a.sort_val - b.sort_val);
const container = document.getElementById('timeline-target');
books.forEach(item => {
// Layout A: The Milestone Labelled Line
if (item.type === 'milestone') {
container.innerHTML += `
<div class="timeline-milestone-marker" id="milestone-${item.id}">
<span>— ${item.label} (${item.display_date}) —</span>
</div>`;
}
// Layout B: Cardless Text Historical Context
else if (item.type === 'event') {
container.innerHTML += `
<div class="timeline-item" id="event-${item.id}">
<div class="timeline-event-text">
<strong>${item.display_date} • ${item.title}</strong>
<em>${item.context_description} (📍 Region: ${item.place_name})</em>
</div>
</div>`;
}
// Layout C: Premium Featured Book Card
else if (item.type === 'book' || !item.type) {
container.innerHTML += `
<div class="timeline-item" id="book-${item.id}">
<div class="book-card" style="max-width: 500px;">
<div class="card-title" style="font-size:1.2rem;"><a href="${item.url}">${item.title}</a></div>
<div class="meta-row"><strong>Date:</strong> ${item.display_date} | <strong>Author:</strong> ${item.author}</div>
<div class="meta-row">📍 Located: <a href="map.html?focus=${item.id}">${item.place_name}</a></div>
</div>
</div>`;
}
});
if(window.location.hash) {
const el = document.getElementById(window.location.hash.substring(1));
if(el) setTimeout(() => el.scrollIntoView({ behavior: 'smooth' }), 300);
}
});
</script>
</div>
</body>
</html>