feat: Improve account settings page layout and information display

This commit is contained in:
Kerby Martino authored and Kerby Martino (aider) committed 2025-05-04 16:25:18 +08:00
1 parent 1aae7d7d92
commit b18859e004
2 files changed
+12 -20

No files matched your search

+10 -18
View File
@@ -1,5 +1,5 @@
<div class="flex items-center justify-center overflow-hidden">
<div class="w-full max-w-lg mx-auto rounded-lg p-6 bg-bg-footer">
<div class="w-full mx-auto rounded-lg p-6 bg-bg-footer">
<h2 class="text-xl font-semibold text-center text-primary mb-6">Account Settings</h2>
<!-- Email Info Box -->
@@ -34,24 +34,16 @@
<!-- Tab Content Panes -->
<form class="space-y-6">
<div id="tab-profile" class="block [&:not(:target)]:hidden [&:not(:target):not(:has(~:target))]:block space-y-6">
<!-- Read-only Info -->
<div class="grid grid-cols-3 gap-4 text-sm">
<div>
<span class="font-medium text-primary">User:</span>
<span class="text-primary ml-2">{{ page.username }}</span>
</div>
<div>
<span class="font-medium text-primary">Created:</span>
<span class="text-primary ml-2">{{ page.created }}</span>
</div>
<div>
<span class="font-medium text-primary">Merit:</span>
<span class="text-primary ml-2">{{ page.merit }}</span>
</div>
<!-- User Header -->
<div class="mb-6 pb-4 border-b border-gray-200">
<h1 class="text-3xl font-bold text-text-title mb-1">{{ page.username }}</h1>
<p class="text-sm text-text-muted">
Joined: {{ page.created }} | Merits: {{ page.merits }}
</p>
</div>
<!-- About -->
<div class="p-4 border border-gray-200 rounded-md bg-white/50">
<div class="p-4 rounded-md">
<label for="about" class="block text-sm font-medium text-primary mb-1">About</label>
<div class="flex items-start">
<textarea id="about" name="about" rows="5" class="flex-grow text-primary text-base px-3 py-2 bg-transparent border-b-2 border-gray-300 focus:outline-none focus:border-primary transition duration-150 ease-in-out placeholder:text-xs">{{ page.about }}</textarea>
@@ -60,7 +52,7 @@
</div>
<!-- Email -->
<div class="p-4 border border-gray-200 rounded-md bg-white/50">
<div class="p-4 rounded-md">
<label for="email" class="block text-sm font-medium text-primary mb-1">Email</label>
<input type="email" id="email" name="email" value="{{ page.email }}" class="w-full text-primary text-base px-3 py-2 bg-transparent border-b-2 border-gray-300 focus:outline-none focus:border-primary transition duration-150 ease-in-out placeholder:text-xs">
<p class="mt-1 text-xs text-text-muted">Only admins see your email. To share publicly, add to the 'about' box.</p>
@@ -117,7 +109,7 @@
<div id="tab-links" class="hidden [&:target]:block space-y-4"> <!-- Increased space-y -->
<!-- Links Section -->
<div>
<div class="font-action">
<p><a href="{{ page.change_password_uri }}" class="text-primary text-sm hover:underline">Change Password</a></p>
<p><a href="{{ page.submissions_uri }}" class="text-primary text-sm hover:underline">View Submissions</a></p>
<p><a href="{{ page.comments_uri }}" class="text-primary text-sm hover:underline">View Comments</a></p>
+2 -2
View File
@@ -2,9 +2,9 @@
layout: simple
title: Account Settings
permalink: /account/
username: kerbymart
username: chair_enthusiast2025
created: 59 minutes ago
merit: 1
merits: 1
about:
email:
showdead: no