feat: add admin API routes for tags, timeline events, uploads, and uses management
Some checks failed
Deploy to VPS / deploy (push) Has been cancelled
Some checks failed
Deploy to VPS / deploy (push) Has been cancelled
- Implemented GET and POST endpoints for managing tags in `src/app/api/admin/tags/route.ts`. - Created PUT and DELETE endpoints for timeline events in `src/app/api/admin/timeline/[id]/route.ts`. - Added GET and POST endpoints for timeline management in `src/app/api/admin/timeline/route.ts`. - Developed file upload functionality with validation in `src/app/api/admin/upload/route.ts`. - Introduced PUT and DELETE endpoints for managing uses items in `src/app/api/admin/uses/[id]/route.ts`. - Added GET and POST endpoints for uses management in `src/app/api/admin/uses/route.ts`. feat: enhance admin UI components for better user experience - Created `AdminSidebar` component for navigation in `src/components/admin/AdminSidebar.tsx`. - Developed `ImageUpload` component for handling image uploads in `src/components/admin/ImageUpload.tsx`. - Implemented `RichTextEditor` component for rich text editing in `src/components/admin/RichTextEditor.tsx`. - Added `TagsInput` component for managing tags in `src/components/admin/TagsInput.tsx`. - Created `TiptapRenderer` component for rendering HTML content in `src/components/writing/TiptapRenderer.tsx`. feat: establish database interaction layer with Prisma - Added database connection and session management in `src/lib/db.ts` and `src/lib/auth.ts`. - Implemented CRUD operations for posts, products, projects, settings, timeline events, and uses items in respective files under `src/lib/db/`. - Introduced utility functions for formatting dates and slug generation in `src/lib/types.ts`.
This commit is contained in:
@@ -87,3 +87,48 @@ body::before {
|
||||
|
||||
/* Focus ring */
|
||||
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
|
||||
/* ── Rich text / Tiptap rendered content ─────────────────────────── */
|
||||
.prose-custom { color: var(--text-primary); line-height: 1.8; }
|
||||
.prose-custom h1 { font-size: 1.875rem; font-weight: 700; margin: 2.5rem 0 1rem; color: var(--text-primary); }
|
||||
.prose-custom h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--text-primary); }
|
||||
.prose-custom h3 { font-size: 1.25rem; font-weight: 600; margin: 1.5rem 0 0.5rem; color: var(--text-primary); }
|
||||
.prose-custom h4 { font-size: 1.125rem; font-weight: 600; margin: 1.25rem 0 0.5rem; color: var(--text-primary); }
|
||||
.prose-custom p { margin-bottom: 1.25rem; color: rgba(250,250,250,0.9); }
|
||||
.prose-custom p:last-child { margin-bottom: 0; }
|
||||
.prose-custom ul { list-style: disc; padding-inline-start: 1.5rem; margin-bottom: 1.25rem; }
|
||||
.prose-custom ol { list-style: decimal; padding-inline-start: 1.5rem; margin-bottom: 1.25rem; }
|
||||
.prose-custom li { margin-bottom: 0.375rem; color: rgba(250,250,250,0.9); }
|
||||
.prose-custom blockquote { border-inline-start: 2px solid var(--accent); padding-inline-start: 1.25rem; margin: 1.5rem 0; color: var(--text-secondary); font-style: italic; }
|
||||
.prose-custom a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
|
||||
.prose-custom a:hover { color: var(--accent-hover); }
|
||||
.prose-custom strong { font-weight: 600; color: var(--text-primary); }
|
||||
.prose-custom em { font-style: italic; }
|
||||
.prose-custom code { background: var(--surface); border: 1px solid var(--border-color); border-radius: 4px; padding: 0.125rem 0.375rem; font-family: var(--font-mono, monospace); font-size: 0.875em; color: var(--accent); }
|
||||
.prose-custom pre { background: var(--surface); border: 1px solid var(--border-color); border-radius: 10px; padding: 1rem; margin: 1.5rem 0; overflow-x: auto; }
|
||||
.prose-custom pre code { background: none; border: none; padding: 0; font-size: 0.875rem; line-height: 1.6; color: var(--text-primary); }
|
||||
.prose-custom hr { border: none; border-top: 1px solid var(--border-color); margin: 2rem 0; }
|
||||
.prose-custom img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border-color); margin: 1.5rem 0; }
|
||||
|
||||
/* Tiptap editor placeholder */
|
||||
.tiptap p.is-editor-empty:first-child::before {
|
||||
content: attr(data-placeholder);
|
||||
float: inline-start;
|
||||
color: var(--text-secondary);
|
||||
pointer-events: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* ── Admin input utility class ────────────────────────────────────── */
|
||||
.admin-input {
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border-color);
|
||||
background: var(--surface-hover);
|
||||
padding: 0.5rem 0.75rem;
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-primary);
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
.admin-input::placeholder { color: var(--text-secondary); }
|
||||
.admin-input:focus { outline: none; border-color: rgba(204,253,101,0.5); box-shadow: 0 0 0 3px rgba(204,253,101,0.08); }
|
||||
.admin-input option { background: var(--surface); color: var(--text-primary); }
|
||||
|
||||
Reference in New Issue
Block a user