An admin interface that builds itself from the dbbasic modules you install; its pages follow file paths, like CGI.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-admin.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-admin.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-admin.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add automatic TSV discovery and admin handlers 5e2fd8f 1 year, 1 month ago History
themes.html · 30.9 KB · 748 lines
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>Themes - DBBASIC Studio</title>
7 <link rel="stylesheet" href="../../static/css/admin.css">
8</head>
9<body>
10 <div class="studio-container">
11 <header class="studio-header">
12 <div class="logo">
13 <span class="logo-icon">⚡</span>
14 <span class="logo-text">DBBASIC Studio</span>
15 </div>
16 <div class="header-actions">
17 <span class="project-name">myblog/</span>
18 <button class="btn-icon" title="Deploy">🚀</button>
19 <button class="btn-icon" title="Settings">⚙️</button>
20 </div>
21 </header>
22
23 <div class="studio-layout">
24 <nav class="sidebar">
25 <a href="../../index.html" class="nav-item">
26 <span class="nav-icon">📊</span>
27 <span class="nav-label">Dashboard</span>
28 </a>
29 <a href="code.html" class="nav-item">
30 <span class="nav-icon">💻</span>
31 <span class="nav-label">Code</span>
32 </a>
33 <a href="database.html" class="nav-item">
34 <span class="nav-icon">🗄️</span>
35 <span class="nav-label">Database</span>
36 </a>
37 <a href="posts/list.html" class="nav-item">
38 <span class="nav-icon">📝</span>
39 <span class="nav-label">Posts</span>
40 </a>
41 <a href="users/list.html" class="nav-item">
42 <span class="nav-icon">👥</span>
43 <span class="nav-label">Users</span>
44 </a>
45 <a href="themes.html" class="nav-item active">
46 <span class="nav-icon">🎨</span>
47 <span class="nav-label">Themes</span>
48 </a>
49 <div class="nav-divider"></div>
50 <a href="metrics.html" class="nav-item">
51 <span class="nav-icon">📈</span>
52 <span class="nav-label">Metrics</span>
53 </a>
54 <a href="analytics.html" class="nav-item">
55 <span class="nav-icon">📊</span>
56 <span class="nav-label">Analytics</span>
57 </a>
58 <a href="jobs.html" class="nav-item">
59 <span class="nav-icon">⏰</span>
60 <span class="nav-label">Jobs</span>
61 </a>
62 <a href="logs.html" class="nav-item">
63 <span class="nav-icon">📋</span>
64 <span class="nav-label">Logs</span>
65 </a>
66 <a href="deploy.html" class="nav-item">
67 <span class="nav-icon">🚀</span>
68 <span class="nav-label">Deploy</span>
69 </a>
70 <a href="settings.html" class="nav-item">
71 <span class="nav-icon">⚙️</span>
72 <span class="nav-label">Settings</span>
73 </a>
74 </nav>
75
76 <main class="main-content">
77 <div class="content-header">
78 <div>
79 <h1>Themes</h1>
80 <div class="breadcrumb">Home / Themes</div>
81 </div>
82 <div class="header-actions">
83 <button class="btn-secondary">+ Install Theme</button>
84 <button class="btn-primary">Customize</button>
85 </div>
86 </div>
87
88 <!-- Current Theme -->
89 <div class="card">
90 <h2>Current Theme</h2>
91 <div class="current-theme">
92 <div class="theme-preview-large">
93 <img src="https://placehold.co/800x500/3b82f6/ffffff?text=Default+Theme+Preview" alt="Current theme">
94 </div>
95 <div class="current-theme-info">
96 <div class="theme-header">
97 <div>
98 <h3>Default</h3>
99 <div class="theme-meta">by DBBASIC • Version 1.0.0</div>
100 </div>
101 <span class="badge badge-green">Active</span>
102 </div>
103 <p class="theme-description">
104 Clean, modern theme with a focus on readability and simplicity.
105 Perfect for blogs, documentation, and content-focused sites.
106 </p>
107 <div class="theme-features">
108 <div class="feature-tag">✓ Responsive</div>
109 <div class="feature-tag">✓ Dark Mode</div>
110 <div class="feature-tag">✓ SEO Optimized</div>
111 <div class="feature-tag">✓ Fast Loading</div>
112 </div>
113 <div class="theme-actions">
114 <button class="btn-primary">Customize</button>
115 <button class="btn-secondary">Preview Live Site →</button>
116 </div>
117 </div>
118 </div>
119 </div>
120
121 <!-- Available Themes -->
122 <div class="card">
123 <h2>Available Themes</h2>
124 <div class="themes-grid">
125 <!-- Theme 1: Minimal -->
126 <div class="theme-card">
127 <div class="theme-preview">
128 <img src="https://placehold.co/400x300/64748b/ffffff?text=Minimal" alt="Minimal theme">
129 <div class="theme-overlay">
130 <button class="btn-preview">Preview</button>
131 </div>
132 </div>
133 <div class="theme-info">
134 <div class="theme-name">Minimal</div>
135 <div class="theme-author">by DBBASIC</div>
136 <div class="theme-description-short">Ultra-clean design for distraction-free reading</div>
137 <div class="theme-card-actions">
138 <button class="btn-primary-small">Activate</button>
139 <button class="btn-secondary-small">Details</button>
140 </div>
141 </div>
142 </div>
143
144 <!-- Theme 2: Magazine -->
145 <div class="theme-card">
146 <div class="theme-preview">
147 <img src="https://placehold.co/400x300/10b981/ffffff?text=Magazine" alt="Magazine theme">
148 <div class="theme-overlay">
149 <button class="btn-preview">Preview</button>
150 </div>
151 </div>
152 <div class="theme-info">
153 <div class="theme-name">Magazine</div>
154 <div class="theme-author">by DBBASIC</div>
155 <div class="theme-description-short">Grid-based layout perfect for news and media</div>
156 <div class="theme-card-actions">
157 <button class="btn-primary-small">Activate</button>
158 <button class="btn-secondary-small">Details</button>
159 </div>
160 </div>
161 </div>
162
163 <!-- Theme 3: Portfolio -->
164 <div class="theme-card">
165 <div class="theme-preview">
166 <img src="https://placehold.co/400x300/8b5cf6/ffffff?text=Portfolio" alt="Portfolio theme">
167 <div class="theme-overlay">
168 <button class="btn-preview">Preview</button>
169 </div>
170 </div>
171 <div class="theme-info">
172 <div class="theme-name">Portfolio</div>
173 <div class="theme-author">by DBBASIC</div>
174 <div class="theme-description-short">Showcase your work with style and elegance</div>
175 <div class="theme-card-actions">
176 <button class="btn-primary-small">Activate</button>
177 <button class="btn-secondary-small">Details</button>
178 </div>
179 </div>
180 </div>
181
182 <!-- Theme 4: Documentation -->
183 <div class="theme-card">
184 <div class="theme-preview">
185 <img src="https://placehold.co/400x300/f59e0b/ffffff?text=Docs" alt="Documentation theme">
186 <div class="theme-overlay">
187 <button class="btn-preview">Preview</button>
188 </div>
189 </div>
190 <div class="theme-info">
191 <div class="theme-name">Documentation</div>
192 <div class="theme-author">by DBBASIC</div>
193 <div class="theme-description-short">Perfect for technical documentation and guides</div>
194 <div class="theme-card-actions">
195 <button class="btn-primary-small">Activate</button>
196 <button class="btn-secondary-small">Details</button>
197 </div>
198 </div>
199 </div>
200
201 <!-- Theme 5: Business -->
202 <div class="theme-card">
203 <div class="theme-preview">
204 <img src="https://placehold.co/400x300/ef4444/ffffff?text=Business" alt="Business theme">
205 <div class="theme-overlay">
206 <button class="btn-preview">Preview</button>
207 </div>
208 </div>
209 <div class="theme-info">
210 <div class="theme-name">Business</div>
211 <div class="theme-author">by DBBASIC</div>
212 <div class="theme-description-short">Professional theme for corporate websites</div>
213 <div class="theme-card-actions">
214 <button class="btn-primary-small">Activate</button>
215 <button class="btn-secondary-small">Details</button>
216 </div>
217 </div>
218 </div>
219
220 <!-- Theme 6: Dark -->
221 <div class="theme-card">
222 <div class="theme-preview">
223 <img src="https://placehold.co/400x300/1e293b/94a3b8?text=Dark" alt="Dark theme">
224 <div class="theme-overlay">
225 <button class="btn-preview">Preview</button>
226 </div>
227 </div>
228 <div class="theme-info">
229 <div class="theme-name">Dark</div>
230 <div class="theme-author">by DBBASIC</div>
231 <div class="theme-description-short">Beautiful dark mode theme for night reading</div>
232 <div class="theme-card-actions">
233 <button class="btn-primary-small">Activate</button>
234 <button class="btn-secondary-small">Details</button>
235 </div>
236 </div>
237 </div>
238 </div>
239 </div>
240
241 <!-- Theme Customization -->
242 <div class="card">
243 <h2>Theme Customization</h2>
244 <div class="customization-grid">
245 <div class="customization-section">
246 <h3>Colors</h3>
247 <div class="color-pickers">
248 <div class="color-picker-item">
249 <label>Primary Color</label>
250 <div class="color-input">
251 <input type="color" value="#3b82f6">
252 <input type="text" value="#3b82f6" class="form-input-small">
253 </div>
254 </div>
255 <div class="color-picker-item">
256 <label>Background</label>
257 <div class="color-input">
258 <input type="color" value="#ffffff">
259 <input type="text" value="#ffffff" class="form-input-small">
260 </div>
261 </div>
262 <div class="color-picker-item">
263 <label>Text Color</label>
264 <div class="color-input">
265 <input type="color" value="#0f172a">
266 <input type="text" value="#0f172a" class="form-input-small">
267 </div>
268 </div>
269 <div class="color-picker-item">
270 <label>Accent</label>
271 <div class="color-input">
272 <input type="color" value="#10b981">
273 <input type="text" value="#10b981" class="form-input-small">
274 </div>
275 </div>
276 </div>
277 </div>
278
279 <div class="customization-section">
280 <h3>Typography</h3>
281 <div class="typography-controls">
282 <div class="form-group">
283 <label>Font Family</label>
284 <select class="form-select">
285 <option selected>System Default</option>
286 <option>Inter</option>
287 <option>Roboto</option>
288 <option>Open Sans</option>
289 <option>Lora</option>
290 <option>Merriweather</option>
291 </select>
292 </div>
293 <div class="form-group">
294 <label>Base Font Size</label>
295 <select class="form-select">
296 <option>14px</option>
297 <option selected>16px</option>
298 <option>18px</option>
299 <option>20px</option>
300 </select>
301 </div>
302 <div class="form-group">
303 <label>Heading Font</label>
304 <select class="form-select">
305 <option selected>Same as Body</option>
306 <option>Serif</option>
307 <option>Sans Serif</option>
308 <option>Monospace</option>
309 </select>
310 </div>
311 </div>
312 </div>
313
314 <div class="customization-section">
315 <h3>Layout</h3>
316 <div class="layout-controls">
317 <div class="form-group">
318 <label>Max Width</label>
319 <select class="form-select">
320 <option>800px</option>
321 <option>1000px</option>
322 <option selected>1200px</option>
323 <option>1400px</option>
324 <option>Full Width</option>
325 </select>
326 </div>
327 <div class="form-group">
328 <label>Sidebar Position</label>
329 <select class="form-select">
330 <option>No Sidebar</option>
331 <option selected>Right</option>
332 <option>Left</option>
333 </select>
334 </div>
335 <div class="form-group">
336 <label>Header Style</label>
337 <select class="form-select">
338 <option selected>Default</option>
339 <option>Minimal</option>
340 <option>Centered</option>
341 <option>Full Width</option>
342 </select>
343 </div>
344 </div>
345 </div>
346
347 <div class="customization-section">
348 <h3>Features</h3>
349 <div class="features-toggles">
350 <label class="checkbox-label">
351 <input type="checkbox" checked>
352 <span>Dark Mode Toggle</span>
353 </label>
354 <label class="checkbox-label">
355 <input type="checkbox" checked>
356 <span>Search Bar</span>
357 </label>
358 <label class="checkbox-label">
359 <input type="checkbox" checked>
360 <span>Social Share Buttons</span>
361 </label>
362 <label class="checkbox-label">
363 <input type="checkbox">
364 <span>Author Bio</span>
365 </label>
366 <label class="checkbox-label">
367 <input type="checkbox" checked>
368 <span>Related Posts</span>
369 </label>
370 <label class="checkbox-label">
371 <input type="checkbox" checked>
372 <span>Comments Section</span>
373 </label>
374 </div>
375 </div>
376 </div>
377
378 <div class="customization-actions">
379 <button class="btn-secondary">Reset to Defaults</button>
380 <button class="btn-primary">Save Changes</button>
381 </div>
382 </div>
383
384 <!-- Custom CSS -->
385 <div class="card">
386 <h2>Custom CSS</h2>
387 <div class="form-group">
388 <label for="custom_css">Add your own CSS to further customize your theme</label>
389 <textarea id="custom_css" class="form-textarea code-textarea" rows="10" placeholder="/* Your custom CSS here */
390
391.site-header {
392 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
393}
394
395.post-title {
396 font-size: 2.5rem;
397 font-weight: 700;
398}</textarea>
399 </div>
400 <button class="btn-primary">Save Custom CSS</button>
401 </div>
402
403 <!-- Theme Files -->
404 <div class="card">
405 <h2>Theme Files</h2>
406 <div class="theme-files">
407 <div class="file-tree-simple">
408 <div class="file-item">
409 <span class="file-icon">📁</span>
410 <span class="file-name">themes/default/</span>
411 </div>
412 <div class="file-children">
413 <div class="file-item">
414 <span class="file-icon">📄</span>
415 <span class="file-name">base.html</span>
416 <button class="btn-icon-small">✏️</button>
417 </div>
418 <div class="file-item">
419 <span class="file-icon">📄</span>
420 <span class="file-name">home.html</span>
421 <button class="btn-icon-small">✏️</button>
422 </div>
423 <div class="file-item">
424 <span class="file-icon">📄</span>
425 <span class="file-name">post.html</span>
426 <button class="btn-icon-small">✏️</button>
427 </div>
428 <div class="file-item">
429 <span class="file-icon">🎨</span>
430 <span class="file-name">style.css</span>
431 <button class="btn-icon-small">✏️</button>
432 </div>
433 <div class="file-item">
434 <span class="file-icon">⚙️</span>
435 <span class="file-name">theme.json</span>
436 <button class="btn-icon-small">✏️</button>
437 </div>
438 </div>
439 </div>
440 </div>
441 </div>
442
443 <!-- Create Theme -->
444 <div class="card">
445 <h2>Create Your Own Theme</h2>
446 <p>Start with a blank template or duplicate an existing theme to create your own custom design.</p>
447 <div class="create-theme-actions">
448 <button class="btn-secondary">Duplicate Current Theme</button>
449 <button class="btn-primary">Create Blank Theme</button>
450 </div>
451 </div>
452 </main>
453
454 <aside class="ai-assistant">
455 <div class="ai-header">
456 <span class="ai-icon">🤖</span>
457 <span class="ai-title">AI Assistant</span>
458 <button class="ai-toggle">−</button>
459 </div>
460
461 <div class="ai-content">
462 <div class="ai-messages">
463 <div class="ai-message ai-message-assistant">
464 <div class="message-content">
465 I can help you customize your theme, create custom CSS, or build a theme from scratch. What would you like to do?
466 </div>
467 </div>
468 </div>
469
470 <div class="ai-suggestions">
471 <div class="suggestion-title">Try asking:</div>
472 <button class="suggestion-btn">"Make the header sticky"</button>
473 <button class="suggestion-btn">"Add a hero section"</button>
474 <button class="suggestion-btn">"Create a dark mode"</button>
475 <button class="suggestion-btn">"Design a new theme"</button>
476 </div>
477
478 <div class="ai-input">
479 <textarea placeholder="Ask AI about themes..." rows="3"></textarea>
480 <button class="btn-primary">Send</button>
481 </div>
482 </div>
483 </aside>
484 </div>
485 </div>
486
487 <style>
488 .current-theme {
489 display: grid;
490 grid-template-columns: 1fr 1fr;
491 gap: 2rem;
492 }
493
494 .theme-preview-large {
495 border-radius: 0.5rem;
496 overflow: hidden;
497 border: 1px solid var(--color-border);
498 }
499
500 .theme-preview-large img {
501 width: 100%;
502 height: auto;
503 display: block;
504 }
505
506 .current-theme-info {
507 display: flex;
508 flex-direction: column;
509 gap: 1rem;
510 }
511
512 .theme-header {
513 display: flex;
514 justify-content: space-between;
515 align-items: flex-start;
516 }
517
518 .theme-header h3 {
519 font-size: 1.5rem;
520 margin: 0 0 0.25rem 0;
521 }
522
523 .theme-meta {
524 font-size: 0.875rem;
525 color: var(--color-text-muted);
526 }
527
528 .theme-description {
529 color: var(--color-text-muted);
530 line-height: 1.6;
531 }
532
533 .theme-features {
534 display: flex;
535 flex-wrap: wrap;
536 gap: 0.5rem;
537 }
538
539 .feature-tag {
540 padding: 0.375rem 0.75rem;
541 background: var(--color-bg);
542 border-radius: 0.25rem;
543 font-size: 0.875rem;
544 font-weight: 500;
545 }
546
547 .theme-actions {
548 display: flex;
549 gap: 1rem;
550 margin-top: auto;
551 }
552
553 .themes-grid {
554 display: grid;
555 grid-template-columns: repeat(3, 1fr);
556 gap: 1.5rem;
557 }
558
559 .theme-card {
560 border: 1px solid var(--color-border);
561 border-radius: 0.5rem;
562 overflow: hidden;
563 transition: all 0.15s;
564 }
565
566 .theme-card:hover {
567 box-shadow: var(--shadow-lg);
568 }
569
570 .theme-preview {
571 position: relative;
572 overflow: hidden;
573 }
574
575 .theme-preview img {
576 width: 100%;
577 height: auto;
578 display: block;
579 }
580
581 .theme-overlay {
582 position: absolute;
583 inset: 0;
584 background: rgba(0, 0, 0, 0.7);
585 display: flex;
586 align-items: center;
587 justify-content: center;
588 opacity: 0;
589 transition: opacity 0.15s;
590 }
591
592 .theme-card:hover .theme-overlay {
593 opacity: 1;
594 }
595
596 .btn-preview {
597 padding: 0.5rem 1.5rem;
598 background: white;
599 color: var(--color-text);
600 border: none;
601 border-radius: 0.375rem;
602 font-weight: 500;
603 cursor: pointer;
604 }
605
606 .theme-info {
607 padding: 1rem;
608 }
609
610 .theme-name {
611 font-weight: 600;
612 font-size: 1.125rem;
613 margin-bottom: 0.25rem;
614 }
615
616 .theme-author {
617 font-size: 0.875rem;
618 color: var(--color-text-muted);
619 margin-bottom: 0.75rem;
620 }
621
622 .theme-description-short {
623 font-size: 0.875rem;
624 color: var(--color-text-muted);
625 margin-bottom: 1rem;
626 line-height: 1.5;
627 }
628
629 .theme-card-actions {
630 display: flex;
631 gap: 0.5rem;
632 }
633
634 .customization-grid {
635 display: grid;
636 grid-template-columns: repeat(2, 1fr);
637 gap: 2rem;
638 }
639
640 .customization-section h3 {
641 font-size: 1rem;
642 margin-bottom: 1rem;
643 }
644
645 .color-pickers {
646 display: flex;
647 flex-direction: column;
648 gap: 1rem;
649 }
650
651 .color-picker-item label {
652 display: block;
653 font-size: 0.875rem;
654 margin-bottom: 0.5rem;
655 }
656
657 .color-input {
658 display: flex;
659 gap: 0.5rem;
660 align-items: center;
661 }
662
663 .color-input input[type="color"] {
664 width: 3rem;
665 height: 3rem;
666 border: 1px solid var(--color-border);
667 border-radius: 0.375rem;
668 cursor: pointer;
669 }
670
671 .form-input-small {
672 padding: 0.5rem;
673 border: 1px solid var(--color-border);
674 border-radius: 0.375rem;
675 font-family: monospace;
676 flex: 1;
677 }
678
679 .typography-controls,
680 .layout-controls {
681 display: flex;
682 flex-direction: column;
683 gap: 1rem;
684 }
685
686 .features-toggles {
687 display: flex;
688 flex-direction: column;
689 gap: 0.75rem;
690 }
691
692 .customization-actions {
693 display: flex;
694 justify-content: flex-end;
695 gap: 1rem;
696 margin-top: 2rem;
697 padding-top: 2rem;
698 border-top: 1px solid var(--color-border);
699 }
700
701 .code-textarea {
702 font-family: 'Monaco', 'Menlo', monospace;
703 font-size: 0.875rem;
704 }
705
706 .theme-files {
707 background: var(--color-bg);
708 padding: 1rem;
709 border-radius: 0.5rem;
710 }
711
712 .file-tree-simple {
713 font-family: monospace;
714 font-size: 0.875rem;
715 }
716
717 .file-item {
718 display: flex;
719 align-items: center;
720 gap: 0.5rem;
721 padding: 0.5rem;
722 border-radius: 0.25rem;
723 }
724
725 .file-item:hover {
726 background: var(--color-surface);
727 }
728
729 .file-icon {
730 font-size: 1rem;
731 }
732
733 .file-name {
734 flex: 1;
735 }
736
737 .file-children {
738 padding-left: 1.5rem;
739 }
740
741 .create-theme-actions {
742 display: flex;
743 gap: 1rem;
744 margin-top: 1rem;
745 }
746 </style>
747</body>
748</html>