]> git.morado.dev Git - blog.morado.dev/commitdiff
Fix minor UI
authorRoberto Morado <roramigator@duck.com>
Mon, 10 Nov 2025 00:53:12 +0000 (19:53 -0500)
committerRoberto Morado <roramigator@duck.com>
Mon, 10 Nov 2025 00:53:12 +0000 (19:53 -0500)
main.ts

diff --git a/main.ts b/main.ts
index 6e772f4ba229d0f4607a59ec471e784d95278c03..a416f34b86ac1c0c429ab3b5c36a518a0fa69623 100644 (file)
--- a/main.ts
+++ b/main.ts
@@ -270,8 +270,8 @@ function renderHTML(content: string): string {
     }
     .logout-btn { background: #E6521F; }
     .logout-btn:hover { background: #EA2F14; }
-    .login-btn { background: #73946B; }
-    .login-btn:hover { background: #537D5D; }
+    .login-btn { background: #B4E197; }
+    .login-btn:hover { background: #83BD75; }
     .admin-btn { background: #234C6A; }
     .admin-btn:hover { background: #1B3C53; }
     h1 { font-size: 2em; margin-bottom: 10px; }
@@ -391,7 +391,7 @@ function renderHTML(content: string): string {
       font-size: 1em;
     }
     textarea { 
-      min-height: 200px; 
+      min-height: 800px; 
       resize: vertical;
       font-family: 'Courier New', monospace;
     }
@@ -407,11 +407,6 @@ function renderHTML(content: string): string {
     }
     button:hover { background: #555; }
     .empty { color: #999; text-align: center; padding: 40px; }
-    .help-text {
-      font-size: 0.85em;
-      color: #666;
-      margin-bottom: 15px;
-    }
     .metrics-section {
       background: white;
       padding: 25px;
@@ -568,7 +563,6 @@ async function renderAdminPage(
 
   const metricsHTML = `
     <section class="metrics-section">
-      <h3>Metrics</h3>
       <div class="metrics-grid">
         <div class="metrics-card">
           <div class="metrics-label">Total visits</div>
@@ -582,23 +576,24 @@ async function renderAdminPage(
     ${renderHeader(username)}
 
     <form method="POST" action="/post">
-      <h2>New Post</h2>
       ${csrfField(csrfToken)}
       <input type="text" name="title" placeholder="Post title" required>
-      <div class="help-text">Write your post in Markdown format. Supports **bold**, *italic*, lists, links, code blocks, and more!</div>
-      <textarea name="content" placeholder="Write your thoughts in markdown...
+      <textarea name="content" placeholder="# Heading
 
-Example:
-## Subheading
 - List item
-- Another item
+- List item
+
+**Bold text**
 
-**Bold text** and *italic text*
+*italic text*
 
-\`inline code\` or:
+\`inline code\`
 
 \`\`\`
-code block
+const x=0;
+function fn() {
+    return;
+}
 \`\`\`" required></textarea>
       <button type="submit">Publish</button>
     </form>