xetup/web/changelog/index.html
X9 Dev f89093212f docs: version changelog as 0.7 + add web changelog page
- CHANGELOG.md: switch to Keep a Changelog versioning ([Unreleased], [0.7], [0.6]).
- web/changelog/: new page that fetches CHANGELOG.md from Forgejo (raw API via the
  /forgejo-api proxy) and renders it - single source of truth.
- Add Changelog to the nav on landing, navod and spec pages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 14:07:27 +02:00

155 lines
6.2 KiB
HTML

<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Changelog &ndash; xetup</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<style>
:root {
--bg: #0f1117;
--card: #1a1d27;
--border: #2a2d3a;
--text: #e0e0e0;
--muted: #888;
--accent: #223B47;
--green: #2ea043;
--blue: #58a6ff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg); color: var(--text); min-height: 100vh;
}
header {
border-bottom: 1px solid var(--border); padding: 1rem 2rem;
display: flex; align-items: center; gap: .75rem;
position: sticky; top: 0; background: var(--bg); z-index: 100;
}
.logo-text { font-size: 1.1rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.logo-sub { font-size: .8rem; color: var(--muted); margin-left: .2rem; }
header nav { margin-left: auto; display: flex; gap: 1.5rem; }
header nav a { color: var(--muted); text-decoration: none; font-size: .85rem; transition: color .15s; }
header nav a:hover, header nav a.active { color: var(--text); }
.content { max-width: 760px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
h1 { font-size: 1.9rem; font-weight: 800; color: #fff; letter-spacing: -.03em; margin-bottom: .4rem; }
.subtitle { color: var(--muted); font-size: .95rem; margin-bottom: 2.5rem; }
/* rendered markdown */
.md h2 {
font-size: 1.25rem; font-weight: 800; color: #fff; margin: 2.2rem 0 .3rem;
padding-bottom: .4rem; border-bottom: 1px solid var(--border);
}
.md h2:first-child { margin-top: 0; }
.md h3 {
font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
color: var(--blue); margin: 1.3rem 0 .5rem;
}
.md p { color: var(--muted); font-size: .9rem; line-height: 1.6; margin: .5rem 0; }
.md ul { list-style: none; margin: .3rem 0 .9rem; padding: 0; }
.md li {
color: var(--text); font-size: .89rem; line-height: 1.6;
padding: .35rem 0 .35rem 1.1rem; position: relative; border-bottom: 1px solid rgba(42,45,58,.5);
}
.md li:before { content: "\2022"; color: var(--accent); filter: brightness(2.2); position: absolute; left: .15rem; }
.md strong { color: #fff; font-weight: 600; }
.md em { color: var(--muted); font-style: italic; }
.md code {
background: rgba(255,255,255,.1); padding: .08rem .35rem; border-radius: 4px;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
font-size: .82em; color: var(--blue);
}
.md a { color: var(--blue); text-decoration: none; }
.md a:hover { text-decoration: underline; }
.md hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.loading { color: var(--muted); font-size: .9rem; }
footer {
border-top: 1px solid var(--border); padding: 1.2rem 2rem;
text-align: center; font-size: .8rem; color: var(--muted);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
</style>
</head>
<body>
<header>
<a href="/" style="display:flex;align-items:center;gap:.6rem;text-decoration:none">
<img src="/x9-logo.jpeg" alt="X9.cz" style="height:28px;width:28px;border-radius:5px;object-fit:cover;">
<span class="logo-text">xetup</span><span class="logo-sub">by X9.cz</span>
</a>
<nav>
<a href="/navod/">Navod</a>
<a href="/spec/">Specifikace</a>
<a href="/changelog/" class="active">Changelog</a>
<a href="https://git.xetup.x9.cz/x9/xetup">Git</a>
</nav>
</header>
<div class="content">
<h1>Changelog</h1>
<p class="subtitle">Historie zmen &ndash; nacitano z <code>CHANGELOG.md</code> v repozitari</p>
<div class="md" id="md"><p class="loading">Nacitam changelog...</p></div>
</div>
<footer>
&copy; 2026 <a href="https://x9.cz">X9.cz s.r.o.</a>
&nbsp;&middot;&nbsp;
<a href="/">xetup.x9.cz</a>
&nbsp;&middot;&nbsp;
<a href="https://git.xetup.x9.cz/x9/xetup/raw/branch/main/CHANGELOG.md">Raw</a>
</footer>
<script>
(function () {
var API = '/forgejo-api';
var REPO = 'x9/xetup';
function esc(s) {
return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
function inline(s) {
s = esc(s);
s = s.replace(/`([^`]+)`/g, '<code>$1</code>');
s = s.replace(/\*\*([^*]+)\*\*/g, '<strong>$1</strong>');
s = s.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" target="_blank" rel="noopener">$1</a>');
s = s.replace(/(^|[\s(])_([^_]+)_/g, '$1<em>$2</em>');
return s;
}
function render(md) {
var lines = md.replace(/\r/g, '').split('\n');
var html = '', inList = false;
function closeList() { if (inList) { html += '</ul>'; inList = false; } }
for (var i = 0; i < lines.length; i++) {
var ln = lines[i];
if (/^# /.test(ln)) { closeList(); continue; } // page already has H1
if (/^## /.test(ln)) { closeList(); html += '<h2>' + inline(ln.slice(3)) + '</h2>'; continue; }
if (/^### /.test(ln)) { closeList(); html += '<h3>' + inline(ln.slice(4)) + '</h3>'; continue; }
if (/^---\s*$/.test(ln)) { closeList(); html += '<hr>'; continue; }
if (/^- /.test(ln)) { if (!inList) { html += '<ul>'; inList = true; } html += '<li>' + inline(ln.slice(2)) + '</li>'; continue; }
if (/^\s+\S/.test(ln) && inList) { // wrapped continuation of a bullet
html = html.replace(/<\/li>$/, ' ' + inline(ln.trim()) + '</li>');
continue;
}
if (/^\s*$/.test(ln)) { closeList(); continue; }
closeList(); html += '<p>' + inline(ln.trim()) + '</p>';
}
closeList();
return html;
}
fetch(API + '/repos/' + REPO + '/raw/CHANGELOG.md')
.then(function (r) { if (!r.ok) throw new Error(r.status); return r.text(); })
.then(function (md) { document.getElementById('md').innerHTML = render(md); })
.catch(function () {
document.getElementById('md').innerHTML =
'<p>Changelog se nepodarilo nacist. Otevri jej primo v repozitari: ' +
'<a href="https://git.xetup.x9.cz/x9/xetup/src/branch/main/CHANGELOG.md">CHANGELOG.md</a>.</p>';
});
})();
</script>
</body>
</html>