-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresources.html
More file actions
424 lines (373 loc) · 18.6 KB
/
resources.html
File metadata and controls
424 lines (373 loc) · 18.6 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" translate="no" class="notranslate" lang="en">
<head>
<title>MANO - Resources | Learning Materials for Manuscript Studies</title>
<meta name="description" content="Freely shared learning materials for manuscript studies from the MANO project. Contribute, download, and explore digital resources for teaching and research.">
<meta name="keywords" content="manuscript studies, resources, teaching materials, open access, learning, digital humanities, MANO, Michela Parma">
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0 shrink-to-fit=no"/>
<meta name="google" content="notranslate"/>
<link rel="canonical" href="https://mano-project.github.io/resources.html"/>
<link rel="icon" type="image/png" href="images/mano-logo_nuovoFont.png">
<link rel="alternate" hreflang="en" href="URL">
<meta property="og:type" content="website">
<meta property="og:title" content="MANO – Resources">
<meta property="og:description" content="Explore shared learning materials for manuscript studies and contribute your own resources.">
<meta property="og:image" content="https://mano-project.github.io/images/mano-logo_nuovoFont.png">
<meta property="og:url" content="https://mano-project.github.io/resources.html">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "MANO – Resources",
"url": "https://mano-project.github.io/resources.html",
"description": "Open learning materials for manuscript studies shared under Creative Commons licenses as part of the MANO project.",
"isPartOf": {
"@type": "EducationalOrganization",
"name": "MANO – Manuscripts Online"
},
"creator": {
"@type": "Person",
"name": "Michela Parma",
"affiliation": "University of Mainz"
}
"inLanguage": "en"
}
</script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
<link rel="stylesheet" type="text/css" href="css/style.css" media="screen"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
<style>
body {
display: flex;
flex-direction: column;
}
.container {
flex: 1;
}
footer {
margin-top: auto; /* push footer to the bottom */
}
</style>
</head>
<body>
<nav class="navbar bg-body-tertiary ">
<div class="container-fluid d-flex justify-content-between align-items-center position-relative py-2">
<!-- Invisible spacer to balance layout -->
<div style="width: 80px;"></div>
<!-- Centered logo -->
<div class="position-absolute start-50 translate-middle-x text-center">
<a class="navbar-brand" href="index.html">
<img src="images/mano-logo_nuovoFont.png" alt="MANO project logo" width="65" class="d-inline-block align-text-top">
</a>
</div>
<!-- Offcanvas toggle aligned right -->
<button class="navbar-toggler" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar"
aria-controls="offcanvasNavbar" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasNavbar" aria-labelledby="offcanvasNavbarLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasNavbarLabel"><MANO></h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<ul class="navbar-nav justify-content-end flex-grow-1 pe-3">
<li class="nav-item"><a class="nav-link" href="index.html">Home</a></li>
<li class="nav-item"><a class="nav-link active" href="resources.html">Resources</a></li>
<li class="nav-item"><a class="nav-link" href="editor.html">Metadata Editor</a></li>
<li class="nav-item"><a class="nav-link" href="collection.html">Metadata Collection</a></li>
<li class="nav-item"><a class="nav-link" href="viewer.html">Transcription Viewer</a></li>
<li class="nav-item"><a class="nav-link" href="documentation.html">Documentation</a></li>
<li class="nav-item"><a class="nav-link" href="about.html">About</a></li>
<hr class="my-3">
<div class="text-center">
<h6 class="mb-3">Participate in shaping the future of <MANO></h6>
<a href="https://survey.zdv.uni-mainz.de/index.php/822542?newtest=Y&lang=en" class="btn btn-sm btn-outline-primary" target="_blank" rel="noopener">Take the user survey</a>
</div>
</ul>
</div>
</div>
</div>
</nav>
<div class="container mt-4">
<button onclick="history.back()" class="btn back-btn btn-sm btn-outline-secondary" aria-label="Go back">Back</button>
<h1 class="page-title">Resources</h1>
<div class="row my-4 align-items-end">
<!-- Left column -->
<div class="col-12 col-md-6 d-flex justify-content-start mb-2 mb-md-0">
<button type="button" class="btn btn-primary responsive-btn" data-bs-toggle="modal" data-bs-target="#infoResources" aria-label="Open About Resources">
<i class="bi bi-info-circle"></i> About
</button>
</div>
<!-- Right column -->
<div class="col-12 col-md-6 d-flex justify-content-start justify-content-md-end">
<a href="https://github.com/mano-project/mano-resources" class="btn btn-primary responsive-btn" target="_blank" rel="noopener noreferrer">
Contribute to the Resources <i class="fab fa-github fa-xl ms-2"></i>
</a>
</div>
</div>
<!-- About Resources -->
<div class="modal fade" id="infoResources" tabindex="-1" aria-labelledby="infoResourcesLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="infoResourcesLabel">About Resources</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>Resources is a shared collection of learning materials for students and researchers in manuscript studies. Each contributor has a personal folder in the MANO GitHub repository where they can upload their PDFs, slides, and other resources. The materials are freely available for students and published under the <a href="https://creativecommons.org/licenses/by-nc/4.0/deed.en" target="_blank">Creative Commons Attribution - NonCommercial (CC BY-NC)</a> license. Anyone can reuse them for educational purposes, but must always credit the author and cannot use them commercially.</p>
<p class="fw-bold">How can I contribute?</p>
<p>All learning materials are stored in the <a href="https://github.com/mano-project/mano-resources" target="_blank">MANO GitHub repository</a>. To contribute, you need a free GitHub account. Once you have it:</p>
<p>
<ol>
<li>Create your personal folder in the MANO Resources repository</li>
<li>Upload your materials (PDFs, slides, etc.) into your folder</li>
<li>Your files will be automatically displayed on this page</li>
</ol>
</p>
<p>
For a step-by-step guide with detailed instructions, click the “Contribute to the Resources” button in this page. It will redirect you to the GitHub repository, where you will find the full documentation and the upload process.</p>
<p>Every contribution helps expand this shared learning resource, and participation in enriching the MANO Resources collection is greatly appreciated.
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-label="Close">Close</button>
</div>
</div>
</div>
</div>
<!-- Search bar -->
<div class="row my-4">
<div class="col-md-6">
<input id="searchInput" class="form-control" type="text"
placeholder="Search..."
oninput="filterTable()">
</div>
</div>
<!-- Teacher Resources Table -->
<div class="table-responsive">
<table class="table table-hover" id="resourcesTable">
<thead>
<tr>
<th>Contributor</th>
<th>Identifier</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="resourcesTableBody">
<!-- Filled dynamically -->
</tbody>
</table>
</div>
</div>
<!-- Modal for learning materials -->
<div class="modal fade" id="materialsModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="materialsModalLabel">Learning materials</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body" id="materialsModalBody">
<!-- Materials list will appear here -->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-label="Close">Close</button>
</div>
</div>
</div>
</div>
<footer class="footer bg-body-tertiary text-center py-4">
<div class="container">
<div class="mb-3">
<a class="navbar-brand" href="index.html">
<img src="images/mano-logo_nuovoFont.png" alt="MANO project logo" width="50">
</a>
</div>
<div class="mb-3">
<a class="footer-link mx-2" href="index.html">Home</a>
<a class="footer-link mx-2" href="resources.html">Resources</a>
<a class="footer-link mx-2" href="editor.html">Metadata Editor</a>
<a class="footer-link mx-2" href="collection.html">Metadata Collection</a>
<a class="footer-link mx-2" href="viewer.html">Transcription Viewer</a>
<a class="footer-link mx-2" href="documentation.html">Documentation</a>
<a class="footer-link mx-2" href="about.html">About</a>
</div>
<div class="text-center mt-2">
<span>© 2025 <span class="mano"><MANO></span></span>
</div>
</div>
</footer>
<div class="py-1 text-center">
<small>
<span class="m-1">
<a href="imprint.html" style="color: black!important">Imprint & Privacy</a>
</span> |
<span class="m-1">
<a href="https://github.com/orgs/mano-project/repositories" target="_blank" style="color: black!important"><i class="fa-brands fa-github"></i> GitHub Repositories</a>
</span> |
<span class="m-1">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" style="color: black!important">CC BY-NC-SA 4.0</a><img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt="Creative Commons" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt="Attribution" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/nc.svg" alt="Non Commercial" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/sa.svg" alt="Share Alike" style="max-width: 1em;max-height:1em;margin-left: .2em;">
</span>
</small>
</div>
<script>
const repoOwner = "mano-project";
const repoName = "mano-resources";
//Detect ORCID/VIAF/GND
function detectIdentifier(folderName) {
const orcid = folderName.match(/\d{4}-\d{4}-\d{4}-\d{4}/);
if (orcid) return { type: "orcid", id: orcid[0] };
const viaf = folderName.match(/VIAF:?(\d+)/i);
if (viaf) return { type: "viaf", id: viaf[1] };
const gnd = folderName.match(/GND:?(\d+)/i);
if (gnd) return { type: "gnd", id: gnd[1] };
return { type: "none", id: null };
}
//ORCID API
async function fetchFromORCID(id) {
try {
const res = await fetch(`https://pub.orcid.org/v3.0/${id}/person`, {
headers: { "Accept": "application/json" }
});
if (!res.ok) return null;
const data = await res.json();
return {
name: `${data.name["family-name"]?.value || ""} ${data.name["given-names"]?.value || ""}`.trim(),
url: `https://orcid.org/${id}`
};
} catch (e) {
console.warn("ORCID fetch failed", e);
return null;
}
}
//VIAF API
async function fetchFromVIAF(id) {
try {
const res = await fetch(`https://viaf.org/viaf/${id}/viaf.json`);
if (!res.ok) return null;
const data = await res.json();
const label = data.mainHeadings?.data?.text || `VIAF ${id}`;
return { name: label, url: `https://viaf.org/viaf/${id}` };
} catch (e) {
console.warn("VIAF fetch failed", e);
return null;
}
}
//GND API
async function fetchFromGND(id) {
try {
const res = await fetch(`https://d-nb.info/gnd/${id}/about/lds.json`);
if (!res.ok) return null;
const data = await res.json();
const person = data["@graph"]?.find(x => x["preferredNameForThePerson"]);
return {
name: person?.preferredNameForThePerson || `GND ${id}`,
url: `https://d-nb.info/gnd/${id}`
};
} catch (e) {
console.warn("GND fetch failed", e);
return null;
}
}
//Fetch top-level folders
async function fetchTeacherFolders() {
const res = await fetch(`https://api.github.com/repos/${repoOwner}/${repoName}/contents`);
if (!res.ok) {
console.error("GitHub API error");
return [];
}
const data = await res.json();
return data.filter(item => item.type === "dir");
}
//Fetch files inside a folder (recursive)
async function fetchFilesInFolder(path) {
const res = await fetch(`https://api.github.com/repos/${repoOwner}/${repoName}/contents/${path}`);
if (!res.ok) return [];
const data = await res.json();
let files = [];
for (const item of data) {
if (item.type === "file" && item.name.toLowerCase().endsWith(".pdf")) {
files.push(item);
} else if (item.type === "dir") {
const subFiles = await fetchFilesInFolder(`${path}/${item.name}`);
files = files.concat(subFiles);
}
}
return files;
}
//Build teacher row with modal button
function addTeacherRow(folderPath, teacher, identifier) {
const tableBody = document.getElementById("resourcesTableBody");
const row = document.createElement("tr");
const idLabel = identifier.id ? `${identifier.type.toUpperCase()} ${identifier.id}` : "—";
const idLink = identifier.id && teacher.url ? `<a href="${teacher.url}" target="_blank">${idLabel}</a>` : idLabel;
row.innerHTML = `
<td>${teacher.name}</td>
<td>${idLink}</td>
<td>
<button class="btn btn-sm btn-primary" onclick="showMaterials('${folderPath}', '${teacher.name.replace(/'/g,"")}')">
Learning materials
</button>
</td>
`;
tableBody.appendChild(row);
}
//Show materials modal
async function showMaterials(folderPath, teacherName) {
const modalTitle = document.getElementById("materialsModalLabel");
const modalBody = document.getElementById("materialsModalBody");
modalTitle.textContent = `${teacherName}`;
modalBody.innerHTML = "<p>Loading materials...</p>";
const files = await fetchFilesInFolder(folderPath);
if (!files.length) {
modalBody.innerHTML = "<p><em>No learning materials found.</em></p>";
} else {
modalBody.innerHTML = `
<ul>
${files.map(f => {
const rawUrl = `https://raw.githubusercontent.com/${repoOwner}/${repoName}/main/${f.path}`;
return `<li><a href="${rawUrl}" target="_blank">${f.name}</a></li>`;
}).join("")}
</ul>
`;
}
const modal = new bootstrap.Modal(document.getElementById("materialsModal"));
modal.show();
}
//Main load function
async function loadResources() {
const folders = await fetchTeacherFolders();
for (const folder of folders) {
const folderName = folder.name;
const identifier = detectIdentifier(folderName);
let teacher = { name: folderName, url: "#" };
if (identifier.type === "orcid") {
const info = await fetchFromORCID(identifier.id);
if (info) teacher = info;
} else if (identifier.type === "viaf") {
const info = await fetchFromVIAF(identifier.id);
if (info) teacher = info;
} else if (identifier.type === "gnd") {
const info = await fetchFromGND(identifier.id);
if (info) teacher = info;
}
addTeacherRow(folder.name, teacher, identifier);
}
}
//Search filter
function filterTable() {
const term = document.getElementById("searchInput").value.toLowerCase();
document.querySelectorAll("#resourcesTableBody tr").forEach(row => {
row.style.display = row.innerText.toLowerCase().includes(term) ? "" : "none";
});
}
// Load resources
loadResources();
</script>
<script src="JS/adjustButtonSize.js"></script>
</body>
</html>