mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 11:51:10 -05:00
profile changes
This commit is contained in:
@@ -4,14 +4,20 @@
|
||||
{% block title %}{{ profile_user.username }}'s Profile - ThrillWiki{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="container px-4 mx-auto">
|
||||
<!-- Profile Header -->
|
||||
<div class="bg-white dark:bg-gray-800 shadow rounded-lg overflow-hidden">
|
||||
<div class="overflow-hidden bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="p-6">
|
||||
<div class="flex items-center">
|
||||
<img src="{{ profile_user.profile.avatar.url|default:'/static/images/default-avatar.png' }}"
|
||||
{% if profile_user.profile.avatar %}
|
||||
<img src="{{ profile_user.profile.avatar.url }}"
|
||||
alt="{{ profile_user.username }}"
|
||||
class="w-24 h-24 rounded-full object-cover">
|
||||
class="object-cover w-24 h-24 rounded-full">
|
||||
{% else %}
|
||||
<div class="flex items-center justify-center w-24 h-24 text-white rounded-full bg-gradient-to-br from-primary to-secondary">
|
||||
{{ profile_user.username.0|upper }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="ml-6">
|
||||
<h1 class="text-2xl font-bold">
|
||||
{{ profile_user.profile.display_name|default:profile_user.username }}
|
||||
@@ -31,14 +37,14 @@
|
||||
|
||||
{% if profile_user.profile.bio %}
|
||||
<div class="mt-6">
|
||||
<h2 class="text-lg font-semibold mb-2">About Me</h2>
|
||||
<h2 class="mb-2 text-lg font-semibold">About Me</h2>
|
||||
<p class="text-gray-600 dark:text-gray-400">{{ profile_user.profile.bio }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Social Links -->
|
||||
{% if profile_user.profile.twitter or profile_user.profile.instagram or profile_user.profile.youtube or profile_user.profile.discord %}
|
||||
<div class="mt-4 flex space-x-4">
|
||||
<div class="flex mt-4 space-x-4">
|
||||
{% if profile_user.profile.twitter %}
|
||||
<a href="{{ profile_user.profile.twitter }}" target="_blank" rel="noopener noreferrer"
|
||||
class="text-gray-600 dark:text-gray-400 hover:text-blue-500">
|
||||
@@ -68,27 +74,27 @@
|
||||
</div>
|
||||
|
||||
<!-- Statistics -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 mt-6">
|
||||
<div class="grid grid-cols-1 gap-4 mt-6 md:grid-cols-4">
|
||||
<div class="card">
|
||||
<div class="card-body text-center">
|
||||
<div class="text-center card-body">
|
||||
<div class="stat-value">{{ profile_user.profile.coaster_credits }}</div>
|
||||
<div class="stat-label">Coaster Credits</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body text-center">
|
||||
<div class="text-center card-body">
|
||||
<div class="stat-value">{{ profile_user.profile.dark_ride_credits }}</div>
|
||||
<div class="stat-label">Dark Ride Credits</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body text-center">
|
||||
<div class="text-center card-body">
|
||||
<div class="stat-value">{{ profile_user.profile.flat_ride_credits }}</div>
|
||||
<div class="stat-label">Flat Ride Credits</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body text-center">
|
||||
<div class="text-center card-body">
|
||||
<div class="stat-value">{{ profile_user.profile.water_ride_credits }}</div>
|
||||
<div class="stat-label">Water Ride Credits</div>
|
||||
</div>
|
||||
@@ -96,7 +102,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Recent Activity -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mt-6">
|
||||
<div class="grid grid-cols-1 gap-6 mt-6 md:grid-cols-2">
|
||||
<!-- Recent Reviews -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
@@ -105,7 +111,7 @@
|
||||
<div class="card-body">
|
||||
{% for review in recent_reviews %}
|
||||
<div class="mb-4 last:mb-0">
|
||||
<div class="flex justify-between items-start">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<h3 class="font-medium">{{ review.title }}</h3>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400">
|
||||
@@ -113,7 +119,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<span class="text-yellow-400 mr-1">★</span>
|
||||
<span class="mr-1 text-yellow-400">★</span>
|
||||
<span>{{ review.rating }}/10</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
68
templates/accounts/settings.html
Normal file
68
templates/accounts/settings.html
Normal file
@@ -0,0 +1,68 @@
|
||||
{% extends 'base/base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}Settings - ThrillWiki{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container px-4 mx-auto">
|
||||
<h1 class="mb-4 text-2xl font-bold">Settings</h1>
|
||||
|
||||
<div class="p-6 overflow-hidden bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="update_profile">
|
||||
|
||||
<h2 class="mb-4 text-lg font-semibold">Update Profile</h2>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="display_name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Display Name</label>
|
||||
<input type="text" name="display_name" id="display_name" value="{{ user.profile.display_name }}" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300">
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="avatar" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Avatar</label>
|
||||
<input type="file" name="avatar" id="avatar" class="block w-full mt-1 text-gray-900 dark:text-gray-300">
|
||||
</div>
|
||||
|
||||
<button type="submit" class="px-4 py-2 text-white bg-blue-500 rounded-md">Update Profile</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="p-6 mt-6 overflow-hidden bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="change_email">
|
||||
|
||||
<h2 class="mb-4 text-lg font-semibold">Change Email</h2>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="new_email" class="block text-sm font-medium text-gray-700 dark:text-gray-300">New Email</label>
|
||||
<input type="email" name="new_email" id="new_email" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300">
|
||||
</div>
|
||||
|
||||
<button type="submit" class="px-4 py-2 text-white bg-blue-500 rounded-md">Change Email</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="p-6 mt-6 overflow-hidden bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="change_password">
|
||||
|
||||
<h2 class="mb-4 text-lg font-semibold">Change Password</h2>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="old_password" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Current Password</label>
|
||||
<input type="password" name="old_password" id="old_password" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300">
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="new_password" class="block text-sm font-medium text-gray-700 dark:text-gray-300">New Password</label>
|
||||
<input type="password" name="new_password" id="new_password" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300">
|
||||
</div>
|
||||
|
||||
<button type="submit" class="px-4 py-2 text-white bg-blue-500 rounded-md">Change Password</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user