| 1 | <div class="container admin-page">
|
|---|
| 2 | <p><a href="/" class="btn">← Overzicht</a></p>
|
|---|
| 3 | <h1>Mijn Klonkt Hub</h1>
|
|---|
| 4 | <p class="admin-tagline"><%= mySite.title %></p>
|
|---|
| 5 |
|
|---|
| 6 | <nav class="admin-quick-links" aria-label="Beheer-snelkoppelingen">
|
|---|
| 7 | <a href="/user/<%= mySite.slug %>/posts/new" class="btn">✍️ Nieuwe post</a>
|
|---|
| 8 | <a href="/admin/sites/<%= mySite.slug %>/edit" class="btn">🎨 Uiterlijk</a>
|
|---|
| 9 | <a href="/user/<%= mySite.slug %>/admin/comments" class="btn">💬 Reacties</a>
|
|---|
| 10 | <a href="/user/<%= mySite.slug %>" class="btn">👁️ Bekijk mijn site</a>
|
|---|
| 11 | <a href="/account" class="btn">👤 Account</a>
|
|---|
| 12 | </nav>
|
|---|
| 13 |
|
|---|
| 14 | <div class="admin-stats">
|
|---|
| 15 | <div class="stat-card"><div class="stat-num"><%= mine.posts %></div><div class="stat-label">Posts</div></div>
|
|---|
| 16 | <div class="stat-card"><div class="stat-num"><%= mine.published %></div><div class="stat-label">Gepubliceerd</div></div>
|
|---|
| 17 | </div>
|
|---|
| 18 |
|
|---|
| 19 | <% if (typeof posts !== 'undefined' && posts && posts.length) { %>
|
|---|
| 20 | <% var _drafts = posts.filter(function(p){ return p.isDraft; }).length; %>
|
|---|
| 21 | <h2 class="ms-posts-title">Posts<% if (_drafts) { %> <span class="pl-draftcount"><%= _drafts %> concept<%= _drafts === 1 ? '' : 'en' %></span><% } %></h2>
|
|---|
| 22 | <ul class="post-admin-list">
|
|---|
| 23 | <% posts.forEach(function(p) { %>
|
|---|
| 24 | <li class="pal-row<%= p.isDraft ? ' is-draft' : '' %>">
|
|---|
| 25 | <a class="pal-title" href="<%= p.editUrl %>">
|
|---|
| 26 | <% if (p.isDraft) { %><span class="pal-badge">Concept</span><% } %>
|
|---|
| 27 | <span class="pal-name"><%= p.title || '(zonder titel)' %></span>
|
|---|
| 28 | </a>
|
|---|
| 29 | <span class="pal-actions">
|
|---|
| 30 | <a class="pal-link" href="<%= p.editUrl %>">Bewerken</a>
|
|---|
| 31 | <% if (!p.isDraft) { %><a class="pal-link" href="<%= p.viewUrl %>">Bekijk</a><% } %>
|
|---|
| 32 | </span>
|
|---|
| 33 | </li>
|
|---|
| 34 | <% }); %>
|
|---|
| 35 | </ul>
|
|---|
| 36 | <% } %>
|
|---|
| 37 | </div>
|
|---|
| 38 |
|
|---|
| 39 | <style>
|
|---|
| 40 | .admin-page { max-width: 1000px; margin: 3rem auto; padding: 0 1rem; }
|
|---|
| 41 | .admin-page h1 { font-family: var(--font-display, serif); font-size: 2rem; margin: 0 0 0.25rem; }
|
|---|
| 42 | .admin-tagline { color: var(--ink-muted); margin: 0 0 2rem; }
|
|---|
| 43 | .admin-quick-links {
|
|---|
| 44 | display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|---|
| 45 | gap: 0.5rem; margin: 0 0 1.5rem; padding: 0;
|
|---|
| 46 | }
|
|---|
| 47 | .admin-quick-links .btn { justify-content: center; padding: 0.7rem 0.9rem; font-weight: 600; text-align: center; }
|
|---|
| 48 | .admin-quick-links .btn:hover { background: color-mix(in srgb, var(--accent) 8%, var(--paper-2)); border-color: var(--accent); }
|
|---|
| 49 | .admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
|
|---|
| 50 | .stat-card { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.25rem; text-align: center; }
|
|---|
| 51 | .stat-num { font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1; font-family: var(--font-display, serif); }
|
|---|
| 52 | .stat-label { color: var(--ink-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.25rem; }
|
|---|
| 53 |
|
|---|
| 54 | /* Posts/concepten-lijst */
|
|---|
| 55 | .ms-posts-title { font-family: var(--font-display, serif); font-size: 1.4rem; margin: 2rem 0 0.75rem; }
|
|---|
| 56 | .pl-draftcount { font-family: var(--font-ui, system-ui); font-size: 0.8rem; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 0.1rem 0.55rem; border-radius: 99px; vertical-align: middle; }
|
|---|
| 57 | .post-admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
|
|---|
| 58 | .pal-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0.9rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper-2); transition: border-color 120ms; }
|
|---|
| 59 | .pal-row:hover { border-color: var(--accent); }
|
|---|
| 60 | .pal-row.is-draft { border-left: 3px solid var(--accent); }
|
|---|
| 61 | .pal-title { display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; color: var(--ink); text-decoration: none; font-weight: 600; }
|
|---|
| 62 | .pal-title:hover { color: var(--accent); }
|
|---|
| 63 | .pal-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|---|
| 64 | .pal-badge { flex-shrink: 0; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 0.1rem 0.5rem; border-radius: 99px; }
|
|---|
| 65 | .pal-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }
|
|---|
| 66 | .pal-link { color: var(--ink-muted); font-size: 0.85rem; text-decoration: none; white-space: nowrap; }
|
|---|
| 67 | .pal-link:hover { color: var(--accent); text-decoration: underline; }
|
|---|
| 68 | </style>
|
|---|