Revert to version a5f160a
This commit is contained in:
parent
0f85f7204c
commit
a22cc53e72
Binary file not shown.
@ -18,21 +18,10 @@ from django.contrib import admin
|
|||||||
from django.urls import include, path
|
from django.urls import include, path
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
from django.contrib.auth import views as auth_views
|
|
||||||
from core.views import SignUpView
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path("", include("core.urls")),
|
path("", include("core.urls")),
|
||||||
path('signup/', SignUpView.as_view(), name='signup'),
|
|
||||||
path('login/', auth_views.LoginView.as_view(template_name='registration/login.html'), name='login'),
|
|
||||||
path('logout/', auth_views.LogoutView.as_view(), name='logout'),
|
|
||||||
path('password_change/', auth_views.PasswordChangeView.as_view(template_name='registration/password_change.html'), name='password_change'),
|
|
||||||
path('password_change/done/', auth_views.PasswordChangeDoneView.as_view(template_name='registration/password_change_done.html'), name='password_change_done'),
|
|
||||||
path('password_reset/', auth_views.PasswordResetView.as_view(template_name='registration/password_reset.html'), name='password_reset'),
|
|
||||||
path('password_reset/done/', auth_views.PasswordResetDoneView.as_view(template_name='registration/password_reset_done.html'), name='password_reset_done'),
|
|
||||||
path('reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(template_name='registration/password_reset_confirm.html'), name='password_reset_confirm'),
|
|
||||||
path('reset/done/', auth_views.PasswordResetCompleteView.as_view(template_name='registration/password_reset_complete.html'), name='password_reset_complete'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,19 +1,6 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.auth.forms import UserCreationForm
|
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from .models import MoodEntry, Activity
|
from .models import MoodEntry, Activity
|
||||||
|
|
||||||
class DateRangeFilterForm(forms.Form):
|
|
||||||
start_date = forms.DateField(widget=forms.DateInput(attrs={'type': 'date', 'class': 'form-control'}))
|
|
||||||
end_date = forms.DateField(widget=forms.DateInput(attrs={'type': 'date', 'class': 'form-control'}))
|
|
||||||
|
|
||||||
class SignUpForm(UserCreationForm):
|
|
||||||
email = forms.EmailField(max_length=254, help_text='Required. Inform a valid email address.')
|
|
||||||
|
|
||||||
class Meta:
|
|
||||||
model = User
|
|
||||||
fields = ('username', 'email')
|
|
||||||
|
|
||||||
class MoodEntryForm(forms.ModelForm):
|
class MoodEntryForm(forms.ModelForm):
|
||||||
activities = forms.ModelMultipleChoiceField(
|
activities = forms.ModelMultipleChoiceField(
|
||||||
queryset=Activity.objects.all(),
|
queryset=Activity.objects.all(),
|
||||||
@ -25,11 +12,6 @@ class MoodEntryForm(forms.ModelForm):
|
|||||||
model = MoodEntry
|
model = MoodEntry
|
||||||
fields = ['mood_score', 'note', 'activities']
|
fields = ['mood_score', 'note', 'activities']
|
||||||
widgets = {
|
widgets = {
|
||||||
'mood_score': forms.NumberInput(attrs={'class': 'form-control', 'min': 1, 'max': 10}),
|
'mood_score': forms.NumberInput(attrs={'min': 1, 'max': 5}),
|
||||||
'note': forms.Textarea(attrs={'class': 'form-control', 'rows': 4}),
|
'note': forms.Textarea(attrs={'rows': 4}),
|
||||||
}
|
}
|
||||||
|
|
||||||
class ContactForm(forms.Form):
|
|
||||||
name = forms.CharField(max_length=100, widget=forms.TextInput(attrs={'class': 'form-control'}))
|
|
||||||
email = forms.EmailField(widget=forms.EmailInput(attrs={'class': 'form-control'}))
|
|
||||||
message = forms.CharField(widget=forms.Textarea(attrs={'class': 'form-control', 'rows': 5}))
|
|
||||||
|
|||||||
25
core/mail.py
25
core/mail.py
@ -1,25 +0,0 @@
|
|||||||
from django.core.mail import send_mail
|
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
def send_contact_message(name, email, message):
|
|
||||||
"""Sends an email from the contact form."""
|
|
||||||
try:
|
|
||||||
subject = f'Contact Form Message from {name}'
|
|
||||||
message_body = f'You have received a new message from your website contact form.\n\n' \
|
|
||||||
f'Here are the details:\n\n' \
|
|
||||||
f'Name: {name}\n' \
|
|
||||||
f'Email: {email}\n\n' \
|
|
||||||
f'Message:\n{message}\n'
|
|
||||||
|
|
||||||
send_mail(
|
|
||||||
subject,
|
|
||||||
message_body,
|
|
||||||
settings.DEFAULT_FROM_EMAIL, # from
|
|
||||||
[settings.CONTACT_EMAIL_TO], # to
|
|
||||||
fail_silently=False,
|
|
||||||
)
|
|
||||||
return True
|
|
||||||
except Exception as e:
|
|
||||||
# In a real app, you'd want to log this error
|
|
||||||
print(e)
|
|
||||||
return False
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
# Generated by Django 5.2.7 on 2025-12-22 19:21
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.conf import settings
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('core', '0001_initial'),
|
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='Note',
|
|
||||||
fields=[
|
|
||||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('title', models.CharField(max_length=255)),
|
|
||||||
('content', models.TextField()),
|
|
||||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
||||||
('updated_at', models.DateTimeField(auto_now=True)),
|
|
||||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
]
|
|
||||||
Binary file not shown.
@ -36,13 +36,3 @@ class MoodEntry(models.Model):
|
|||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'{self.user.username} - {self.date_time.strftime("%Y-%m-%d")}'
|
return f'{self.user.username} - {self.date_time.strftime("%Y-%m-%d")}'
|
||||||
|
|
||||||
class Note(models.Model):
|
|
||||||
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
|
||||||
title = models.CharField(max_length=255)
|
|
||||||
content = models.TextField()
|
|
||||||
created_at = models.DateTimeField(auto_now_add=True)
|
|
||||||
updated_at = models.DateTimeField(auto_now=True)
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return self.title
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class="h-100">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{% block title %}PixelMinds{% endblock %}</title>
|
<title>{% block title %}Knowledge Base{% endblock %}</title>
|
||||||
{% if project_description %}
|
{% if project_description %}
|
||||||
<meta name="description" content="{{ project_description }}">
|
<meta name="description" content="{{ project_description }}">
|
||||||
<meta property="og:description" content="{{ project_description }}">
|
<meta property="og:description" content="{{ project_description }}">
|
||||||
@ -13,109 +13,28 @@
|
|||||||
<meta property="og:image" content="{{ project_image_url }}">
|
<meta property="og:image" content="{{ project_image_url }}">
|
||||||
<meta property="twitter:image" content="{{ project_image_url }}">
|
<meta property="twitter:image" content="{{ project_image_url }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
<link href="{% static 'bootstrap/dist/css/bootstrap.min.css' %}" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
|
||||||
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
||||||
{% block head %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="d-flex flex-column h-100">
|
<body>
|
||||||
<header>
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||||
<nav class="navbar navbar-expand-lg navbar-light bg-white border-bottom shadow-sm">
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand fw-bold" href="/">PixelMinds</a>
|
<a class="navbar-brand" href="/">PixelMinds</a>
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<ul class="navbar-nav">
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
||||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="/">Home</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="{% url 'core:about' %}">About</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="{% url 'core:contact' %}">Contact</a>
|
|
||||||
</li>
|
|
||||||
{% if user.is_authenticated %}
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'core:dashboard' %}">Dashboard</a>
|
<a class="nav-link" href="{% url 'core:dashboard' %}">Dashboard</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
{% if user.is_authenticated %}
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
||||||
<i class="bi bi-person-circle"></i> {{ user.username }}
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
|
||||||
<li><a class="dropdown-item" href="{% url 'password_change' %}">Change Password</a></li>
|
|
||||||
{% if user.is_staff %}
|
|
||||||
<li><a class="dropdown-item" href="{% url 'admin:index' %}">Admin</a></li>
|
|
||||||
{% endif %}
|
|
||||||
<li><hr class="dropdown-divider"></li>
|
|
||||||
<li><a class="dropdown-item" href="{% url 'logout' %}">Logout</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
{% else %}
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'login' %}">Login</a>
|
<a class="nav-link" href="/admin">Admin</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{% url 'core:signup' %}" class="btn btn-primary">Sign Up</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
|
||||||
|
|
||||||
<main class="flex-shrink-0">
|
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer class="footer mt-auto py-5 bg-light border-top">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4 mb-3">
|
|
||||||
<h5>PixelMinds</h5>
|
|
||||||
<p class="text-muted">Your personal health companion. Take control of your well-being.</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-2 mb-3">
|
|
||||||
<h5>Links</h5>
|
|
||||||
<ul class="nav flex-column">
|
|
||||||
<li class="nav-item mb-2"><a href="/" class="nav-link p-0 text-muted">Home</a></li>
|
|
||||||
<li class="nav-item mb-2"><a href="{% url 'core:dashboard' %}" class="nav-link p-0 text-muted">Dashboard</a></li>
|
|
||||||
<li class="nav-item mb-2"><a href="{% url 'core:about' %}" class="nav-link p-0 text-muted">About</a></li>
|
|
||||||
<li class="nav-item mb-2"><a href="{% url 'core:contact' %}" class="nav-link p-0 text-muted">Contact</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-2 mb-3">
|
|
||||||
<h5>Legal</h5>
|
|
||||||
<ul class="nav flex-column">
|
|
||||||
<li class="nav-item mb-2"><a href="{% url 'core:privacy_policy' %}" class="nav-link p-0 text-muted">Privacy Policy</a></li>
|
|
||||||
<li class="nav-item mb-2"><a href="#" class="nav-link p-0 text-muted">Terms of Service</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4 mb-3">
|
|
||||||
<h5>Follow Us</h5>
|
|
||||||
<a href="#" class="text-muted me-3"><i class="bi bi-twitter fs-4"></i></a>
|
|
||||||
<a href="#" class="text-muted me-3"><i class="bi bi-instagram fs-4"></i></a>
|
|
||||||
<a href="#" class="text-muted"><i class="bi bi-facebook fs-4"></i></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex flex-column flex-sm-row justify-content-between py-4 my-4 border-top">
|
|
||||||
<p class="text-muted">© 2025 PixelMinds, Inc. All rights reserved.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script src="{% static 'bootstrap/dist/js/bootstrap.bundle.min.js' %}"></script>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@ -1,58 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
{% load static %}
|
|
||||||
|
|
||||||
{% block title %}About Us - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-8 text-center">
|
|
||||||
<h1 class="section-title">About PixelMinds</h1>
|
|
||||||
<p class="lead">We are a team of passionate developers, designers, and healthcare professionals dedicated to helping you live a healthier, happier life.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="section bg-light">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row align-items-center">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<h2>Our Mission</h2>
|
|
||||||
<p>Our mission is to make mental and physical health tracking simple, accessible, and insightful for everyone. We believe that technology can empower individuals to take control of their well-being by providing them with the right tools and data-driven guidance.</p>
|
|
||||||
<p>We leverage cutting-edge AI to provide you with personalized insights and recommendations based on your mood and activity data. By understanding your patterns, you can make informed decisions to improve your well-being.</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6 text-center">
|
|
||||||
<img src="https://via.placeholder.com/500x300.png/E0E7FF/4F46E5?text=Health+Innovation" class="img-fluid rounded shadow" alt="Health Innovation">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="text-center mb-5">
|
|
||||||
<h2>Meet the Team</h2>
|
|
||||||
<p class="lead">A small group with a big vision.</p>
|
|
||||||
</div>
|
|
||||||
<div class="row text-center">
|
|
||||||
<div class="col-md-4 mb-4">
|
|
||||||
<img src="https://via.placeholder.com/150.png/E0E7FF/4F46E5?text=AV" class="rounded-circle mb-3" alt="Team Member">
|
|
||||||
<h5>Alex Vance</h5>
|
|
||||||
<p class="text-muted">Lead Developer</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4 mb-4">
|
|
||||||
<img src="https://via.placeholder.com/150.png/E0E7FF/4F46E5?text=BS" class="rounded-circle mb-3" alt="Team Member">
|
|
||||||
<h5>Brenda Shaw</h5>
|
|
||||||
<p class="text-muted">UX Designer</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4 mb-4">
|
|
||||||
<img src="https://via.placeholder.com/150.png/E0E7FF/4F46E5?text=CD" class="rounded-circle mb-3" alt="Team Member">
|
|
||||||
<h5>Dr. Carlin Day</h5>
|
|
||||||
<p class="text-muted">Health Advisor</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
{% load static %}
|
|
||||||
|
|
||||||
{% block title %}Contact Us - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-8 text-center">
|
|
||||||
<h1 class="section-title">Get in Touch</h1>
|
|
||||||
<p class="lead">We'd love to hear from you. Whether you have a question, feedback, or just want to say hello, please don't hesitate to reach out.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="section pt-0">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-7">
|
|
||||||
|
|
||||||
{% if messages %}
|
|
||||||
{% for message in messages %}
|
|
||||||
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
|
|
||||||
{{ message }}
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="card shadow-lg border-0">
|
|
||||||
<div class="card-body p-5">
|
|
||||||
<form method="post" novalidate>
|
|
||||||
{% csrf_token %}
|
|
||||||
<div class="mb-4">
|
|
||||||
{{ form.name.label_tag }}
|
|
||||||
{{ form.name }}
|
|
||||||
{% if form.name.errors %}<div class="invalid-feedback d-block">{{ form.name.errors|striptags }}</div>{% endif %}
|
|
||||||
</div>
|
|
||||||
<div class="mb-4">
|
|
||||||
{{ form.email.label_tag }}
|
|
||||||
{{ form.email }}
|
|
||||||
{% if form.email.errors %}<div class="invalid-feedback d-block">{{ form.email.errors|striptags }}</div>{% endif %}
|
|
||||||
</div>
|
|
||||||
<div class="mb-4">
|
|
||||||
{{ form.message.label_tag }}
|
|
||||||
{{ form.message }}
|
|
||||||
{% if form.message.errors %}<div class="invalid-feedback d-block">{{ form.message.errors|striptags }}</div>{% endif %}
|
|
||||||
</div>
|
|
||||||
<div class="d-grid">
|
|
||||||
<button type="submit" class="btn btn-primary btn-lg">Send Message</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,113 +1,49 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% load static %}
|
|
||||||
|
|
||||||
{% block title %}Dashboard - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns"></script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="section bg-light">
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-4 align-items-center">
|
<h1>Mood Dashboard</h1>
|
||||||
<div class="col-md-8">
|
<canvas id="moodChart" width="400" height="200"></canvas>
|
||||||
<h1 class="section-title mb-0">Your Dashboard</h1>
|
|
||||||
<p class="lead">An overview of your mood entries.</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 text-md-end">
|
|
||||||
<a href="{% url 'core:create_mood_entry' %}" class="btn btn-primary">+ New Mood Entry</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card shadow-sm mb-4">
|
|
||||||
<div class="card-body">
|
|
||||||
<h5 class="card-title fw-bold mb-3">Filter by Date</h5>
|
|
||||||
<form method="get" class="row g-3 align-items-center">
|
|
||||||
<div class="col-md-5">
|
|
||||||
<label for="{{ form.start_date.id_for_label }}" class="form-label">Start Date</label>
|
|
||||||
{{ form.start_date }}
|
|
||||||
</div>
|
|
||||||
<div class="col-md-5">
|
|
||||||
<label for="{{ form.end_date.id_for_label }}" class="form-label">End Date</label>
|
|
||||||
{{ form.end_date }}
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2 d-flex align-items-end">
|
|
||||||
<button type="submit" class="btn btn-secondary w-100">Filter</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card p-4 shadow-sm">
|
|
||||||
<div class="card-body">
|
|
||||||
<h5 class="card-title fw-bold mb-3">Mood Over Time</h5>
|
|
||||||
{% if chart_data != '[]' %}
|
|
||||||
<canvas id="moodChart"></canvas>
|
|
||||||
{% else %}
|
|
||||||
<div class="text-center p-5">
|
|
||||||
<p class="lead">No mood entries found for the selected period.</p>
|
|
||||||
<p class="text-muted">Try adjusting the filter or <a href="{% url 'core:create_mood_entry' %}">add a new entry</a>.</p>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
const chartData = JSON.parse('{{ chart_data|safe }}');
|
var ctx = document.getElementById('moodChart').getContext('2d');
|
||||||
if (chartData.length > 0) {
|
var chartData = JSON.parse('{{ chart_data|safe }}');
|
||||||
const ctx = document.getElementById('moodChart').getContext('2d');
|
|
||||||
const dates = chartData.map(d => new Date(d.date_time));
|
|
||||||
const scores = chartData.map(d => d.mood_score);
|
|
||||||
|
|
||||||
const moodChart = new Chart(ctx, {
|
var dates = chartData.map(function(d) { return d.date_time; });
|
||||||
|
var scores = chartData.map(function(d) { return d.mood_score; });
|
||||||
|
|
||||||
|
var myChart = new Chart(ctx, {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
data: {
|
data: {
|
||||||
labels: dates,
|
labels: dates,
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: 'Mood Score',
|
label: 'Mood Score',
|
||||||
data: scores,
|
data: scores,
|
||||||
borderColor: '#4f46e5', // primary-color
|
borderColor: 'rgba(75, 192, 192, 1)',
|
||||||
backgroundColor: 'rgba(79, 70, 229, 0.1)',
|
borderWidth: 1,
|
||||||
borderWidth: 2,
|
fill: false
|
||||||
fill: true,
|
|
||||||
tension: 0.4
|
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
responsive: true,
|
|
||||||
maintainAspectRatio: false,
|
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
type: 'time',
|
type: 'time',
|
||||||
time: {
|
time: {
|
||||||
unit: 'day',
|
unit: 'day'
|
||||||
tooltipFormat: 'MMM dd, yyyy',
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
display: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
y: {
|
y: {
|
||||||
beginAtZero: true,
|
beginAtZero: true
|
||||||
max: 10,
|
|
||||||
grid: {
|
|
||||||
color: '#e5e7eb'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
plugins: {
|
|
||||||
legend: {
|
|
||||||
display: false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,84 +1,55 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% load static %}
|
|
||||||
|
|
||||||
{% block title %}PixelMinds - Your Personal Health Companion{% endblock %}
|
{% block title %}{{ project_name }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="breathing-canvas">
|
<div class="container mt-5">
|
||||||
<div class="pulsing-circle"></div>
|
<div class="row mb-4">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h1>Welcome to {{ project_name }}</h1>
|
||||||
|
<p>Your personal space to reflect and grow.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 text-md-end">
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
<a href="{% url 'core:create_mood_entry' %}" class="btn btn-primary">+ Log New Mood</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="{% url 'admin:login' %}" class="btn btn-primary">Log In</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% include 'core/mood_modal.html' %}
|
{% if user.is_authenticated %}
|
||||||
{% endblock %}
|
<h2>Your Recent Moods</h2>
|
||||||
|
{% if mood_entries %}
|
||||||
{% block extra_js %}
|
<div class="list-group">
|
||||||
<script>
|
{% for entry in mood_entries %}
|
||||||
const modal = document.getElementById('mood-modal');
|
<div class="list-group-item list-group-item-action flex-column align-items-start">
|
||||||
const pulsingCircle = document.querySelector('.pulsing-circle');
|
<div class="d-flex w-100 justify-content-between">
|
||||||
const closeButton = document.querySelector('.close-button');
|
<h5 class="mb-1">Mood Score: {{ entry.mood_score }}/5</h5>
|
||||||
const moodSlider = document.getElementById('mood-slider');
|
<small>{{ entry.date_time|date:"Y-m-d H:i" }}</small>
|
||||||
const activityBubbles = document.querySelectorAll('.activity-bubble');
|
</div>
|
||||||
const body = document.querySelector('body');
|
<p class="mb-1">{{ entry.note|truncatewords:30 }}</p>
|
||||||
const saveButton = document.getElementById('save-mood-button');
|
{% if entry.activities.all %}
|
||||||
|
<small>Activities:
|
||||||
const moodColors = {
|
{% for activity in entry.activities.all %}
|
||||||
1: ['#4b0082', '#8a2be2'], // Sad (Indigo, Deep Purple)
|
<span class="badge bg-secondary">{{ activity.name }}</span>
|
||||||
2: ['#6a5acd', '#836fff'], // Stressed (SlateBlue, MediumSlateBlue)
|
{% endfor %}
|
||||||
3: ['#87ceeb', '#add8e6'], // Neutral (SkyBlue, LightBlue)
|
</small>
|
||||||
4: ['#ffd700', '#ffec8b'], // Energetic (Gold, LightGoldenrod)
|
{% endif %}
|
||||||
5: ['#ffb6c1', '#ffc0cb'], // Happy (LightPink, Pink)
|
</div>
|
||||||
};
|
{% endfor %}
|
||||||
|
</div>
|
||||||
pulsingCircle.addEventListener('click', () => {
|
{% else %}
|
||||||
modal.style.display = 'block';
|
<p>You haven't logged any moods yet. <a href="{% url 'core:create_mood_entry' %}">Get started!</a></p>
|
||||||
});
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
closeButton.addEventListener('click', () => {
|
<div class="p-5 mb-4 bg-light rounded-3">
|
||||||
modal.style.display = 'none';
|
<div class="container-fluid py-5">
|
||||||
});
|
<h1 class="display-5 fw-bold">Track Your Mental Wellness</h1>
|
||||||
|
<p class="col-md-8 fs-4">Gain insights into your moods and activities to better understand your mental health. Log in to begin your journey.</p>
|
||||||
window.addEventListener('click', (event) => {
|
<a href="{% url 'admin:login' %}" class="btn btn-primary btn-lg">Log In & Get Started</a>
|
||||||
if (event.target == modal) {
|
</div>
|
||||||
modal.style.display = 'none';
|
</div>
|
||||||
}
|
{% endif %}
|
||||||
});
|
</div>
|
||||||
|
|
||||||
moodSlider.addEventListener('input', (event) => {
|
|
||||||
const moodValue = event.target.value;
|
|
||||||
const [color1, color2] = moodColors[moodValue];
|
|
||||||
body.style.background = `linear-gradient(45deg, ${color1}, ${color2})`;
|
|
||||||
});
|
|
||||||
|
|
||||||
activityBubbles.forEach(bubble => {
|
|
||||||
bubble.addEventListener('click', () => {
|
|
||||||
bubble.classList.toggle('selected');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
saveButton.addEventListener('click', () => {
|
|
||||||
const moodScore = moodSlider.value;
|
|
||||||
const selectedBubbles = document.querySelectorAll('.activity-bubble.selected');
|
|
||||||
const activityIds = Array.from(selectedBubbles).map(bubble => bubble.dataset.activityId);
|
|
||||||
|
|
||||||
fetch('{% url "core:save_mood_entry" %}', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
'X-CSRFToken': '{{ csrf_token }}',
|
|
||||||
},
|
|
||||||
body: JSON.stringify({
|
|
||||||
mood_score: moodScore,
|
|
||||||
activity_ids: activityIds,
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
if (data.status === 'success') {
|
|
||||||
modal.style.display = 'none';
|
|
||||||
} else {
|
|
||||||
alert('There was an error saving your entry.');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -1,21 +1,17 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% load static %}
|
|
||||||
|
|
||||||
{% block title %}New Mood Entry - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="section">
|
<div class="container mt-5">
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-lg-7">
|
<div class="col-md-8">
|
||||||
<div class="card shadow-lg border-0">
|
<div class="card">
|
||||||
<div class="card-body p-5">
|
<div class="card-header"><h2>Track Your Mood</h2></div>
|
||||||
<h1 class="section-title text-center mb-4">How are you feeling?</h1>
|
<div class="card-body">
|
||||||
<form method="post" novalidate>
|
<form method="post" novalidate>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-3">
|
||||||
<label for="{{ form.mood_score.id_for_label }}" class="form-label fs-5">Your Mood Score (1-10)</label>
|
<label for="id_mood_score" class="form-label">Mood Score (1-5)</label>
|
||||||
{{ form.mood_score }}
|
{{ form.mood_score }}
|
||||||
{% if form.mood_score.errors %}
|
{% if form.mood_score.errors %}
|
||||||
<div class="invalid-feedback d-block">
|
<div class="invalid-feedback d-block">
|
||||||
@ -24,8 +20,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-3">
|
||||||
<label for="{{ form.note.id_for_label }}" class="form-label fs-5">Notes</label>
|
<label for="id_note" class="form-label">Notes</label>
|
||||||
{{ form.note }}
|
{{ form.note }}
|
||||||
{% if form.note.errors %}
|
{% if form.note.errors %}
|
||||||
<div class="invalid-feedback d-block">
|
<div class="invalid-feedback d-block">
|
||||||
@ -34,11 +30,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-3">
|
||||||
<label class="form-label fs-5">Activities</label>
|
<label class="form-label">Activities</label>
|
||||||
<div id="id_activities" class="border rounded p-3 bg-light">
|
<div id="id_activities">
|
||||||
{% for checkbox in form.activities %}
|
{% for checkbox in form.activities %}
|
||||||
<div class="form-check form-check-inline me-3">
|
<div class="form-check">
|
||||||
{{ checkbox.tag }}
|
{{ checkbox.tag }}
|
||||||
<label class="form-check-label" for="{{ checkbox.id_for_label }}">{{ checkbox.choice_label }}</label>
|
<label class="form-check-label" for="{{ checkbox.id_for_label }}">{{ checkbox.choice_label }}</label>
|
||||||
</div>
|
</div>
|
||||||
@ -51,14 +47,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-grid">
|
<button type="submit" class="btn btn-primary">Save Mood</button>
|
||||||
<button type="submit" class="btn btn-primary btn-lg">Save Entry</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,21 +0,0 @@
|
|||||||
<div id="mood-modal" class="modal">
|
|
||||||
<div class="modal-content">
|
|
||||||
<span class="close-button">×</span>
|
|
||||||
<h2>How are you feeling?</h2>
|
|
||||||
<div class="mood-slider-container">
|
|
||||||
<input type="range" min="1" max="5" value="3" class="mood-slider" id="mood-slider">
|
|
||||||
<div class="mood-labels">
|
|
||||||
<span>Sad</span>
|
|
||||||
<span>Neutral</span>
|
|
||||||
<span>Happy</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h2>What have you been up to?</h2>
|
|
||||||
<div class="activity-bubbles">
|
|
||||||
{% for activity in activities %}
|
|
||||||
<div class="activity-bubble" data-activity-id="{{ activity.id }}">{{ activity.name }}</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
<button id="save-mood-button">Save</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
{% load static %}
|
|
||||||
|
|
||||||
{% block title %}Privacy Policy - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-8">
|
|
||||||
<div class="text-center mb-5">
|
|
||||||
<h1 class="section-title">Privacy Policy</h1>
|
|
||||||
<p class="lead">Your privacy is important to us. Last updated: December 22, 2025</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>It is PixelMinds's policy to respect your privacy regarding any information we may collect from you across our website. This Privacy Policy applies to all of our services.</p>
|
|
||||||
|
|
||||||
<h2 class="h4 mt-5">1. Information We Collect</h2>
|
|
||||||
<p>We only collect information about you if we have a reason to do so – for example, to provide our services, to communicate with you, or to make our services better. We collect this information from three sources: if and when you provide information to us, automatically through operating our services, and from outside sources.</p>
|
|
||||||
|
|
||||||
<h3 class="h5 mt-4">Information You Provide to Us</h3>
|
|
||||||
<ul>
|
|
||||||
<li><strong>Account Information:</strong> We collect information from you when you create an account, such as your name, email address, and password.</li>
|
|
||||||
<li><strong>Health Data:</strong> We collect the mood scores, notes, and activities you log through our service.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 class="h4 mt-5">2. How We Use Information</h2>
|
|
||||||
<p>We use the information we collect in various ways, including to:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Provide, operate, and maintain our website and services.</li>
|
|
||||||
<li>Improve, personalize, and expand our services.</li>
|
|
||||||
<li>Understand and analyze how you use our services.</li>
|
|
||||||
<li>Develop new products, services, features, and functionality.</li>
|
|
||||||
<li>Communicate with you for customer service, updates, and marketing purposes.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 class="h4 mt-5">3. Security</h2>
|
|
||||||
<p>We take reasonable precautions and follow industry best practices to protect your personal information and ensure that it is not inappropriately lost, misused, accessed, disclosed, altered, or destroyed.</p>
|
|
||||||
|
|
||||||
<h2 class="h4 mt-5">4. Changes to This Policy</h2>
|
|
||||||
<p>We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page. You are advised to review this Privacy Policy periodically for any changes.</p>
|
|
||||||
|
|
||||||
<hr class="my-5">
|
|
||||||
<p class="text-muted small">This is a generic, placeholder privacy policy. It is not legal advice. You must consult with a legal professional to create a policy that is compliant with all applicable laws and regulations for your business.</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block title %}Login - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-5">
|
|
||||||
<div class="card shadow-lg border-0">
|
|
||||||
<div class="card-body p-5">
|
|
||||||
<h1 class="section-title text-center mb-4">Welcome Back</h1>
|
|
||||||
|
|
||||||
{% if form.errors %}
|
|
||||||
<div class="alert alert-danger" role="alert">
|
|
||||||
Your username and password didn't match. Please try again.
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<form method="post" action="{% url 'login' %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="id_username" class="form-label">Username</label>
|
|
||||||
<input type="text" name="username" class="form-control" id="id_username" required>
|
|
||||||
</div>
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="id_password" class="form-label">Password</label>
|
|
||||||
<input type="password" name="password" class="form-control" id="id_password" required>
|
|
||||||
</div>
|
|
||||||
<div class="d-grid mb-3">
|
|
||||||
<button type="submit" class="btn btn-primary btn-lg">Login</button>
|
|
||||||
</div>
|
|
||||||
<p class="text-center"><a href="{% url 'password_reset' %}">Forgot password?</a></p>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p class="text-center mt-4">Don't have an account? <a href="{% url 'signup' %}">Sign up</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block title %}Change Password - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
|
||||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Change Password</h3></div>
|
|
||||||
<div class="card-body">
|
|
||||||
<form method="post">
|
|
||||||
{% csrf_token %}
|
|
||||||
{% if form.non_field_errors %}
|
|
||||||
<div class="alert alert-danger" role="alert">
|
|
||||||
{% for error in form.non_field_errors %}
|
|
||||||
{{ error }}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% for field in form %}
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
|
|
||||||
{{ field }}
|
|
||||||
{% if field.help_text %}
|
|
||||||
<small class="form-text text-muted">{{ field.help_text|safe }}</small>
|
|
||||||
{% endif %}
|
|
||||||
{% for error in field.errors %}
|
|
||||||
<div class="invalid-feedback d-block">
|
|
||||||
{{ error }}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<div class="d-grid">
|
|
||||||
<button type="submit" class="btn btn-primary btn-lg">Change My Password</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block title %}Password Change Complete - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
|
||||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Password Change Complete</h3></div>
|
|
||||||
<div class="card-body text-center">
|
|
||||||
<p class="lead">Your password has been successfully changed.</p>
|
|
||||||
<a href="{% url 'core:index' %}" class="btn btn-primary mt-3">Return to Home</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block title %}Forgot Your Password? - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
|
||||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Password Recovery</h3></div>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="small mb-3 text-muted">Enter your email address and we will send you a link to reset your password.</div>
|
|
||||||
<form method="post">
|
|
||||||
{% csrf_token %}
|
|
||||||
{% if form.non_field_errors %}
|
|
||||||
<div class="alert alert-danger" role="alert">
|
|
||||||
{% for error in form.non_field_errors %}
|
|
||||||
{{ error }}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% for field in form %}
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
|
|
||||||
{{ field }}
|
|
||||||
{% if field.help_text %}
|
|
||||||
<small class="form-text text-muted">{{ field.help_text }}</small>
|
|
||||||
{% endif %}
|
|
||||||
{% for error in field.errors %}
|
|
||||||
<div class="invalid-feedback d-block">
|
|
||||||
{{ error }}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<div class="d-flex align-items-center justify-content-between mt-4 mb-0">
|
|
||||||
<a class="small" href="{% url 'login' %}">Return to login</a>
|
|
||||||
<button type="submit" class="btn btn-primary">Reset Password</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="card-footer text-center py-3">
|
|
||||||
<div class="small"><a href="{% url 'core:signup' %}">Need an account? Sign up!</a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block title %}Password Reset Complete - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
|
||||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Password Reset Complete</h3></div>
|
|
||||||
<div class="card-body text-center">
|
|
||||||
<p class="lead">Your password has been set. You may go ahead and log in now.</p>
|
|
||||||
<a href="{% url 'login' %}" class="btn btn-primary mt-3">Return to Login</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block title %}Enter New Password - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
|
||||||
{% if validlink %}
|
|
||||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Reset Password</h3></div>
|
|
||||||
<div class="card-body">
|
|
||||||
<p class="text-muted text-center small mb-4">Please enter your new password twice so we can verify you typed it in correctly.</p>
|
|
||||||
<form method="post">
|
|
||||||
{% csrf_token %}
|
|
||||||
{% if form.non_field_errors %}
|
|
||||||
<div class="alert alert-danger" role="alert">
|
|
||||||
{% for error in form.non_field_errors %}
|
|
||||||
{{ error }}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% for field in form %}
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
|
|
||||||
{{ field }}
|
|
||||||
{% if field.help_text %}
|
|
||||||
<small class="form-text text-muted">{{ field.help_text|safe }}</small>
|
|
||||||
{% endif %}
|
|
||||||
{% for error in field.errors %}
|
|
||||||
<div class="invalid-feedback d-block">
|
|
||||||
{{ error }}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<div class="d-grid">
|
|
||||||
<button type="submit" class="btn btn-primary btn-lg">Change My Password</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
|
||||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Password Reset Failed</h3></div>
|
|
||||||
<div class="card-body text-center">
|
|
||||||
<p class="lead text-danger">The password reset link was invalid, possibly because it has already been used.</p>
|
|
||||||
<p>Please request a new password reset.</p>
|
|
||||||
<a href="{% url 'password_reset' %}" class="btn btn-primary mt-3">Request a New Password Reset</a>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block title %}Password Reset Sent - PixelMinds{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
|
||||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Password Reset Sent</h3></div>
|
|
||||||
<div class="card-body text-center">
|
|
||||||
<p class="lead">We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly.</p>
|
|
||||||
<p class="text-muted">If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder.</p>
|
|
||||||
<a href="{% url 'login' %}" class="btn btn-primary mt-3">Return to Login</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
{% load static %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<section class="section">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
|
||||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Create Account</h3></div>
|
|
||||||
<div class="card-body">
|
|
||||||
<form method="post">
|
|
||||||
{% csrf_token %}
|
|
||||||
{% if form.non_field_errors %}
|
|
||||||
<div class="alert alert-danger" role="alert">
|
|
||||||
{% for error in form.non_field_errors %}
|
|
||||||
{{ error }}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% for field in form %}
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
|
|
||||||
{{ field }}
|
|
||||||
{% if field.help_text %}
|
|
||||||
<small class="form-text text-muted">{{ field.help_text }}</small>
|
|
||||||
{% endif %}
|
|
||||||
{% for error in field.errors %}
|
|
||||||
<div class="invalid-feedback d-block">
|
|
||||||
{{ error }}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<div class="d-grid">
|
|
||||||
<button type="submit" class="btn btn-primary btn-lg">Sign Up</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="card-footer text-center py-3">
|
|
||||||
<div class="small"><a href="{% url 'login' %}">Have an account? Go to login</a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,16 +1,11 @@
|
|||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
|
||||||
from .views import home, create_mood_entry, dashboard, AboutView, ContactView, PrivacyPolicyView, SignUpView, save_mood_entry
|
from .views import home, create_mood_entry, dashboard
|
||||||
|
|
||||||
app_name = 'core'
|
app_name = 'core'
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("", home, name="index"),
|
path("", home, name="index"),
|
||||||
path('signup/', SignUpView.as_view(), name='signup'),
|
|
||||||
path('mood/new/', create_mood_entry, name='create_mood_entry'),
|
path('mood/new/', create_mood_entry, name='create_mood_entry'),
|
||||||
path('mood/save/', save_mood_entry, name='save_mood_entry'),
|
|
||||||
path('dashboard/', dashboard, name='dashboard'),
|
path('dashboard/', dashboard, name='dashboard'),
|
||||||
path('about/', AboutView.as_view(), name='about'),
|
|
||||||
path('contact/', ContactView.as_view(), name='contact'),
|
|
||||||
path('privacy-policy/', PrivacyPolicyView.as_view(), name='privacy_policy'),
|
|
||||||
]
|
]
|
||||||
@ -1,55 +1,14 @@
|
|||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import json
|
|
||||||
|
|
||||||
from django import get_version as django_version
|
from django import get_version as django_version
|
||||||
from django.shortcuts import render, redirect
|
from django.shortcuts import render, redirect
|
||||||
from django.urls import reverse_lazy
|
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
from django.views.generic import TemplateView, FormView, CreateView
|
from .forms import MoodEntryForm
|
||||||
|
from .models import MoodEntry
|
||||||
from django_pandas.io import read_frame
|
from django_pandas.io import read_frame
|
||||||
from django.contrib import messages
|
|
||||||
|
|
||||||
from .forms import MoodEntryForm, ContactForm, SignUpForm, DateRangeFilterForm
|
|
||||||
from .models import MoodEntry, Activity
|
|
||||||
from .mail import send_contact_message
|
|
||||||
|
|
||||||
|
|
||||||
class SignUpView(CreateView):
|
|
||||||
form_class = SignUpForm
|
|
||||||
success_url = reverse_lazy('login')
|
|
||||||
template_name = 'registration/signup.html'
|
|
||||||
|
|
||||||
|
|
||||||
class AboutView(TemplateView):
|
|
||||||
template_name = "core/about.html"
|
|
||||||
|
|
||||||
|
|
||||||
class ContactView(FormView):
|
|
||||||
template_name = "core/contact.html"
|
|
||||||
form_class = ContactForm
|
|
||||||
success_url = reverse_lazy('core:contact')
|
|
||||||
|
|
||||||
def form_valid(self, form):
|
|
||||||
name = form.cleaned_data['name']
|
|
||||||
email = form.cleaned_data['email']
|
|
||||||
message = form.cleaned_data['message']
|
|
||||||
|
|
||||||
# Send email
|
|
||||||
email_sent = send_contact_message(name, email, message)
|
|
||||||
|
|
||||||
if email_sent:
|
|
||||||
messages.success(self.request, 'Thank you for your message! We will get back to you shortly.')
|
|
||||||
else:
|
|
||||||
messages.error(self.request, 'Sorry, there was an error sending your message. Please try again later.')
|
|
||||||
|
|
||||||
return super().form_valid(form)
|
|
||||||
|
|
||||||
|
|
||||||
class PrivacyPolicyView(TemplateView):
|
|
||||||
template_name = "core/privacy_policy.html"
|
|
||||||
|
|
||||||
|
|
||||||
def home(request):
|
def home(request):
|
||||||
@ -60,8 +19,6 @@ def home(request):
|
|||||||
if request.user.is_authenticated:
|
if request.user.is_authenticated:
|
||||||
mood_entries = MoodEntry.objects.filter(user=request.user).order_by('-date_time')[:7]
|
mood_entries = MoodEntry.objects.filter(user=request.user).order_by('-date_time')[:7]
|
||||||
context['mood_entries'] = mood_entries
|
context['mood_entries'] = mood_entries
|
||||||
activities = Activity.objects.all()
|
|
||||||
context['activities'] = activities
|
|
||||||
|
|
||||||
return render(request, "core/index.html", context)
|
return render(request, "core/index.html", context)
|
||||||
|
|
||||||
@ -69,20 +26,10 @@ def home(request):
|
|||||||
@login_required
|
@login_required
|
||||||
def dashboard(request):
|
def dashboard(request):
|
||||||
mood_entries = MoodEntry.objects.filter(user=request.user).order_by('date_time')
|
mood_entries = MoodEntry.objects.filter(user=request.user).order_by('date_time')
|
||||||
form = DateRangeFilterForm(request.GET)
|
|
||||||
if form.is_valid():
|
|
||||||
start_date = form.cleaned_data.get('start_date')
|
|
||||||
end_date = form.cleaned_data.get('end_date')
|
|
||||||
if start_date:
|
|
||||||
mood_entries = mood_entries.filter(date_time__gte=start_date)
|
|
||||||
if end_date:
|
|
||||||
mood_entries = mood_entries.filter(date_time__lte=end_date)
|
|
||||||
|
|
||||||
df = read_frame(mood_entries, fieldnames=['date_time', 'mood_score'])
|
df = read_frame(mood_entries, fieldnames=['date_time', 'mood_score'])
|
||||||
if not df.empty:
|
|
||||||
df['date_time'] = df['date_time'].dt.strftime('%Y-%m-%d')
|
df['date_time'] = df['date_time'].dt.strftime('%Y-%m-%d')
|
||||||
chart_data = df.to_json(orient='records')
|
chart_data = df.to_json(orient='records')
|
||||||
return render(request, 'core/dashboard.html', {'chart_data': chart_data, 'form': form})
|
return render(request, 'core/dashboard.html', {'chart_data': chart_data})
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@ -113,23 +60,3 @@ def create_mood_entry(request):
|
|||||||
form = MoodEntryForm()
|
form = MoodEntryForm()
|
||||||
|
|
||||||
return render(request, 'core/mood_entry_form.html', {'form': form})
|
return render(request, 'core/mood_entry_form.html', {'form': form})
|
||||||
|
|
||||||
@login_required
|
|
||||||
def save_mood_entry(request):
|
|
||||||
if request.method == 'POST':
|
|
||||||
data = json.loads(request.body)
|
|
||||||
mood_score = data.get('mood_score')
|
|
||||||
activity_ids = data.get('activity_ids')
|
|
||||||
|
|
||||||
mood_entry = MoodEntry.objects.create(
|
|
||||||
user=request.user,
|
|
||||||
mood_score=mood_score
|
|
||||||
)
|
|
||||||
|
|
||||||
if activity_ids:
|
|
||||||
activities = Activity.objects.filter(id__in=activity_ids)
|
|
||||||
mood_entry.activities.set(activities)
|
|
||||||
|
|
||||||
return JsonResponse({'status': 'success'})
|
|
||||||
return JsonResponse({'status': 'error'}, status=400)
|
|
||||||
|
|
||||||
|
|||||||
@ -1,232 +1,4 @@
|
|||||||
|
/* Custom styles for the application */
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Lexend+Deca:wght@600;700&display=swap');
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--primary-color: #8a2be2; /* Deep purple */
|
|
||||||
--secondary-color: #4b0082; /* Indigo */
|
|
||||||
--light-gray: #f8f9fa;
|
|
||||||
--dark-gray: #1f2937;
|
|
||||||
--text-color: #e0e0e0; /* Lighter text for dark background */
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Inter', sans-serif;
|
font-family: system-ui, -apple-system, sans-serif;
|
||||||
color: var(--text-color);
|
|
||||||
background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
|
|
||||||
background-size: 400% 400%;
|
|
||||||
animation: gradient 15s ease infinite;
|
|
||||||
height: 100vh;
|
|
||||||
overflow: hidden; /* Prevent scrollbars */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes gradient {
|
|
||||||
0% {
|
|
||||||
background-position: 0% 50%;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
background-position: 100% 50%;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
background-position: 0% 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.breathing-canvas {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
height: 100%;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pulsing-circle {
|
|
||||||
width: 80px;
|
|
||||||
height: 80px;
|
|
||||||
background-color: rgba(255, 255, 255, 0.8);
|
|
||||||
border-radius: 50%;
|
|
||||||
cursor: pointer;
|
|
||||||
animation: pulse 2s infinite;
|
|
||||||
box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
|
|
||||||
position: absolute;
|
|
||||||
bottom: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes pulse {
|
|
||||||
0% {
|
|
||||||
transform: scale(0.95);
|
|
||||||
box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
|
|
||||||
}
|
|
||||||
70% {
|
|
||||||
transform: scale(1);
|
|
||||||
box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: scale(0.95);
|
|
||||||
box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.fw-medium {
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fw-semibold {
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fw-bold {
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar {
|
|
||||||
background-color: transparent !important;
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
top: 0;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-brand {
|
|
||||||
font-family: 'Lexend Deca', sans-serif;
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--text-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-link {
|
|
||||||
color: var(--text-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
background-color: transparent;
|
|
||||||
border-color: var(--text-color);
|
|
||||||
padding: 0.75rem 1.5rem;
|
|
||||||
font-weight: 500;
|
|
||||||
transition: all 0.2s ease-in-out;
|
|
||||||
color: var(--text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary:hover {
|
|
||||||
background-color: rgba(255, 255, 255, 0.1);
|
|
||||||
border-color: var(--text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Modal styles */
|
|
||||||
.modal {
|
|
||||||
display: none;
|
|
||||||
position: fixed;
|
|
||||||
z-index: 100;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: auto;
|
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-content {
|
|
||||||
background-color: #1f2937;
|
|
||||||
margin: 15% auto;
|
|
||||||
padding: 20px;
|
|
||||||
border: 1px solid #888;
|
|
||||||
width: 80%;
|
|
||||||
max-width: 500px;
|
|
||||||
border-radius: 20px;
|
|
||||||
animation: bloom 0.5s ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes bloom {
|
|
||||||
from {
|
|
||||||
transform: scale(0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
transform: scale(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.close-button {
|
|
||||||
color: #aaa;
|
|
||||||
float: right;
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.close-button:hover,
|
|
||||||
.close-button:focus {
|
|
||||||
color: white;
|
|
||||||
text-decoration: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Mood slider */
|
|
||||||
.mood-slider-container {
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mood-slider {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
width: 100%;
|
|
||||||
height: 15px;
|
|
||||||
border-radius: 5px;
|
|
||||||
background: #ddd;
|
|
||||||
outline: none;
|
|
||||||
opacity: 0.7;
|
|
||||||
-webkit-transition: .2s;
|
|
||||||
transition: opacity .2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mood-slider:hover {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mood-slider::-webkit-slider-thumb {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
appearance: none;
|
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--primary-color);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mood-slider::-moz-range-thumb {
|
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--primary-color);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mood-labels {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Activity bubbles */
|
|
||||||
.activity-bubbles {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 15px;
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.activity-bubble {
|
|
||||||
padding: 10px 20px;
|
|
||||||
border-radius: 20px;
|
|
||||||
background-color: #4b5563;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background-color 0.3s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.activity-bubble.selected {
|
|
||||||
background-color: var(--primary-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@ -1,232 +1,21 @@
|
|||||||
|
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Lexend+Deca:wght@600;700&display=swap');
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--primary-color: #8a2be2; /* Deep purple */
|
--bg-color-start: #6a11cb;
|
||||||
--secondary-color: #4b0082; /* Indigo */
|
--bg-color-end: #2575fc;
|
||||||
--light-gray: #f8f9fa;
|
--text-color: #ffffff;
|
||||||
--dark-gray: #1f2937;
|
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||||
--text-color: #e0e0e0; /* Lighter text for dark background */
|
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
margin: 0;
|
||||||
font-family: 'Inter', sans-serif;
|
font-family: 'Inter', sans-serif;
|
||||||
|
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
|
|
||||||
background-size: 400% 400%;
|
|
||||||
animation: gradient 15s ease infinite;
|
|
||||||
height: 100vh;
|
|
||||||
overflow: hidden; /* Prevent scrollbars */
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes gradient {
|
|
||||||
0% {
|
|
||||||
background-position: 0% 50%;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
background-position: 100% 50%;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
background-position: 0% 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.breathing-canvas {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
min-height: 100vh;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pulsing-circle {
|
|
||||||
width: 80px;
|
|
||||||
height: 80px;
|
|
||||||
background-color: rgba(255, 255, 255, 0.8);
|
|
||||||
border-radius: 50%;
|
|
||||||
cursor: pointer;
|
|
||||||
animation: pulse 2s infinite;
|
|
||||||
box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
|
|
||||||
position: absolute;
|
|
||||||
bottom: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes pulse {
|
|
||||||
0% {
|
|
||||||
transform: scale(0.95);
|
|
||||||
box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
|
|
||||||
}
|
|
||||||
70% {
|
|
||||||
transform: scale(1);
|
|
||||||
box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: scale(0.95);
|
|
||||||
box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.fw-medium {
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fw-semibold {
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fw-bold {
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar {
|
|
||||||
background-color: transparent !important;
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
top: 0;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-brand {
|
|
||||||
font-family: 'Lexend Deca', sans-serif;
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--text-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-link {
|
|
||||||
color: var(--text-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
background-color: transparent;
|
|
||||||
border-color: var(--text-color);
|
|
||||||
padding: 0.75rem 1.5rem;
|
|
||||||
font-weight: 500;
|
|
||||||
transition: all 0.2s ease-in-out;
|
|
||||||
color: var(--text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary:hover {
|
|
||||||
background-color: rgba(255, 255, 255, 0.1);
|
|
||||||
border-color: var(--text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Modal styles */
|
|
||||||
.modal {
|
|
||||||
display: none;
|
|
||||||
position: fixed;
|
|
||||||
z-index: 100;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: auto;
|
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-content {
|
|
||||||
background-color: #1f2937;
|
|
||||||
margin: 15% auto;
|
|
||||||
padding: 20px;
|
|
||||||
border: 1px solid #888;
|
|
||||||
width: 80%;
|
|
||||||
max-width: 500px;
|
|
||||||
border-radius: 20px;
|
|
||||||
animation: bloom 0.5s ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes bloom {
|
|
||||||
from {
|
|
||||||
transform: scale(0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
transform: scale(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.close-button {
|
|
||||||
color: #aaa;
|
|
||||||
float: right;
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.close-button:hover,
|
|
||||||
.close-button:focus {
|
|
||||||
color: white;
|
|
||||||
text-decoration: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Mood slider */
|
|
||||||
.mood-slider-container {
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mood-slider {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
width: 100%;
|
|
||||||
height: 15px;
|
|
||||||
border-radius: 5px;
|
|
||||||
background: #ddd;
|
|
||||||
outline: none;
|
|
||||||
opacity: 0.7;
|
|
||||||
-webkit-transition: .2s;
|
|
||||||
transition: opacity .2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mood-slider:hover {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mood-slider::-webkit-slider-thumb {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
appearance: none;
|
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--primary-color);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mood-slider::-moz-range-thumb {
|
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--primary-color);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mood-labels {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Activity bubbles */
|
|
||||||
.activity-bubbles {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 15px;
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.activity-bubble {
|
|
||||||
padding: 10px 20px;
|
|
||||||
border-radius: 20px;
|
|
||||||
background-color: #4b5563;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background-color 0.3s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.activity-bubble.selected {
|
|
||||||
background-color: var(--primary-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user