feat: Implement tabbed layout for account settings page
This commit is contained in:
1 parent
db9cd51de9
commit
3120c54b6c
1 file changed
+32
-3
@@ -9,7 +9,31 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Tabs Navigation -->
|
||||
<div class="mb-4 border-b border-gray-200">
|
||||
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
||||
<a href="#tab-profile" class="group whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
|
||||
border-primary text-primary [&:not(:target):not(:has(~:target))]:border-primary [&:not(:target):not(:has(~:target))]:text-primary
|
||||
[&:target]:border-primary [&:target]:text-primary
|
||||
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
|
||||
Profile
|
||||
</a>
|
||||
<a href="#tab-preferences" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
|
||||
[&:target]:border-primary [&:target]:text-primary
|
||||
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
|
||||
Preferences
|
||||
</a>
|
||||
<a href="#tab-links" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
|
||||
[&:target]:border-primary [&:target]:text-primary
|
||||
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
|
||||
Links
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<!-- 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>
|
||||
@@ -41,7 +65,9 @@
|
||||
<input type="email" id="email" name="email" value="{{ page.email }}" class="w-full text-primary text-sm px-3 py-2 bg-transparent border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary transition duration-150 ease-in-out">
|
||||
<p class="mt-1 text-xs text-text-muted">Only admins see your email. To share publicly, add to the 'about' box.</p>
|
||||
</div>
|
||||
</div> <!-- End of tab-profile -->
|
||||
|
||||
<div id="tab-preferences" class="hidden [&:target]:block space-y-6">
|
||||
<!-- Settings Grid -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<!-- showdead -->
|
||||
@@ -76,9 +102,11 @@
|
||||
<input type="number" id="delay" name="delay" value="{{ page.delay }}" class="w-full text-primary text-sm px-3 py-2 bg-transparent border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary transition duration-150 ease-in-out">
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- End of tab-preferences -->
|
||||
|
||||
<div id="tab-links" class="hidden [&:target]:block space-y-2">
|
||||
<!-- Links Section -->
|
||||
<div class="pt-4 border-t border-gray-200 space-y-2">
|
||||
<div> <!-- Removed top border and padding from original div -->
|
||||
<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>
|
||||
@@ -88,9 +116,10 @@
|
||||
<span class="text-text-muted text-xs"> (Publicly Visible)</span>
|
||||
</p>
|
||||
</div>
|
||||
</div> <!-- End of tab-links -->
|
||||
|
||||
<!-- Update Button -->
|
||||
<div class="pt-2">
|
||||
<!-- Update Button (Moved outside tab panes) -->
|
||||
<div class="pt-4 border-t border-gray-200">
|
||||
<button type="submit" class="w-full px-6 py-3 bg-primary text-white text-base font-medium rounded-md hover:bg-primary-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition duration-150 ease-in-out font-monda font-action">Update Profile</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in new issue
Block a user