131 lines
8.3 KiB
Plaintext
131 lines
8.3 KiB
Plaintext
<div class="flex items-center justify-center overflow-hidden">
|
|
<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 -->
|
|
<div class="bg-rules-bg p-4 rounded mb-6 text-primary text-sm">
|
|
<p>
|
|
Please provide a valid email address. This ensures we can assist you with password recovery if needed. Rest assured, your email address remains confidential between you and us, invisible to web crawlers and other users.
|
|
</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">
|
|
<!-- 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 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>
|
|
<a href="/formatdoc" tabindex="-1" class="ml-2 mt-1 text-xs text-primary hover:underline flex-shrink-0">help</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Email -->
|
|
<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>
|
|
</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 -->
|
|
<div>
|
|
<label for="showdead" class="block text-sm font-medium text-primary mb-1">Show Dead?</label>
|
|
<select id="showdead" name="showd" 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 appearance-none">
|
|
<option value="yes" {% if page.showdead == "yes" %}selected{% endif %}>Yes</option>
|
|
<option value="no" {% if page.showdead == "no" %}selected{% endif %}>No</option>
|
|
</select>
|
|
<p class="mt-1 text-xs text-text-muted">Show comments flagged as dead?</p>
|
|
</div>
|
|
<!-- noprocrast -->
|
|
<div>
|
|
<label for="noprocrast" class="block text-sm font-medium text-primary mb-1">No Procrastinate?</label>
|
|
<select id="noprocrast" name="nopro" 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 appearance-none">
|
|
<option value="yes" {% if page.noprocrast == "yes" %}selected{% endif %}>Yes</option>
|
|
<option value="no" {% if page.noprocrast == "no" %}selected{% endif %}>No</option>
|
|
</select>
|
|
<p class="mt-1 text-xs text-text-muted">Prevent doomscrolling with time limits?</p>
|
|
</div>
|
|
|
|
<!-- Spacer or Subheading for Time Limits -->
|
|
<div class="md:col-span-3 mt-4 pt-4 border-t border-gray-200">
|
|
<h3 class="text-sm font-medium text-primary mb-2">Procrastination Settings</h3>
|
|
</div>
|
|
|
|
<!-- maxvisit -->
|
|
<div>
|
|
<label for="maxvisit" class="block text-sm font-medium text-primary mb-1">Max Visit (mins)</label>
|
|
<input type="number" id="maxvisit" name="maxv" value="{{ page.maxvisit }}" 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">Max time per visit.</p>
|
|
</div>
|
|
<!-- minaway -->
|
|
<div>
|
|
<label for="minaway" class="block text-sm font-medium text-primary mb-1">Min Away (mins)</label>
|
|
<input type="number" id="minaway" name="mina" value="{{ page.minaway }}" 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">Required break time.</p>
|
|
</div>
|
|
<!-- delay -->
|
|
<div>
|
|
<label for="delay" class="block text-sm font-medium text-primary mb-1">Submit Delay (mins)</label>
|
|
<input type="number" id="delay" name="delay" value="{{ page.delay }}" 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">Delay before submitting.</p>
|
|
</div>
|
|
</div>
|
|
</div> <!-- End of tab-preferences -->
|
|
|
|
<div id="tab-links" class="hidden [&:target]:block space-y-4"> <!-- Increased space-y -->
|
|
<!-- Links Section -->
|
|
<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>
|
|
<p class="text-sm">
|
|
<a href="{{ page.favorites_uri }}" class="text-primary hover:underline">Favorite Submissions</a> /
|
|
<a href="{{ page.favorites_uri }}&comments=t" class="text-primary hover:underline">Favorite Comments</a>
|
|
<span class="text-text-muted text-xs"> (Publicly Visible)</span>
|
|
</p>
|
|
</div>
|
|
</div> <!-- End of tab-links -->
|
|
|
|
<!-- 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>
|
|
</div>
|
|
</div>
|