feat: initial release of pengzhan.dev personal editorial blog platform
- Editorial web platform built with Node.js, Express, EJS, and Vanilla CSS - Markdown content engine with YAML frontmatter, bilingual variants, and hot-reload watcher - Unified SQLite with FTS5 search indexing, query logging, and schema filters - Centered editorial post layout with margin-docked left TOC and mobile bottom sheet - WordPress-grade comment system with moderation dashboard and bulk operations under /guanli - Complete SEO suite (JSON-LD structured data, RSS/Atom feeds, XML sitemap, robots.txt) - CI/CD workflows for linting, security audits (Gitleaks), automated tests, and Docker releases
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<%- include('../partials/head', { pageType: 'admin' }) %>
|
||||
|
||||
<div class="content-container" style="max-width: 460px; margin: 4.5rem auto; text-align: center;">
|
||||
<h1 style="font-size: 2.2rem; margin-bottom: 0.5rem; font-family: var(--font-serif); font-weight: 400;">Admin Dashboard</h1>
|
||||
<p style="color: var(--color-text-secondary); margin-bottom: 2rem; font-size: 0.95rem;">Please enter your administrative password to manage comments and SEO audits.</p>
|
||||
|
||||
<% if (typeof error !== 'undefined' && error) { %>
|
||||
<div style="background-color: #fde8e8; border: 1px solid #f8b4b4; color: #9b1c1c; padding: 0.85rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.75rem; font-size: 0.92rem; text-align: left;">
|
||||
<%= error %>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<div style="background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 2.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04);">
|
||||
<form action="/guanli/login" method="POST" style="display: flex; flex-direction: column; gap: 1.25rem;">
|
||||
<input type="hidden" name="redirect" value="<%= typeof redirect !== 'undefined' ? redirect : '/guanli/comments' %>">
|
||||
|
||||
<div class="form-group" style="text-align: left;">
|
||||
<label for="adminPassword" class="form-label form-label-modern">Admin Password</label>
|
||||
<input type="password" id="adminPassword" name="key" required placeholder="Enter password" class="form-input form-input-modern" autofocus>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary" style="width: 100%; padding: 0.75rem;">Sign In</button>
|
||||
</form>
|
||||
|
||||
<div style="margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--color-border); font-size: 0.85rem; color: var(--color-text-muted); text-align: left; line-height: 1.5;">
|
||||
<strong>Note:</strong> Default local password is <code style="background: var(--color-surface-soft); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); color: var(--color-text-main);">admin</code>. You can configure this in <code style="background: var(--color-surface-soft); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono);">config.yaml</code> under <code style="background: var(--color-surface-soft); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono);">admin.secret</code> or via the <code style="background: var(--color-surface-soft); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono);">ADMIN_SECRET</code> environment variable.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%- include('../partials/foot', { pageType: 'admin' }) %>
|
||||
Reference in New Issue
Block a user