mirror of
https://github.com/kbenestad/mdcms.git
synced 2026-06-18 15:24:32 +00:00
250 lines
7.1 KiB
HTML
250 lines
7.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>MD-CMS Sample Sites</title>
|
|
<style>
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
:root {
|
|
--bg: #0F172A;
|
|
--surface: #1E293B;
|
|
--border: #334155;
|
|
--text: #F1F5F9;
|
|
--muted: #94A3B8;
|
|
--accent: #60A5FA;
|
|
--accent-hover: #93C5FD;
|
|
--btn-bg: #2563EB;
|
|
--btn-hover: #1D4ED8;
|
|
--radius: 10px;
|
|
}
|
|
|
|
body {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
min-height: 100vh;
|
|
padding: 1.5rem 1rem 3rem;
|
|
}
|
|
|
|
header {
|
|
text-align: center;
|
|
margin-bottom: 2rem;
|
|
}
|
|
header h1 {
|
|
font-size: clamp(1.4rem, 4vw, 2rem);
|
|
font-weight: 700;
|
|
letter-spacing: -0.02em;
|
|
color: var(--text);
|
|
}
|
|
header p {
|
|
color: var(--muted);
|
|
font-size: 0.9rem;
|
|
margin-top: 0.4rem;
|
|
}
|
|
|
|
.theme-picker {
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 1rem 1.25rem;
|
|
margin: 0 auto 2rem;
|
|
max-width: 640px;
|
|
}
|
|
.theme-picker label {
|
|
display: block;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.08em;
|
|
color: var(--muted);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
.theme-picker select {
|
|
width: 100%;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
padding: 0.55rem 0.75rem;
|
|
font-size: 0.95rem;
|
|
appearance: none;
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
background-repeat: no-repeat;
|
|
background-position: right 0.75rem center;
|
|
padding-right: 2.25rem;
|
|
cursor: pointer;
|
|
}
|
|
.theme-picker select:focus {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
}
|
|
.theme-picker .hint {
|
|
font-size: 0.78rem;
|
|
color: var(--muted);
|
|
margin-top: 0.45rem;
|
|
}
|
|
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
gap: 1rem;
|
|
max-width: 960px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.card {
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
transition: border-color 0.15s;
|
|
}
|
|
.card:hover { border-color: var(--accent); }
|
|
|
|
.card-body {
|
|
padding: 1.1rem 1.25rem 0.75rem;
|
|
flex: 1;
|
|
}
|
|
.card-body h2 {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
margin-bottom: 0.3rem;
|
|
}
|
|
.card-body p {
|
|
font-size: 0.85rem;
|
|
color: var(--muted);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.open-btn {
|
|
display: block;
|
|
width: 100%;
|
|
background: var(--btn-bg);
|
|
color: #fff;
|
|
border: none;
|
|
padding: 0.65rem 1rem;
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
transition: background 0.15s;
|
|
letter-spacing: 0.01em;
|
|
}
|
|
.open-btn:hover { background: var(--btn-hover); }
|
|
.open-btn:active { background: #1E40AF; }
|
|
|
|
footer {
|
|
text-align: center;
|
|
margin-top: 2.5rem;
|
|
font-size: 0.78rem;
|
|
color: var(--muted);
|
|
}
|
|
footer a { color: var(--accent); text-decoration: none; }
|
|
footer a:hover { text-decoration: underline; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>MD-CMS Sample Sites</h1>
|
|
<p>Pick a theme, then open any site to preview it.</p>
|
|
</header>
|
|
|
|
<div class="theme-picker">
|
|
<label for="theme-select">Theme</label>
|
|
<select id="theme-select">
|
|
<option value="">— site default —</option>
|
|
</select>
|
|
<div class="hint" id="theme-hint">Loading themes…</div>
|
|
</div>
|
|
|
|
<div class="grid">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h2>The Kitchen Table</h2>
|
|
<p>Recipes, techniques, and stories from Amelia Fontaine</p>
|
|
</div>
|
|
<button class="open-btn" onclick="openSite('kitchen-table')">Open →</button>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h2>Modern Philosophy</h2>
|
|
<p>A systematic introduction by Prof. James Okafor</p>
|
|
</div>
|
|
<button class="open-btn" onclick="openSite('modern-philosophy')">Open →</button>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h2>NeuralDB Docs</h2>
|
|
<p>AI-native database with vector and relational capabilities</p>
|
|
</div>
|
|
<button class="open-btn" onclick="openSite('neuraldb-docs')">Open →</button>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h2>TechPulse</h2>
|
|
<p>Independent technology news and analysis</p>
|
|
</div>
|
|
<button class="open-btn" onclick="openSite('techpulse')">Open →</button>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h2>Velox Framework</h2>
|
|
<p>The high-performance TypeScript web framework</p>
|
|
</div>
|
|
<button class="open-btn" onclick="openSite('velox-docs')">Open →</button>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h2>The Wandering Algorithm</h2>
|
|
<p>A novel by Elena Marchetti</p>
|
|
</div>
|
|
<button class="open-btn" onclick="openSite('wandering-algorithm')">Open →</button>
|
|
</div>
|
|
</div>
|
|
|
|
<footer>
|
|
<a href="https://github.com/kbenestad/mdcms" target="_blank">kbenestad/mdcms</a>
|
|
· Delete the <code>gh-pages</code> branch to remove this preview.
|
|
</footer>
|
|
|
|
<script>
|
|
fetch('themes/index.json')
|
|
.then(r => r.json())
|
|
.then(index => {
|
|
const sel = document.getElementById('theme-select');
|
|
let total = 0;
|
|
for (const [cat, themes] of Object.entries(index)) {
|
|
const grp = document.createElement('optgroup');
|
|
grp.label = cat;
|
|
for (const t of themes) {
|
|
const opt = document.createElement('option');
|
|
opt.value = t.slug;
|
|
opt.textContent = t.label;
|
|
grp.appendChild(opt);
|
|
total++;
|
|
}
|
|
sel.appendChild(grp);
|
|
}
|
|
const cats = Object.keys(index).length;
|
|
document.getElementById('theme-hint').textContent =
|
|
total + ' themes across ' + cats + ' categories. Selection applies when you open a site.';
|
|
})
|
|
.catch(() => {
|
|
document.getElementById('theme-hint').textContent =
|
|
'Theme list unavailable. Selection applies when you open a site.';
|
|
});
|
|
|
|
function openSite(slug) {
|
|
const val = document.getElementById('theme-select').value;
|
|
let url = slug + '/';
|
|
if (val) url += '?theme=' + encodeURIComponent('../themes/' + val);
|
|
window.open(url, '_blank');
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|