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:
245
assets/css/admin.css
Normal file
245
assets/css/admin.css
Normal 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); }
|
||||
}
|
||||
214
assets/css/style.css
Normal file
214
assets/css/style.css
Normal file
@@ -0,0 +1,214 @@
|
||||
/* === DasPoschi Public CSS === */
|
||||
:root {
|
||||
--bg: #0a0a14;
|
||||
--bg-card: #12121f;
|
||||
--bg-hover: #1a1a2e;
|
||||
--text: #e0e0e0;
|
||||
--text-muted: #8892a4;
|
||||
--accent: #00d4ff;
|
||||
--accent-hover: #00b8d9;
|
||||
--border: #1e1e36;
|
||||
--radius: 8px;
|
||||
--max-width: 1100px;
|
||||
}
|
||||
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
html { scroll-behavior: smooth; }
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
line-height: 1.7;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
|
||||
a:hover { color: var(--accent-hover); }
|
||||
img { max-width: 100%; height: auto; }
|
||||
|
||||
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
|
||||
|
||||
/* === Header === */
|
||||
.site-header {
|
||||
background: var(--bg-card);
|
||||
border-bottom: 1px solid var(--border);
|
||||
position: sticky; top: 0; z-index: 50;
|
||||
}
|
||||
.header-inner {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 16px 20px; gap: 20px;
|
||||
}
|
||||
.site-logo {
|
||||
font-size: 1.5rem; font-weight: 800; color: var(--accent);
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
.site-nav { display: flex; gap: 24px; }
|
||||
.site-nav a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
|
||||
.site-nav a:hover { color: var(--accent); }
|
||||
.menu-toggle {
|
||||
display: none; background: none; border: none;
|
||||
color: var(--text); font-size: 1.5rem; cursor: pointer;
|
||||
}
|
||||
|
||||
/* === Main === */
|
||||
.site-main { flex: 1; padding: 40px 0; }
|
||||
|
||||
/* === Hero === */
|
||||
.hero {
|
||||
text-align: center; padding: 40px 0 32px;
|
||||
}
|
||||
.hero h1 { font-size: 2.5rem; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
|
||||
.hero-subtitle { color: var(--text-muted); font-size: 1.2rem; }
|
||||
|
||||
/* === Category Bar === */
|
||||
.category-bar {
|
||||
display: flex; gap: 8px; justify-content: center;
|
||||
flex-wrap: wrap; margin-bottom: 32px;
|
||||
}
|
||||
.category-tag {
|
||||
display: inline-block; padding: 6px 16px;
|
||||
background: var(--bg-card); border: 1px solid var(--border);
|
||||
border-radius: 20px; color: var(--text-muted);
|
||||
font-size: 0.85rem; font-weight: 500; transition: all 0.2s;
|
||||
}
|
||||
.category-tag:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* === Article Grid === */
|
||||
.article-grid {
|
||||
display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
||||
gap: 24px; margin-bottom: 32px;
|
||||
}
|
||||
|
||||
/* === Article Card === */
|
||||
.article-card {
|
||||
background: var(--bg-card); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); overflow: hidden;
|
||||
transition: transform 0.2s, border-color 0.2s;
|
||||
}
|
||||
.article-card:hover { transform: translateY(-2px); border-color: rgba(0,212,255,0.3); }
|
||||
.card-image img { width: 100%; height: 200px; object-fit: cover; display: block; }
|
||||
.card-body { padding: 20px; }
|
||||
.card-category {
|
||||
display: inline-block; font-size: 0.8rem; font-weight: 600;
|
||||
color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
|
||||
.card-title a { color: var(--text); }
|
||||
.card-title a:hover { color: var(--accent); }
|
||||
.card-excerpt { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 12px; line-height: 1.6; }
|
||||
.card-meta {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
font-size: 0.85rem; color: var(--text-muted);
|
||||
}
|
||||
.read-more { font-weight: 600; }
|
||||
|
||||
/* === Single Article === */
|
||||
.article-single { max-width: 800px; margin: 0 auto; }
|
||||
.article-cover { margin: -20px -20px 32px; border-radius: var(--radius); overflow: hidden; }
|
||||
.article-cover img { width: 100%; max-height: 450px; object-fit: cover; display: block; }
|
||||
.article-header { margin-bottom: 32px; }
|
||||
.article-category {
|
||||
display: inline-block; font-size: 0.8rem; font-weight: 600;
|
||||
color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.article-header h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
|
||||
.article-date { color: var(--text-muted); font-size: 0.95rem; }
|
||||
.article-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
|
||||
.back-link { color: var(--text-muted); font-weight: 500; }
|
||||
.back-link:hover { color: var(--accent); }
|
||||
|
||||
/* === Prose (Article Body) === */
|
||||
.prose { font-size: 1.05rem; line-height: 1.8; }
|
||||
.prose h2 { font-size: 1.6rem; margin: 32px 0 16px; font-weight: 700; }
|
||||
.prose h3 { font-size: 1.3rem; margin: 24px 0 12px; font-weight: 600; }
|
||||
.prose h4 { font-size: 1.1rem; margin: 20px 0 10px; font-weight: 600; }
|
||||
.prose p { margin-bottom: 16px; }
|
||||
.prose ul, .prose ol { margin: 0 0 16px 24px; }
|
||||
.prose li { margin-bottom: 4px; }
|
||||
.prose blockquote {
|
||||
border-left: 3px solid var(--accent); padding: 12px 20px;
|
||||
margin: 20px 0; background: var(--bg-card); border-radius: 0 var(--radius) var(--radius) 0;
|
||||
color: var(--text-muted); font-style: italic;
|
||||
}
|
||||
.prose pre {
|
||||
background: var(--bg-card); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); padding: 16px; overflow-x: auto;
|
||||
margin: 20px 0; font-size: 0.9rem;
|
||||
}
|
||||
.prose code {
|
||||
background: var(--bg-card); padding: 2px 6px;
|
||||
border-radius: 4px; font-size: 0.9em;
|
||||
}
|
||||
.prose pre code { background: none; padding: 0; }
|
||||
.prose img { border-radius: var(--radius); margin: 20px 0; }
|
||||
.prose a { text-decoration: underline; text-underline-offset: 2px; }
|
||||
.prose table {
|
||||
width: 100%; border-collapse: collapse; margin: 20px 0;
|
||||
}
|
||||
.prose th, .prose td {
|
||||
padding: 10px 12px; border: 1px solid var(--border); text-align: left;
|
||||
}
|
||||
.prose th { background: var(--bg-card); font-weight: 600; }
|
||||
|
||||
/* === Static Page === */
|
||||
.static-page { max-width: 800px; margin: 0 auto; }
|
||||
.static-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 24px; }
|
||||
|
||||
/* === Page Header === */
|
||||
.page-header { margin-bottom: 32px; }
|
||||
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
|
||||
.page-description { color: var(--text-muted); font-size: 1.1rem; }
|
||||
|
||||
/* === Pagination === */
|
||||
.pagination {
|
||||
display: flex; gap: 6px; justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.pagination a {
|
||||
padding: 8px 14px; border-radius: var(--radius);
|
||||
background: var(--bg-card); border: 1px solid var(--border);
|
||||
color: var(--text-muted); font-size: 0.9rem; transition: all 0.2s;
|
||||
}
|
||||
.pagination a.active { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
|
||||
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* === 404 === */
|
||||
.error-page { text-align: center; padding: 80px 0; }
|
||||
.error-page h1 { font-size: 6rem; font-weight: 800; color: var(--accent); margin-bottom: 16px; }
|
||||
.error-page p { color: var(--text-muted); font-size: 1.2rem; margin-bottom: 24px; }
|
||||
.btn {
|
||||
display: inline-block; padding: 10px 20px;
|
||||
background: var(--bg-card); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); color: var(--text); font-weight: 500;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.btn:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* === Footer === */
|
||||
.site-footer {
|
||||
padding: 24px 0; border-top: 1px solid var(--border);
|
||||
text-align: center; color: var(--text-muted); font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.empty-state { color: var(--text-muted); text-align: center; padding: 40px 0; }
|
||||
|
||||
/* === Responsive === */
|
||||
@media (max-width: 768px) {
|
||||
.menu-toggle { display: block; }
|
||||
.site-nav {
|
||||
display: none; position: absolute; top: 100%; left: 0; right: 0;
|
||||
background: var(--bg-card); border-bottom: 1px solid var(--border);
|
||||
flex-direction: column; padding: 16px 20px; gap: 12px;
|
||||
}
|
||||
.site-nav.open { display: flex; }
|
||||
.hero h1 { font-size: 1.8rem; }
|
||||
.article-grid { grid-template-columns: 1fr; }
|
||||
.article-header h1 { font-size: 1.6rem; }
|
||||
.article-cover { margin: -20px -10px 24px; }
|
||||
}
|
||||
27
assets/js/admin.js
Normal file
27
assets/js/admin.js
Normal file
@@ -0,0 +1,27 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// Sidebar Toggle (Mobile)
|
||||
var toggle = document.getElementById('sidebarToggle');
|
||||
var sidebar = document.querySelector('.admin-sidebar');
|
||||
if (toggle && sidebar) {
|
||||
toggle.addEventListener('click', function () {
|
||||
sidebar.classList.toggle('open');
|
||||
});
|
||||
// Sidebar schließen bei Klick außerhalb
|
||||
document.addEventListener('click', function (e) {
|
||||
if (sidebar.classList.contains('open') &&
|
||||
!sidebar.contains(e.target) &&
|
||||
e.target !== toggle) {
|
||||
sidebar.classList.remove('open');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Flash-Nachrichten automatisch ausblenden
|
||||
document.querySelectorAll('.flash').forEach(function (el) {
|
||||
setTimeout(function () {
|
||||
el.style.transition = 'opacity 0.5s';
|
||||
el.style.opacity = '0';
|
||||
setTimeout(function () { el.remove(); }, 500);
|
||||
}, 5000);
|
||||
});
|
||||
});
|
||||
16
assets/js/main.js
Normal file
16
assets/js/main.js
Normal file
@@ -0,0 +1,16 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// Mobile Menü Toggle
|
||||
var toggle = document.getElementById('menuToggle');
|
||||
var nav = document.getElementById('siteNav');
|
||||
if (toggle && nav) {
|
||||
toggle.addEventListener('click', function () {
|
||||
nav.classList.toggle('open');
|
||||
});
|
||||
}
|
||||
|
||||
// Lazy Loading für ältere Browser
|
||||
if ('loading' in HTMLImageElement.prototype) return;
|
||||
document.querySelectorAll('img[loading="lazy"]').forEach(function (img) {
|
||||
img.src = img.src;
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user