Initiales CMS: Deutschsprachiges Blog-System mit Admin-Bereich

Vollständiges, schlankes PHP/SQLite-CMS für IT-, KI- und Gaming-Inhalte:

- Core: DB-Singleton, Auth mit Passwort-Hashing, Session-Cookies,
  CSRF-Schutz, Login-Rate-Limit, Bild-Upload mit serverseitiger Validierung
- Admin: Dashboard, Artikel/Seiten-Verwaltung mit Quill WYSIWYG-Editor,
  Kategorien, Navigation (Drag & Drop), Medienbibliothek, Profil
- Frontend: Responsive Dark-Theme, Artikel-Grid, Kategorie-Filter,
  Archiv, Paginierung, SEO-Meta-Tags
- Sicherheit: Prepared Statements, HTML-Sanitizer, .htaccess-Schutz
  für sensible Verzeichnisse, PHP-Ausführungsschutz im Upload-Ordner
- Installation: install.php erstellt DB-Schema und Admin-Account

https://claude.ai/code/session_01Xsg4j2t4S9goMuWVpF3ezG
This commit is contained in:
Claude
2026-04-05 20:59:52 +00:00
commit 3c97192386
45 changed files with 2839 additions and 0 deletions

245
assets/css/admin.css Normal file
View File

@@ -0,0 +1,245 @@
/* === DasPoschi Admin CSS === */
:root {
--bg-dark: #0f0f1a;
--bg-card: #1a1a2e;
--bg-sidebar: #16213e;
--bg-input: #0f3460;
--text: #e0e0e0;
--text-muted: #8892a4;
--accent: #00d4ff;
--accent-hover: #00b8d9;
--success: #00d474;
--warning: #ffb800;
--danger: #ff4757;
--border: #2a2a4a;
--radius: 6px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg-dark);
color: var(--text);
line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
/* === Login === */
.login-page {
display: flex; align-items: center; justify-content: center;
min-height: 100vh;
}
.login-container {
width: 100%; max-width: 400px; padding: 20px;
}
.login-logo {
text-align: center; font-size: 2rem; color: var(--accent);
margin-bottom: 30px;
}
.login-form .form-group { margin-bottom: 16px; }
.login-form label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.9rem; }
.login-form input {
width: 100%; padding: 10px 12px;
background: var(--bg-input); border: 1px solid var(--border);
border-radius: var(--radius); color: var(--text); font-size: 1rem;
}
.login-form input:focus { outline: none; border-color: var(--accent); }
/* === Layout === */
.admin-body { display: flex; min-height: 100vh; }
.admin-sidebar {
width: 240px; background: var(--bg-sidebar);
display: flex; flex-direction: column;
position: fixed; top: 0; left: 0; bottom: 0;
z-index: 100; transition: transform 0.3s;
}
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.sidebar-logo { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.sidebar-nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.sidebar-nav a, .sidebar-footer a {
display: block; padding: 10px 20px; color: var(--text-muted);
transition: all 0.2s; font-size: 0.95rem;
}
.sidebar-nav a:hover, .sidebar-footer a:hover { background: rgba(0,212,255,0.1); color: var(--text); }
.sidebar-nav a.active { color: var(--accent); background: rgba(0,212,255,0.08); border-right: 3px solid var(--accent); }
.sidebar-footer { border-top: 1px solid var(--border); padding: 10px 0; }
.admin-main { flex: 1; margin-left: 240px; }
.admin-topbar {
display: flex; align-items: center; gap: 16px;
padding: 16px 24px; background: var(--bg-card);
border-bottom: 1px solid var(--border);
}
.admin-topbar h2 { flex: 1; font-size: 1.2rem; font-weight: 600; }
.topbar-user { color: var(--text-muted); font-size: 0.9rem; }
.sidebar-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }
.admin-content { padding: 24px; }
/* === Cards === */
.card {
background: var(--bg-card); border-radius: var(--radius);
padding: 20px; margin-bottom: 20px;
border: 1px solid var(--border);
}
.card h3 { margin-bottom: 16px; font-size: 1.1rem; }
.card h4 { margin-bottom: 12px; font-size: 1rem; color: var(--text-muted); }
.card-header {
display: flex; justify-content: space-between; align-items: center;
margin-bottom: 16px;
}
.card-header h3 { margin-bottom: 0; }
.sidebar-card { margin-bottom: 16px; }
.sidebar-card label { display: block; margin-bottom: 6px; cursor: pointer; }
/* === Dashboard Stats === */
.dashboard-stats {
display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 16px; margin-bottom: 24px;
}
.stat-card {
background: var(--bg-card); border: 1px solid var(--border);
border-radius: var(--radius); padding: 24px; text-align: center;
}
.stat-number { display: block; font-size: 2.5rem; font-weight: 700; color: var(--accent); }
.stat-label { color: var(--text-muted); font-size: 0.9rem; }
/* === Tables === */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
padding: 10px 12px; text-align: left;
border-bottom: 1px solid var(--border);
}
.table th { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table tr:hover { background: rgba(255,255,255,0.02); }
/* === Buttons === */
.btn {
display: inline-block; padding: 8px 16px;
background: var(--bg-input); color: var(--text);
border: 1px solid var(--border); border-radius: var(--radius);
font-size: 0.9rem; cursor: pointer; transition: all 0.2s;
text-align: center;
}
.btn:hover { background: var(--border); color: var(--text); }
.btn-primary { background: var(--accent); color: var(--bg-dark); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); color: var(--bg-dark); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.btn-block { display: block; width: 100%; }
/* === Forms === */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.9rem; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="datetime-local"], select, textarea {
width: 100%; padding: 10px 12px;
background: var(--bg-input); border: 1px solid var(--border);
border-radius: var(--radius); color: var(--text); font-size: 0.95rem;
font-family: inherit;
}
input:focus, select:focus, textarea:focus {
outline: none; border-color: var(--accent);
}
textarea { resize: vertical; min-height: 80px; }
input[type="file"] { padding: 8px 0; background: none; border: none; }
.form-row { display: flex; gap: 24px; }
.form-col-8 { flex: 2; }
.form-col-4 { flex: 1; min-width: 260px; }
.form-row-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row-inline .form-group { flex: 1; min-width: 150px; }
.edit-form hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.inline-form { display: inline; }
/* === Badges === */
.badge {
display: inline-block; padding: 2px 8px;
border-radius: 12px; font-size: 0.8rem; font-weight: 600;
}
.badge-success { background: rgba(0,212,116,0.15); color: var(--success); }
.badge-warning { background: rgba(255,184,0,0.15); color: var(--warning); }
/* === Flash Messages === */
.flash {
padding: 12px 16px; border-radius: var(--radius);
margin-bottom: 16px; font-size: 0.95rem;
}
.flash-success { background: rgba(0,212,116,0.1); border: 1px solid var(--success); color: var(--success); }
.flash-error { background: rgba(255,71,87,0.1); border: 1px solid var(--danger); color: var(--danger); }
/* === Pagination === */
.pagination {
display: flex; gap: 4px; margin-top: 16px; justify-content: center;
}
.pagination a {
padding: 6px 12px; border-radius: var(--radius);
background: var(--bg-input); color: var(--text-muted);
}
.pagination a.active { background: var(--accent); color: var(--bg-dark); font-weight: 600; }
.pagination a:hover { background: var(--border); color: var(--text); }
/* === Actions === */
.actions { white-space: nowrap; display: flex; gap: 6px; align-items: center; }
/* === Cover Preview === */
.cover-preview { margin-bottom: 12px; }
.cover-preview img { width: 100%; border-radius: var(--radius); margin-bottom: 8px; }
/* === Upload Zone === */
.upload-zone {
border: 2px dashed var(--border); border-radius: var(--radius);
padding: 40px; text-align: center; cursor: pointer;
transition: all 0.2s; position: relative;
}
.upload-zone:hover, .upload-zone.dragover {
border-color: var(--accent); background: rgba(0,212,255,0.05);
}
.upload-zone input[type="file"] {
position: absolute; top: 0; left: 0; width: 100%; height: 100%;
opacity: 0; cursor: pointer;
}
/* === Media Grid === */
.media-grid {
display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 16px;
}
.media-item {
background: var(--bg-input); border-radius: var(--radius);
overflow: hidden; border: 1px solid var(--border);
}
.media-item img { width: 100%; height: 140px; object-fit: cover; display: block; }
.media-actions {
padding: 8px; display: flex; gap: 4px; flex-wrap: wrap;
}
/* === Quill Editor === */
.ql-toolbar.ql-snow { background: var(--bg-input); border-color: var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.ql-container.ql-snow { border-color: var(--border); border-radius: 0 0 var(--radius) var(--radius); min-height: 300px; }
.ql-editor { color: var(--text); font-size: 1rem; line-height: 1.7; }
.ql-snow .ql-stroke { stroke: var(--text-muted); }
.ql-snow .ql-fill { fill: var(--text-muted); }
.ql-snow .ql-picker-label { color: var(--text-muted); }
.ql-snow .ql-picker-options { background: var(--bg-card); border-color: var(--border); }
.empty-state { color: var(--text-muted); padding: 20px 0; }
/* === Responsive === */
@media (max-width: 768px) {
.admin-sidebar { transform: translateX(-100%); }
.admin-sidebar.open { transform: translateX(0); }
.admin-main { margin-left: 0; }
.sidebar-toggle { display: block; }
.form-row { flex-direction: column; }
.form-col-4 { min-width: auto; }
.form-row-inline { flex-direction: column; }
.dashboard-stats { grid-template-columns: repeat(2, 1fr); }
}