|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <title>RDF4J Javadoc Archives</title> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 7 | + <style> |
| 8 | + :root { |
| 9 | + color-scheme: light dark; |
| 10 | + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; |
| 11 | + line-height: 1.5; |
| 12 | + } |
| 13 | + body { |
| 14 | + margin: 2rem auto; |
| 15 | + max-width: 48rem; |
| 16 | + padding: 0 1.5rem; |
| 17 | + } |
| 18 | + h1 { |
| 19 | + font-size: 2rem; |
| 20 | + margin-bottom: 0.5rem; |
| 21 | + } |
| 22 | + p.description { |
| 23 | + margin-top: 0; |
| 24 | + margin-bottom: 1.5rem; |
| 25 | + color: #555; |
| 26 | + } |
| 27 | + ul { |
| 28 | + list-style: none; |
| 29 | + padding: 0; |
| 30 | + margin: 0; |
| 31 | + } |
| 32 | + li + li { |
| 33 | + margin-top: 0.75rem; |
| 34 | + } |
| 35 | + a { |
| 36 | + color: inherit; |
| 37 | + text-decoration: none; |
| 38 | + border-bottom: 1px solid currentColor; |
| 39 | + } |
| 40 | + a:hover, |
| 41 | + a:focus { |
| 42 | + border-bottom-width: 2px; |
| 43 | + } |
| 44 | + .meta { |
| 45 | + display: block; |
| 46 | + font-size: 0.875rem; |
| 47 | + color: #666; |
| 48 | + margin-top: 0.15rem; |
| 49 | + } |
| 50 | + .empty { |
| 51 | + color: #666; |
| 52 | + font-style: italic; |
| 53 | + } |
| 54 | + </style> |
| 55 | +</head> |
| 56 | +<body> |
| 57 | + <main> |
| 58 | + <h1>RDF4J Javadoc Archives</h1> |
| 59 | + <p class="description"> |
| 60 | + Available Javadoc directories are detected automatically. Choose a version below to open the extracted documentation. |
| 61 | + </p> |
| 62 | + <ul id="javadoc-list"> |
| 63 | + <li class="empty">Loading available directories…</li> |
| 64 | + </ul> |
| 65 | + <p class="description"> |
| 66 | + Looking for older archive files? See the <a href="old/">legacy downloads</a>. |
| 67 | + </p> |
| 68 | + </main> |
| 69 | + <script> |
| 70 | + (function () { |
| 71 | + const list = document.getElementById('javadoc-list'); |
| 72 | + |
| 73 | + function renderEntries(entries) { |
| 74 | + list.innerHTML = ''; |
| 75 | + if (!entries || entries.length === 0) { |
| 76 | + list.innerHTML = '<li class="empty">No directories are currently available.</li>'; |
| 77 | + return; |
| 78 | + } |
| 79 | + |
| 80 | + const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' }); |
| 81 | + entries |
| 82 | + .slice() |
| 83 | + .sort((a, b) => collator.compare(a.name, b.name)) |
| 84 | + .forEach((entry) => { |
| 85 | + const item = document.createElement('li'); |
| 86 | + const link = document.createElement('a'); |
| 87 | + link.href = entry.href; |
| 88 | + link.textContent = entry.name; |
| 89 | + link.setAttribute('rel', 'noopener'); |
| 90 | + link.setAttribute('target', '_blank'); |
| 91 | + item.appendChild(link); |
| 92 | + |
| 93 | + if (entry.lastModified) { |
| 94 | + const meta = document.createElement('span'); |
| 95 | + meta.className = 'meta'; |
| 96 | + const date = new Date(entry.lastModified); |
| 97 | + if (!Number.isNaN(date.valueOf())) { |
| 98 | + meta.textContent = `Last modified ${date.toLocaleString()}`; |
| 99 | + } else { |
| 100 | + meta.textContent = `Last modified ${entry.lastModified}`; |
| 101 | + } |
| 102 | + item.appendChild(meta); |
| 103 | + } |
| 104 | + |
| 105 | + list.appendChild(item); |
| 106 | + }); |
| 107 | + } |
| 108 | + |
| 109 | + function handleError(error) { |
| 110 | + console.error('Failed to load manifest.json', error); |
| 111 | + list.innerHTML = '<li class="empty">Unable to load directory listing.</li>'; |
| 112 | + } |
| 113 | + |
| 114 | + fetch('manifest.json', { cache: 'no-store' }) |
| 115 | + .then((response) => { |
| 116 | + if (!response.ok) { |
| 117 | + throw new Error(`Unexpected response: ${response.status} ${response.statusText}`); |
| 118 | + } |
| 119 | + return response.json(); |
| 120 | + }) |
| 121 | + .then(renderEntries) |
| 122 | + .catch(handleError); |
| 123 | + })(); |
| 124 | + </script> |
| 125 | +</body> |
| 126 | +</html> |
0 commit comments