feat: mobile-optimize admin section
- Layout: sidebar hidden on mobile, replaced with horizontal top nav strip - Tables: overflow-x-auto + hide secondary columns (email/category/dates/ plays/likes) on small screens; show email inline under name on mobile - Forms: grid-cols-2 → grid-cols-1 sm:grid-cols-2 on all admin forms - Markdown editor: Write/Preview tab toggle on mobile, side-by-side on sm+ - Padding: p-3 sm:p-6 on all admin pages for tighter mobile layout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="p-6">
|
||||
<div class="p-3 sm:p-6">
|
||||
<div class="flex items-center justify-between mb-6">
|
||||
<h1 class="text-2xl font-bold">Articles</h1>
|
||||
<Button href="/admin/articles/new">
|
||||
@@ -46,13 +46,13 @@
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div class="rounded-lg border border-border/40 overflow-hidden">
|
||||
<div class="rounded-lg border border-border/40 overflow-x-auto">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-muted/30">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left font-medium text-muted-foreground">Article</th>
|
||||
<th class="px-4 py-3 text-left font-medium text-muted-foreground">Category</th>
|
||||
<th class="px-4 py-3 text-left font-medium text-muted-foreground">Published</th>
|
||||
<th class="px-4 py-3 text-left font-medium text-muted-foreground hidden sm:table-cell">Category</th>
|
||||
<th class="px-4 py-3 text-left font-medium text-muted-foreground hidden sm:table-cell">Published</th>
|
||||
<th class="px-4 py-3 text-right font-medium text-muted-foreground">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -85,8 +85,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-muted-foreground capitalize">{article.category ?? "—"}</td>
|
||||
<td class="px-4 py-3 text-muted-foreground">
|
||||
<td class="px-4 py-3 text-muted-foreground capitalize hidden sm:table-cell">{article.category ?? "—"}</td>
|
||||
<td class="px-4 py-3 text-muted-foreground hidden sm:table-cell">
|
||||
{timeAgo.format(new Date(article.publish_date))}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
|
||||
Reference in New Issue
Block a user