fix: add dark mode variants to light-only views
Forms, upvote button, modal, notifications and several pages had no dark: classes and rendered as white blocks in dark mode. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
06ac14c5e6
commit
2a37695d78
@@ -4,11 +4,11 @@
|
||||
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
||||
<!-- Header -->
|
||||
<div class="mb-8">
|
||||
<h1 class="text-3xl font-bold text-gray-900">Edit Profile</h1>
|
||||
<p class="mt-2 text-sm text-gray-600">Update your profile information and social links</p>
|
||||
<h1 class="text-3xl font-bold text-gray-900 dark:text-white">Edit Profile</h1>
|
||||
<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">Update your profile information and social links</p>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded-lg shadow-sm border border-gray-200">
|
||||
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
|
||||
<div class="px-6 py-8">
|
||||
<form method="POST" action="{{ route('profile.update') }}" enctype="multipart/form-data" class="space-y-8">
|
||||
@csrf
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<!-- Avatar Section -->
|
||||
<div>
|
||||
<h3 class="text-lg font-medium text-gray-900 mb-4">Profile Picture</h3>
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-white mb-4">Profile Picture</h3>
|
||||
<div class="flex items-center gap-6">
|
||||
<div class="flex-shrink-0">
|
||||
@if($user->avatar_url)
|
||||
@@ -34,17 +34,17 @@
|
||||
id="avatar"
|
||||
name="avatar"
|
||||
accept="image/*"
|
||||
class="block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-semibold file:bg-primary-50 file:text-primary-700 hover:file:bg-primary-100 @error('avatar') border-red-300 @enderror">
|
||||
class="block w-full text-sm text-gray-500 dark:text-gray-400 file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-semibold file:bg-primary-50 file:text-primary-700 hover:file:bg-primary-100 @error('avatar') border-red-300 dark:border-red-700 @enderror">
|
||||
@error('avatar')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
<p class="mt-2 text-sm text-gray-500">JPG, PNG, or GIF. Max size 2MB.</p>
|
||||
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">JPG, PNG, or GIF. Max size 2MB.</p>
|
||||
|
||||
@if($user->avatar)
|
||||
<form method="POST" action="{{ route('profile.avatar.delete') }}" class="mt-3" onsubmit="return confirm('Are you sure you want to delete your avatar?')">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="text-sm font-medium text-red-600 hover:text-red-700">
|
||||
<button type="submit" class="text-sm font-medium text-red-600 dark:text-red-400 hover:text-red-700">
|
||||
Delete Avatar
|
||||
</button>
|
||||
</form>
|
||||
@@ -54,13 +54,13 @@
|
||||
</div>
|
||||
|
||||
<!-- Basic Information -->
|
||||
<div class="border-t border-gray-200 pt-8">
|
||||
<h3 class="text-lg font-medium text-gray-900 mb-4">Basic Information</h3>
|
||||
<div class="border-t border-gray-200 dark:border-gray-700 pt-8">
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-white mb-4">Basic Information</h3>
|
||||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2">
|
||||
<!-- Name -->
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700">
|
||||
Name <span class="text-red-600">*</span>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
Name <span class="text-red-600 dark:text-red-400">*</span>
|
||||
</label>
|
||||
<div class="mt-1">
|
||||
<input type="text"
|
||||
@@ -68,17 +68,17 @@
|
||||
name="name"
|
||||
value="{{ old('name', $user->name) }}"
|
||||
required
|
||||
class="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('name') border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror">
|
||||
class="appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('name') border-red-300 text-red-900 dark:text-red-200 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror dark:bg-gray-700">
|
||||
@error('name')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Email -->
|
||||
<div>
|
||||
<label for="email" class="block text-sm font-medium text-gray-700">
|
||||
Email <span class="text-red-600">*</span>
|
||||
<label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
Email <span class="text-red-600 dark:text-red-400">*</span>
|
||||
</label>
|
||||
<div class="mt-1">
|
||||
<input type="email"
|
||||
@@ -86,9 +86,9 @@
|
||||
name="email"
|
||||
value="{{ old('email', $user->email) }}"
|
||||
required
|
||||
class="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('email') border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror">
|
||||
class="appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('email') border-red-300 text-red-900 dark:text-red-200 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror dark:bg-gray-700">
|
||||
@error('email')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
<!-- Bio -->
|
||||
<div class="mt-6">
|
||||
<label for="bio" class="block text-sm font-medium text-gray-700">
|
||||
<label for="bio" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
Bio
|
||||
</label>
|
||||
<div class="mt-1">
|
||||
@@ -105,22 +105,22 @@
|
||||
rows="4"
|
||||
maxlength="1000"
|
||||
placeholder="Tell us a bit about yourself..."
|
||||
class="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('bio') border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror">{{ old('bio', $user->bio) }}</textarea>
|
||||
class="appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('bio') border-red-300 text-red-900 dark:text-red-200 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror dark:bg-gray-700">{{ old('bio', $user->bio) }}</textarea>
|
||||
@error('bio')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
<p class="mt-2 text-sm text-gray-500">Max 1000 characters</p>
|
||||
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">Max 1000 characters</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Website & Social Links -->
|
||||
<div class="border-t border-gray-200 pt-8">
|
||||
<h3 class="text-lg font-medium text-gray-900 mb-4">Website & Social Links</h3>
|
||||
<div class="border-t border-gray-200 dark:border-gray-700 pt-8">
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-white mb-4">Website & Social Links</h3>
|
||||
<div class="space-y-6">
|
||||
<!-- Website -->
|
||||
<div>
|
||||
<label for="website" class="block text-sm font-medium text-gray-700">
|
||||
<label for="website" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
Website
|
||||
</label>
|
||||
<div class="mt-1">
|
||||
@@ -129,20 +129,20 @@
|
||||
name="website"
|
||||
value="{{ old('website', $user->website) }}"
|
||||
placeholder="https://example.com"
|
||||
class="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('website') border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror">
|
||||
class="appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('website') border-red-300 text-red-900 dark:text-red-200 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror dark:bg-gray-700">
|
||||
@error('website')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Twitter -->
|
||||
<div>
|
||||
<label for="twitter" class="block text-sm font-medium text-gray-700">
|
||||
<label for="twitter" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
Twitter Username
|
||||
</label>
|
||||
<div class="mt-1 flex rounded-md shadow-sm">
|
||||
<span class="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 bg-gray-50 text-gray-500 sm:text-sm">
|
||||
<span class="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-900 text-gray-500 dark:text-gray-400 sm:text-sm">
|
||||
@
|
||||
</span>
|
||||
<input type="text"
|
||||
@@ -150,20 +150,20 @@
|
||||
name="twitter"
|
||||
value="{{ old('twitter', $user->twitter) }}"
|
||||
placeholder="username"
|
||||
class="flex-1 min-w-0 block w-full px-3 py-2 rounded-none rounded-r-md border-gray-300 focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('twitter') border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror">
|
||||
class="flex-1 min-w-0 block w-full px-3 py-2 rounded-none rounded-r-md border-gray-300 dark:border-gray-600 focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('twitter') border-red-300 text-red-900 dark:text-red-200 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror dark:bg-gray-700">
|
||||
</div>
|
||||
@error('twitter')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- GitHub -->
|
||||
<div>
|
||||
<label for="github" class="block text-sm font-medium text-gray-700">
|
||||
<label for="github" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
GitHub Username
|
||||
</label>
|
||||
<div class="mt-1 flex rounded-md shadow-sm">
|
||||
<span class="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 bg-gray-50 text-gray-500 text-sm">
|
||||
<span class="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-900 text-gray-500 dark:text-gray-400 text-sm">
|
||||
github.com/
|
||||
</span>
|
||||
<input type="text"
|
||||
@@ -171,20 +171,20 @@
|
||||
name="github"
|
||||
value="{{ old('github', $user->github) }}"
|
||||
placeholder="username"
|
||||
class="flex-1 min-w-0 block w-full px-3 py-2 rounded-none rounded-r-md border-gray-300 focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('github') border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror">
|
||||
class="flex-1 min-w-0 block w-full px-3 py-2 rounded-none rounded-r-md border-gray-300 dark:border-gray-600 focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('github') border-red-300 text-red-900 dark:text-red-200 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror dark:bg-gray-700">
|
||||
</div>
|
||||
@error('github')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- LinkedIn -->
|
||||
<div>
|
||||
<label for="linkedin" class="block text-sm font-medium text-gray-700">
|
||||
<label for="linkedin" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
LinkedIn Username
|
||||
</label>
|
||||
<div class="mt-1 flex rounded-md shadow-sm">
|
||||
<span class="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 bg-gray-50 text-gray-500 text-sm">
|
||||
<span class="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-900 text-gray-500 dark:text-gray-400 text-sm">
|
||||
linkedin.com/in/
|
||||
</span>
|
||||
<input type="text"
|
||||
@@ -192,19 +192,19 @@
|
||||
name="linkedin"
|
||||
value="{{ old('linkedin', $user->linkedin) }}"
|
||||
placeholder="username"
|
||||
class="flex-1 min-w-0 block w-full px-3 py-2 rounded-none rounded-r-md border-gray-300 focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('linkedin') border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror">
|
||||
class="flex-1 min-w-0 block w-full px-3 py-2 rounded-none rounded-r-md border-gray-300 dark:border-gray-600 focus:ring-primary-500 focus:border-primary-500 sm:text-sm @error('linkedin') border-red-300 text-red-900 dark:text-red-200 placeholder-red-300 focus:ring-red-500 focus:border-red-500 @enderror dark:bg-gray-700">
|
||||
</div>
|
||||
@error('linkedin')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Form Actions -->
|
||||
<div class="border-t border-gray-200 pt-6 flex items-center justify-between">
|
||||
<div class="border-t border-gray-200 dark:border-gray-700 pt-6 flex items-center justify-between">
|
||||
<a href="{{ route('profile.show', $user) }}"
|
||||
class="inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
|
||||
class="inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 shadow-sm text-sm font-medium rounded-md text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
|
||||
Cancel
|
||||
</a>
|
||||
<button type="submit"
|
||||
|
||||
Reference in New Issue
Block a user