Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f00c92670 | ||
|
|
3c3b3ecffe |
BIN
assets/pasted-20260207-201453-28f355e3.jpg
Normal file
BIN
assets/pasted-20260207-201453-28f355e3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 173 KiB |
BIN
assets/vm-shot-2026-02-07T20-14-48-715Z.jpg
Normal file
BIN
assets/vm-shot-2026-02-07T20-14-48-715Z.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 173 KiB |
Binary file not shown.
Binary file not shown.
@ -180,3 +180,6 @@ if EMAIL_USE_SSL:
|
|||||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||||
|
|
||||||
|
LOGIN_REDIRECT_URL = '/'
|
||||||
|
LOGOUT_REDIRECT_URL = '/'
|
||||||
|
|||||||
@ -1,19 +1,3 @@
|
|||||||
"""
|
|
||||||
URL configuration for config project.
|
|
||||||
|
|
||||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
||||||
https://docs.djangoproject.com/en/5.2/topics/http/urls/
|
|
||||||
Examples:
|
|
||||||
Function views
|
|
||||||
1. Add an import: from my_app import views
|
|
||||||
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
|
||||||
Class-based views
|
|
||||||
1. Add an import: from other_app.views import Home
|
|
||||||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
|
||||||
Including another URLconf
|
|
||||||
1. Import the include() function: from django.urls import include, path
|
|
||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
|
||||||
"""
|
|
||||||
from django.contrib import admin
|
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
|
||||||
@ -21,6 +5,7 @@ from django.conf.urls.static import static
|
|||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
|
path("accounts/", include("django.contrib.auth.urls")),
|
||||||
path("", include("core.urls")),
|
path("", include("core.urls")),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
BIN
core/__pycache__/forms.cpython-311.pyc
Normal file
BIN
core/__pycache__/forms.cpython-311.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,24 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from .models import Course, Module, Lesson, UserProgress
|
||||||
|
|
||||||
# Register your models here.
|
@admin.register(Course)
|
||||||
|
class CourseAdmin(admin.ModelAdmin):
|
||||||
|
list_display = ('title', 'created_at')
|
||||||
|
search_fields = ('title',)
|
||||||
|
|
||||||
|
@admin.register(Module)
|
||||||
|
class ModuleAdmin(admin.ModelAdmin):
|
||||||
|
list_display = ('title', 'course', 'order')
|
||||||
|
list_filter = ('course',)
|
||||||
|
ordering = ('course', 'order')
|
||||||
|
|
||||||
|
@admin.register(Lesson)
|
||||||
|
class LessonAdmin(admin.ModelAdmin):
|
||||||
|
list_display = ('title', 'module', 'order')
|
||||||
|
list_filter = ('module__course', 'module')
|
||||||
|
ordering = ('module', 'order')
|
||||||
|
|
||||||
|
@admin.register(UserProgress)
|
||||||
|
class UserProgressAdmin(admin.ModelAdmin):
|
||||||
|
list_display = ('user', 'lesson', 'completed_at')
|
||||||
|
list_filter = ('user',)
|
||||||
33
core/forms.py
Normal file
33
core/forms.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
from django import forms
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
from .models import Profile, Course, Module, Lesson
|
||||||
|
|
||||||
|
class UserUpdateForm(forms.ModelForm):
|
||||||
|
email = forms.EmailField()
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = User
|
||||||
|
fields = ['username', 'email', 'first_name', 'last_name']
|
||||||
|
|
||||||
|
class ProfileUpdateForm(forms.ModelForm):
|
||||||
|
class Meta:
|
||||||
|
model = Profile
|
||||||
|
fields = ['bio', 'location', 'birth_date', 'avatar']
|
||||||
|
widgets = {
|
||||||
|
'birth_date': forms.DateInput(attrs={'type': 'date'}),
|
||||||
|
}
|
||||||
|
|
||||||
|
class CourseForm(forms.ModelForm):
|
||||||
|
class Meta:
|
||||||
|
model = Course
|
||||||
|
fields = ['title', 'description', 'image']
|
||||||
|
|
||||||
|
class ModuleForm(forms.ModelForm):
|
||||||
|
class Meta:
|
||||||
|
model = Module
|
||||||
|
fields = ['title', 'order']
|
||||||
|
|
||||||
|
class LessonForm(forms.ModelForm):
|
||||||
|
class Meta:
|
||||||
|
model = Lesson
|
||||||
|
fields = ['title', 'content', 'order']
|
||||||
0
core/management/__init__.py
Normal file
0
core/management/__init__.py
Normal file
BIN
core/management/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
core/management/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
0
core/management/commands/__init__.py
Normal file
0
core/management/commands/__init__.py
Normal file
BIN
core/management/commands/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
core/management/commands/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
BIN
core/management/commands/__pycache__/seed_data.cpython-311.pyc
Normal file
BIN
core/management/commands/__pycache__/seed_data.cpython-311.pyc
Normal file
Binary file not shown.
61
core/management/commands/seed_data.py
Normal file
61
core/management/commands/seed_data.py
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
from django.core.management.base import BaseCommand
|
||||||
|
from core.models import Course, Module, Lesson
|
||||||
|
|
||||||
|
class Command(BaseCommand):
|
||||||
|
help = 'Seeds initial Python course data'
|
||||||
|
|
||||||
|
def handle(self, *args, **kwargs):
|
||||||
|
# Python Fundamentals
|
||||||
|
course1, created = Course.objects.get_or_create(
|
||||||
|
title='Python Fundamentals',
|
||||||
|
defaults={'description': 'A comprehensive guide to Python for absolute beginners. High-contrast learning.'}
|
||||||
|
)
|
||||||
|
|
||||||
|
m1, _ = Module.objects.get_or_create(course=course1, title='Getting Started', order=1)
|
||||||
|
m2, _ = Module.objects.get_or_create(course=course1, title='Control Flow', order=2)
|
||||||
|
m3, _ = Module.objects.get_or_create(course=course1, title='Data Structures', order=3)
|
||||||
|
|
||||||
|
Lesson.objects.get_or_create(
|
||||||
|
module=m1, title='Installation & Setup',
|
||||||
|
defaults={'content': 'In this lesson, we will install Python 3.11 and set up a minimalist IDE like VS Code or just use a terminal.', 'order': 1}
|
||||||
|
)
|
||||||
|
Lesson.objects.get_or_create(
|
||||||
|
module=m1, title='Variables & Data Types',
|
||||||
|
defaults={'content': 'Python is dynamically typed. Learn about integers, strings, and booleans.', 'order': 2}
|
||||||
|
)
|
||||||
|
Lesson.objects.get_or_create(
|
||||||
|
module=m2, title='If-Else Statements',
|
||||||
|
defaults={'content': 'Logic flows. If this then that. Else something else.', 'order': 1}
|
||||||
|
)
|
||||||
|
Lesson.objects.get_or_create(
|
||||||
|
module=m3, title='Lists & Tuples',
|
||||||
|
defaults={'content': 'Learn how to store multiple items in a single variable using lists and immutable tuples.', 'order': 1}
|
||||||
|
)
|
||||||
|
Lesson.objects.get_or_create(
|
||||||
|
module=m3, title='Dictionaries & Sets',
|
||||||
|
defaults={'content': 'Master key-value pairs and unique collections of items.', 'order': 2}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Advanced Python
|
||||||
|
course2, created = Course.objects.get_or_create(
|
||||||
|
title='Advanced Python',
|
||||||
|
defaults={'description': 'Take your Python skills to the next level with complex architectures and patterns.'}
|
||||||
|
)
|
||||||
|
|
||||||
|
am1, _ = Module.objects.get_or_create(course=course2, title='Object Oriented Programming', order=1)
|
||||||
|
am2, _ = Module.objects.get_or_create(course=course2, title='Decorators & Generators', order=2)
|
||||||
|
|
||||||
|
Lesson.objects.get_or_create(
|
||||||
|
module=am1, title='Classes and Objects',
|
||||||
|
defaults={'content': 'Understand the core concepts of OOP: how to define classes and instantiate objects.', 'order': 1}
|
||||||
|
)
|
||||||
|
Lesson.objects.get_or_create(
|
||||||
|
module=am1, title='Inheritance',
|
||||||
|
defaults={'content': 'Learn how to create subclasses that inherit attributes and methods from a parent class.', 'order': 2}
|
||||||
|
)
|
||||||
|
Lesson.objects.get_or_create(
|
||||||
|
module=am2, title='Function Decorators',
|
||||||
|
defaults={'content': 'Enhance your functions without modifying their source code using decorators.', 'order': 1}
|
||||||
|
)
|
||||||
|
|
||||||
|
self.stdout.write(self.style.SUCCESS('Successfully seeded extended Python Lern data'))
|
||||||
66
core/migrations/0001_initial.py
Normal file
66
core/migrations/0001_initial.py
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# Generated by Django 5.2.7 on 2026-02-05 15:28
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Course',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('title', models.CharField(max_length=255)),
|
||||||
|
('description', models.TextField()),
|
||||||
|
('image', models.ImageField(blank=True, null=True, upload_to='courses/')),
|
||||||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('updated_at', models.DateTimeField(auto_now=True)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Module',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('title', models.CharField(max_length=255)),
|
||||||
|
('order', models.PositiveIntegerField(default=0)),
|
||||||
|
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='modules', to='core.course')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'ordering': ['order'],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Lesson',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('title', models.CharField(max_length=255)),
|
||||||
|
('content', models.TextField()),
|
||||||
|
('order', models.PositiveIntegerField(default=0)),
|
||||||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('module', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lessons', to='core.module')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'ordering': ['order'],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='UserProgress',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('completed_at', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.lesson')),
|
||||||
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'unique_together': {('user', 'lesson')},
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
||||||
27
core/migrations/0002_profile.py
Normal file
27
core/migrations/0002_profile.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Generated by Django 5.2.7 on 2026-02-07 19:56
|
||||||
|
|
||||||
|
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='Profile',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('bio', models.TextField(blank=True, max_length=500)),
|
||||||
|
('location', models.CharField(blank=True, max_length=100)),
|
||||||
|
('birth_date', models.DateField(blank=True, null=True)),
|
||||||
|
('avatar', models.ImageField(blank=True, null=True, upload_to='avatars/')),
|
||||||
|
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
21
core/migrations/0003_course_author.py
Normal file
21
core/migrations/0003_course_author.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Generated by Django 5.2.7 on 2026-02-07 20:06
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0002_profile'),
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='course',
|
||||||
|
name='author',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='courses_created', to=settings.AUTH_USER_MODEL),
|
||||||
|
),
|
||||||
|
]
|
||||||
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
Binary file not shown.
BIN
core/migrations/__pycache__/0002_profile.cpython-311.pyc
Normal file
BIN
core/migrations/__pycache__/0002_profile.cpython-311.pyc
Normal file
Binary file not shown.
BIN
core/migrations/__pycache__/0003_course_author.cpython-311.pyc
Normal file
BIN
core/migrations/__pycache__/0003_course_author.cpython-311.pyc
Normal file
Binary file not shown.
@ -1,3 +1,72 @@
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
from django.db.models.signals import post_save
|
||||||
|
from django.dispatch import receiver
|
||||||
|
|
||||||
# Create your models here.
|
class Profile(models.Model):
|
||||||
|
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||||
|
bio = models.TextField(max_length=500, blank=True)
|
||||||
|
location = models.CharField(max_length=100, blank=True)
|
||||||
|
birth_date = models.DateField(null=True, blank=True)
|
||||||
|
avatar = models.ImageField(upload_to='avatars/', null=True, blank=True)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"{self.user.username}'s Profile"
|
||||||
|
|
||||||
|
@receiver(post_save, sender=User)
|
||||||
|
def create_user_profile(sender, instance, created, **kwargs):
|
||||||
|
if created:
|
||||||
|
Profile.objects.get_or_create(user=instance)
|
||||||
|
|
||||||
|
@receiver(post_save, sender=User)
|
||||||
|
def save_user_profile(sender, instance, **kwargs):
|
||||||
|
if hasattr(instance, 'profile'):
|
||||||
|
instance.profile.save()
|
||||||
|
else:
|
||||||
|
Profile.objects.create(user=instance)
|
||||||
|
|
||||||
|
class Course(models.Model):
|
||||||
|
author = models.ForeignKey(User, on_delete=models.CASCADE, related_name='courses_created', null=True, blank=True)
|
||||||
|
title = models.CharField(max_length=255)
|
||||||
|
description = models.TextField()
|
||||||
|
image = models.ImageField(upload_to='courses/', null=True, blank=True)
|
||||||
|
created_at = models.DateTimeField(auto_now_add=True)
|
||||||
|
updated_at = models.DateTimeField(auto_now=True)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.title
|
||||||
|
|
||||||
|
class Module(models.Model):
|
||||||
|
course = models.ForeignKey(Course, related_name='modules', on_delete=models.CASCADE)
|
||||||
|
title = models.CharField(max_length=255)
|
||||||
|
order = models.PositiveIntegerField(default=0)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
ordering = ['order']
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"{self.course.title} - {self.title}"
|
||||||
|
|
||||||
|
class Lesson(models.Model):
|
||||||
|
module = models.ForeignKey(Module, related_name='lessons', on_delete=models.CASCADE)
|
||||||
|
title = models.CharField(max_length=255)
|
||||||
|
content = models.TextField()
|
||||||
|
order = models.PositiveIntegerField(default=0)
|
||||||
|
created_at = models.DateTimeField(auto_now_add=True)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
ordering = ['order']
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.title
|
||||||
|
|
||||||
|
class UserProgress(models.Model):
|
||||||
|
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||||
|
lesson = models.ForeignKey(Lesson, on_delete=models.CASCADE)
|
||||||
|
completed_at = models.DateTimeField(auto_now_add=True)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
unique_together = ('user', 'lesson')
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"{self.user.username} completed {self.lesson.title}"
|
||||||
@ -1,25 +1,170 @@
|
|||||||
|
{% load static %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{% block title %}Knowledge Base{% endblock %}</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
{% if project_description %}
|
<title>DevLearn - Modern Learning for Developers</title>
|
||||||
<meta name="description" content="{{ project_description }}">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<meta property="og:description" content="{{ project_description }}">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
|
||||||
<meta property="twitter:description" content="{{ project_description }}">
|
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={% now 'U' %}">
|
||||||
{% endif %}
|
<style>
|
||||||
{% if project_image_url %}
|
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
|
||||||
<meta property="og:image" content="{{ project_image_url }}">
|
|
||||||
<meta property="twitter:image" content="{{ project_image_url }}">
|
:root {
|
||||||
{% endif %}
|
--bs-body-font-family: 'Space Grotesk', sans-serif;
|
||||||
{% load static %}
|
}
|
||||||
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
|
||||||
{% block head %}{% endblock %}
|
/* Ensure smooth transition for theme change */
|
||||||
|
html, body {
|
||||||
|
transition: background-color 0.3s ease, color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
border-bottom: 2px solid var(--bw-border, #000);
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand {
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link {
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
border-top: 2px solid var(--bw-border, #000);
|
||||||
|
margin-top: 5rem;
|
||||||
|
padding: 3rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Theme Toggle Button Specifics */
|
||||||
|
.theme-toggle {
|
||||||
|
cursor: pointer;
|
||||||
|
border: 2px solid var(--bw-text, #000);
|
||||||
|
background: var(--bw-bg, #fff);
|
||||||
|
color: var(--bw-text, #000);
|
||||||
|
padding: 5px 15px;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-left: 15px;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-toggle:hover {
|
||||||
|
background: var(--bw-text, #000);
|
||||||
|
color: var(--bw-bg, #fff);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
// Check for saved theme preference or use system preference
|
||||||
|
const getPreferredTheme = () => {
|
||||||
|
const savedTheme = localStorage.getItem('theme');
|
||||||
|
if (savedTheme) {
|
||||||
|
return savedTheme;
|
||||||
|
}
|
||||||
|
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||||
|
};
|
||||||
|
|
||||||
|
const setTheme = (theme) => {
|
||||||
|
document.documentElement.setAttribute('data-theme', theme);
|
||||||
|
localStorage.setItem('theme', theme);
|
||||||
|
|
||||||
|
// Update button text
|
||||||
|
const themeToggle = document.getElementById('theme-toggle');
|
||||||
|
if (themeToggle) {
|
||||||
|
themeToggle.innerText = theme === 'dark' ? 'W/B' : 'B/W';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Initialize theme before page load to prevent flicker
|
||||||
|
document.documentElement.setAttribute('data-theme', getPreferredTheme());
|
||||||
|
|
||||||
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const themeToggle = document.getElementById('theme-toggle');
|
||||||
|
if (themeToggle) {
|
||||||
|
// Set initial button text
|
||||||
|
themeToggle.innerText = getPreferredTheme() === 'dark' ? 'W/B' : 'B/W';
|
||||||
|
|
||||||
|
themeToggle.addEventListener('click', () => {
|
||||||
|
const currentTheme = document.documentElement.getAttribute('data-theme');
|
||||||
|
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
|
||||||
|
setTheme(newTheme);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
<body class="bw-bg bw-text">
|
||||||
|
<nav class="navbar navbar-expand-lg py-3 sticky-top bw-bg">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand bw-text" href="{% url 'index' %}">DevLearn</a>
|
||||||
|
<button class="navbar-toggler border-2 rounded-0 bw-border" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav ms-auto align-items-center">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link px-3 bw-text" href="{% url 'index' %}">Courses</a>
|
||||||
|
</li>
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link px-3 bw-text" href="{% url 'dashboard' %}">Dashboard</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link px-3 bw-text" href="{% url 'profile' %}">Profile</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item ms-lg-2">
|
||||||
|
<form method="post" action="{% url 'logout' %}" class="d-inline">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button type="submit" class="btn btn-bw rounded-0 px-4 text-uppercase fw-bold small">Logout</button>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
{% else %}
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link px-3 bw-text" href="{% url 'login' %}">Login</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item ms-lg-2">
|
||||||
|
<a class="btn btn-bw rounded-0 px-4 text-uppercase fw-bold small" href="{% url 'signup' %}">Join Now</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
<li class="nav-item">
|
||||||
|
<button id="theme-toggle" class="theme-toggle">B/W</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
<body>
|
<main class="min-vh-100">
|
||||||
{% block content %}{% endblock %}
|
{% if messages %}
|
||||||
|
<div class="container mt-3">
|
||||||
|
{% for message in messages %}
|
||||||
|
<div class="alert alert-bw alert-dismissible fade show rounded-0 border-2" role="alert">
|
||||||
|
{{ message }}
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% endblock %}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="bw-bg bw-border">
|
||||||
|
<div class="container text-center">
|
||||||
|
<p class="fw-bold text-uppercase small mb-0 bw-text">© 2026 DevLearn. Built for developers by developers.</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
18
core/templates/core/course_confirm_delete.html
Normal file
18
core/templates/core/course_confirm_delete.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container mt-5">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-lg-6 text-center">
|
||||||
|
<h1 class="display-4 fw-bold text-uppercase mb-4">Delete Course?</h1>
|
||||||
|
<p class="lead mb-5">Are you sure you want to delete <strong>"{{ object.title }}"</strong>? This action cannot be undone and all associated modules and lessons will be lost.</p>
|
||||||
|
|
||||||
|
<form method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button type="submit" class="btn btn-danger btn-lg rounded-0 border-2 px-5 me-3">Yes, Delete</button>
|
||||||
|
<a href="{% url 'dashboard' %}" class="btn btn-outline-dark btn-lg rounded-0 border-2 px-5">Cancel</a>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
49
core/templates/core/course_detail.html
Normal file
49
core/templates/core/course_detail.html
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block title %}{{ course.title }} - Python Lern App{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<header class="py-5 border-bottom border-2 bw-border">
|
||||||
|
<div class="container">
|
||||||
|
<a href="{% url 'home' %}" class="bw-text text-decoration-none font-mono small mb-3 d-block">← BACK_TO_PATHS</a>
|
||||||
|
<h1 class="display-4">{{ course.title }}</h1>
|
||||||
|
<p class="lead font-mono mt-3">{{ course.description }}</p>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section class="py-5">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<h2 class="mb-5">SYLLABUS_MAP</h2>
|
||||||
|
<div class="module-list">
|
||||||
|
{% for module in modules %}
|
||||||
|
<div class="module-item">
|
||||||
|
<h3 class="h5 font-mono mb-3">{{ module.title|upper }}</h3>
|
||||||
|
<div class="list-group list-group-flush border-top bw-border">
|
||||||
|
{% for lesson in module.lessons.all %}
|
||||||
|
<a href="{% url 'lesson_detail' lesson.pk %}" class="list-group-item list-group-item-action border-bottom bw-border px-0 py-3 d-flex justify-content-between align-items-center">
|
||||||
|
<span class="font-mono">{{ lesson.title }}</span>
|
||||||
|
<span class="btn btn-bw-outline btn-sm">START</span>
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% empty %}
|
||||||
|
<p class="font-mono">THIS PATH IS CURRENTLY UNDER CONSTRUCTION.</p>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<div class="card card-bw p-4 sticky-top" style="top: 100px;">
|
||||||
|
<h3 class="h5 mb-3">PATH_PROGRESS</h3>
|
||||||
|
<div class="progress mb-3 border bw-border rounded-0" style="height: 30px;">
|
||||||
|
<div class="progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
|
||||||
|
</div>
|
||||||
|
<p class="small font-mono">COMPLETE LESSONS TO TRACK YOUR PROGRESS.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
78
core/templates/core/course_form.html
Normal file
78
core/templates/core/course_form.html
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container mt-5">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<div class="mb-4">
|
||||||
|
<a href="{% url 'dashboard' %}" class="text-dark text-decoration-none text-uppercase fw-bold">
|
||||||
|
<i class="bi bi-arrow-left"></i> Back to Dashboard
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="display-5 fw-bold text-uppercase mb-4">{{ title }}</h1>
|
||||||
|
|
||||||
|
<div class="card border-2 rounded-0 shadow-sm mb-5">
|
||||||
|
<div class="card-body p-4">
|
||||||
|
<form method="POST" enctype="multipart/form-data">
|
||||||
|
{% csrf_token %}
|
||||||
|
{% for field in form %}
|
||||||
|
<div class="mb-4">
|
||||||
|
<label class="form-label fw-bold text-uppercase small">{{ field.label }}</label>
|
||||||
|
{{ field }}
|
||||||
|
{% if field.errors %}
|
||||||
|
<div class="text-danger small mt-1">{{ field.errors }}</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
<button type="submit" class="btn btn-dark btn-lg w-100 rounded-0 border-2">Save Course</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if form.instance.pk %}
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-4 mt-5">
|
||||||
|
<h2 class="h3 fw-bold text-uppercase m-0">Modules</h2>
|
||||||
|
<a href="{% url 'module_create' form.instance.pk %}" class="btn btn-outline-dark btn-sm rounded-0 border-2">Add Module</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="list-group rounded-0 shadow-sm border-2 mb-5">
|
||||||
|
{% for module in form.instance.modules.all %}
|
||||||
|
<div class="list-group-item border-start-0 border-end-0 border-top-0 p-4">
|
||||||
|
<div class="d-flex justify-content-between align-items-start">
|
||||||
|
<div>
|
||||||
|
<h5 class="fw-bold text-uppercase mb-1">{{ module.title }}</h5>
|
||||||
|
<small class="text-muted">Order: {{ module.order }}</small>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="{% url 'module_edit' module.pk %}" class="btn btn-sm btn-outline-dark rounded-0 border-2">Edit Module</a>
|
||||||
|
<a href="{% url 'lesson_create' module.pk %}" class="btn btn-sm btn-dark rounded-0 border-2 ms-2">Add Lesson</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if module.lessons.all %}
|
||||||
|
<div class="mt-3 ps-4 border-start border-2">
|
||||||
|
<h6 class="small fw-bold text-uppercase text-muted mb-2">Lessons:</h6>
|
||||||
|
<ul class="list-unstyled mb-0">
|
||||||
|
{% for lesson in module.lessons.all %}
|
||||||
|
<li class="mb-2 d-flex justify-content-between align-items-center">
|
||||||
|
<span class="small">{{ lesson.title }} (Order: {{ lesson.order }})</span>
|
||||||
|
<a href="{% url 'lesson_edit' lesson.pk %}" class="btn btn-link btn-sm p-0 text-dark text-decoration-none">Edit</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% empty %}
|
||||||
|
<div class="list-group-item p-4 text-center">
|
||||||
|
<p class="text-muted mb-0">No modules yet.</p>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
35
core/templates/core/dashboard.html
Normal file
35
core/templates/core/dashboard.html
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container mt-5">
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||||
|
<h1 class="display-4 fw-bold text-uppercase">Management Dashboard</h1>
|
||||||
|
<a href="{% url 'course_create' %}" class="btn btn-dark btn-lg px-4 rounded-0 shadow-sm border-2">Add New Course</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
{% for course in courses %}
|
||||||
|
<div class="col-md-6 mb-4">
|
||||||
|
<div class="card h-100 border-2 rounded-0 shadow-sm">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title fw-bold text-uppercase">{{ course.title }}</h5>
|
||||||
|
<p class="card-text text-muted">{{ course.description|truncatewords:20 }}</p>
|
||||||
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
|
<div>
|
||||||
|
<a href="{% url 'course_edit' course.pk %}" class="btn btn-outline-dark btn-sm rounded-0 border-2">Edit</a>
|
||||||
|
<a href="{% url 'course_delete' course.pk %}" class="btn btn-outline-danger btn-sm rounded-0 border-2">Delete</a>
|
||||||
|
</div>
|
||||||
|
<small class="text-muted">Created: {{ course.created_at|date:"M d, Y" }}</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% empty %}
|
||||||
|
<div class="col-12 text-center py-5 border-2 border-dashed">
|
||||||
|
<p class="lead text-muted mb-4">You haven't created any courses yet.</p>
|
||||||
|
<a href="{% url 'course_create' %}" class="btn btn-dark rounded-0 border-2">Get Started</a>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
@ -1,145 +1,52 @@
|
|||||||
{% extends "base.html" %}
|
{% extends 'base.html' %}
|
||||||
|
{% load static %}
|
||||||
{% block title %}{{ project_name }}{% endblock %}
|
|
||||||
|
|
||||||
{% block head %}
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
|
||||||
<style>
|
|
||||||
:root {
|
|
||||||
--bg-color-start: #6a11cb;
|
|
||||||
--bg-color-end: #2575fc;
|
|
||||||
--text-color: #ffffff;
|
|
||||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
|
||||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
font-family: 'Inter', sans-serif;
|
|
||||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
|
||||||
color: var(--text-color);
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
min-height: 100vh;
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
body::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M-10 10L110 10M10 -10L10 110' stroke-width='1' stroke='rgba(255,255,255,0.05)'/></svg>");
|
|
||||||
animation: bg-pan 20s linear infinite;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes bg-pan {
|
|
||||||
0% {
|
|
||||||
background-position: 0% 0%;
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
background-position: 100% 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
padding: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
background: var(--card-bg-color);
|
|
||||||
border: 1px solid var(--card-border-color);
|
|
||||||
border-radius: 16px;
|
|
||||||
padding: 2.5rem 2rem;
|
|
||||||
backdrop-filter: blur(20px);
|
|
||||||
-webkit-backdrop-filter: blur(20px);
|
|
||||||
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: clamp(2.2rem, 3vw + 1.2rem, 3.2rem);
|
|
||||||
font-weight: 700;
|
|
||||||
margin: 0 0 1.2rem;
|
|
||||||
letter-spacing: -0.02em;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0.5rem 0;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
opacity: 0.92;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loader {
|
|
||||||
margin: 1.5rem auto;
|
|
||||||
width: 56px;
|
|
||||||
height: 56px;
|
|
||||||
border: 4px solid rgba(255, 255, 255, 0.25);
|
|
||||||
border-top-color: #fff;
|
|
||||||
border-radius: 50%;
|
|
||||||
animation: spin 1s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes spin {
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.runtime code {
|
|
||||||
background: rgba(0, 0, 0, 0.25);
|
|
||||||
padding: 0.15rem 0.45rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sr-only {
|
|
||||||
position: absolute;
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
padding: 0;
|
|
||||||
margin: -1px;
|
|
||||||
overflow: hidden;
|
|
||||||
clip: rect(0, 0, 0, 0);
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 1rem;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
opacity: 0.75;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<main>
|
<section class="hero-bw text-center">
|
||||||
<div class="card">
|
<div class="container">
|
||||||
<h1>Analyzing your requirements and generating your app…</h1>
|
<div class="hero-content">
|
||||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
<h1 class="display-3 mb-0">PYTHON_MASTER</h1>
|
||||||
<span class="sr-only">Loading…</span>
|
<p class="lead font-mono mt-3">STRONGLY TYPED. MINIMALLY DESIGNED.</p>
|
||||||
|
<div class="mt-4">
|
||||||
|
<a href="#courses" class="btn btn-bw">EXPLORE PATHS</a>
|
||||||
</div>
|
</div>
|
||||||
<p class="hint">AppWizzy AI is collecting your requirements and applying the first changes.</p>
|
</div>
|
||||||
<p class="hint">This page will refresh automatically as the plan is implemented.</p>
|
</div>
|
||||||
<p class="runtime">
|
</section>
|
||||||
Runtime: Django <code>{{ django_version }}</code> · Python <code>{{ python_version }}</code>
|
|
||||||
— UTC <code>{{ current_time|date:"Y-m-d H:i:s" }}</code>
|
<section id="courses" class="py-5">
|
||||||
|
<div class="container">
|
||||||
|
<h2 class="mb-5 text-center">LEARNING_PATHS</h2>
|
||||||
|
<div class="row g-4">
|
||||||
|
{% for course in courses %}
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card card-bw h-100 p-4">
|
||||||
|
<h3 class="h4 mb-3">{{ course.title }}</h3>
|
||||||
|
<p class="text-muted small mb-4">{{ course.description|truncatewords:20 }}</p>
|
||||||
|
<div class="mt-auto">
|
||||||
|
<a href="{% url 'course_detail' course.pk %}" class="btn btn-bw-outline w-100">VIEW PATH</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% empty %}
|
||||||
|
<div class="col-12 text-center py-5">
|
||||||
|
<p class="font-mono">NO PATHS AVAILABLE YET. CHECK BACK SOON.</p>
|
||||||
|
{% if user.is_staff %}
|
||||||
|
<a href="/admin/core/course/add/" class="btn btn-bw">ADD FIRST COURSE</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="py-5 section-inverted w-100 text-center">
|
||||||
|
<div class="container">
|
||||||
|
<h2 class="mb-4">WHY_B&W?</h2>
|
||||||
|
<p class="lead font-mono mx-auto" style="max-width: 700px;">
|
||||||
|
WE REMOVE ALL DISTRACTIONS. NO COLORS. NO FLUFF. JUST YOU AND THE CODE.
|
||||||
|
FOCUS ON LOGIC, SYNTAX, AND ARCHITECTURE.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</section>
|
||||||
<footer>
|
|
||||||
Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC)
|
|
||||||
</footer>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
36
core/templates/core/lesson_detail.html
Normal file
36
core/templates/core/lesson_detail.html
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block title %}{{ lesson.title }} - Python Lern App{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<header class="py-4 border-bottom border-1 bw-border" style="background-color: var(--bw-grey-light);">
|
||||||
|
<div class="container">
|
||||||
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
|
<a href="{% url 'course_detail' lesson.module.course.pk %}" class="bw-text text-decoration-none font-mono small">← BACK_TO_MODULE</a>
|
||||||
|
<span class="font-mono small badge btn-bw px-3 py-2 rounded-0" style="border: none; cursor: default;">{{ lesson.module.title|upper }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section class="py-5">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<h1 class="mb-5 display-5">{{ lesson.title }}</h1>
|
||||||
|
|
||||||
|
<div class="lesson-content mb-5">
|
||||||
|
{{ lesson.content|safe|linebreaks }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card card-bw p-5 text-center mt-5">
|
||||||
|
<h3 class="mb-4">LESSON_COMPLETE?</h3>
|
||||||
|
<div class="d-flex justify-content-center gap-3">
|
||||||
|
<a href="{% url 'course_detail' lesson.module.course.pk %}" class="btn btn-bw">YES, NEXT LESSON</a>
|
||||||
|
<button class="btn btn-bw-outline" onclick="window.scrollTo({top: 0, behavior: 'smooth'})">REVIEW_AGAIN</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
36
core/templates/core/lesson_form.html
Normal file
36
core/templates/core/lesson_form.html
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container mt-5">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<div class="mb-4">
|
||||||
|
<a href="{% url 'course_edit' module.course.pk %}" class="text-dark text-decoration-none text-uppercase fw-bold">
|
||||||
|
<i class="bi bi-arrow-left"></i> Back to Course
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="display-5 fw-bold text-uppercase mb-4">Lesson Management</h1>
|
||||||
|
<p class="text-muted mb-4">Module: <strong>{{ module.title }}</strong></p>
|
||||||
|
|
||||||
|
<div class="card border-2 rounded-0 shadow-sm">
|
||||||
|
<div class="card-body p-4">
|
||||||
|
<form method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
{% for field in form %}
|
||||||
|
<div class="mb-4">
|
||||||
|
<label class="form-label fw-bold text-uppercase small">{{ field.label }}</label>
|
||||||
|
{{ field }}
|
||||||
|
{% if field.errors %}
|
||||||
|
<div class="text-danger small mt-1">{{ field.errors }}</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
<button type="submit" class="btn btn-dark btn-lg w-100 rounded-0 border-2">Save Lesson</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
36
core/templates/core/module_form.html
Normal file
36
core/templates/core/module_form.html
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container mt-5">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="mb-4">
|
||||||
|
<a href="{% url 'course_edit' course.pk %}" class="text-dark text-decoration-none text-uppercase fw-bold">
|
||||||
|
<i class="bi bi-arrow-left"></i> Back to Course
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="display-5 fw-bold text-uppercase mb-4">Module Management</h1>
|
||||||
|
<p class="text-muted mb-4">Course: <strong>{{ course.title }}</strong></p>
|
||||||
|
|
||||||
|
<div class="card border-2 rounded-0 shadow-sm">
|
||||||
|
<div class="card-body p-4">
|
||||||
|
<form method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
{% for field in form %}
|
||||||
|
<div class="mb-4">
|
||||||
|
<label class="form-label fw-bold text-uppercase small">{{ field.label }}</label>
|
||||||
|
{{ field }}
|
||||||
|
{% if field.errors %}
|
||||||
|
<div class="text-danger small mt-1">{{ field.errors }}</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
<button type="submit" class="btn btn-dark btn-lg w-100 rounded-0 border-2">Save Module</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
139
core/templates/core/profile.html
Normal file
139
core/templates/core/profile.html
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<section class="hero-bw">
|
||||||
|
<div class="hero-content">
|
||||||
|
<div class="container py-5">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 mb-4">
|
||||||
|
<div class="card border-bw bg-transparent text-bw h-100">
|
||||||
|
<div class="card-body text-center">
|
||||||
|
{% if user.profile.avatar %}
|
||||||
|
<img src="{{ user.profile.avatar.url }}" alt="{{ user.username }}" class="rounded-circle mb-3 border-bw" style="width: 150px; height: 150px; object-fit: cover;">
|
||||||
|
{% else %}
|
||||||
|
<div class="rounded-circle mb-3 border-bw d-inline-flex align-items-center justify-content-center bg-bw text-bw-reverse" style="width: 150px; height: 150px; font-size: 3rem;">
|
||||||
|
{{ user.username|first|upper }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<h2 class="text-uppercase mb-0">{{ user.username }}</h2>
|
||||||
|
<p class="text-muted small">{{ user.email }}</p>
|
||||||
|
<hr class="border-bw">
|
||||||
|
<div class="text-start">
|
||||||
|
<p class="mb-1"><strong class="text-uppercase small">Location:</strong> {{ user.profile.location|default:"NOT_SET" }}</p>
|
||||||
|
<p class="mb-1"><strong class="text-uppercase small">Joined:</strong> {{ user.date_joined|date:"M d, Y" }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="card border-bw bg-transparent text-bw mb-4">
|
||||||
|
<div class="card-body">
|
||||||
|
<h3 class="text-uppercase mb-4">UPDATE_PROFILE</h3>
|
||||||
|
<form method="POST" enctype="multipart/form-data">
|
||||||
|
{% csrf_token %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 mb-3">
|
||||||
|
<label class="text-uppercase small fw-bold">Username</label>
|
||||||
|
{{ u_form.username }}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-3">
|
||||||
|
<label class="text-uppercase small fw-bold">Email</label>
|
||||||
|
{{ u_form.email }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 mb-3">
|
||||||
|
<label class="text-uppercase small fw-bold">First Name</label>
|
||||||
|
{{ u_form.first_name }}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-3">
|
||||||
|
<label class="text-uppercase small fw-bold">Last Name</label>
|
||||||
|
{{ u_form.last_name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="text-uppercase small fw-bold">Bio</label>
|
||||||
|
{{ p_form.bio }}
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 mb-3">
|
||||||
|
<label class="text-uppercase small fw-bold">Location</label>
|
||||||
|
{{ p_form.location }}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-3">
|
||||||
|
<label class="text-uppercase small fw-bold">Birth Date</label>
|
||||||
|
{{ p_form.birth_date }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="text-uppercase small fw-bold">Avatar</label>
|
||||||
|
{{ p_form.avatar }}
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-bw text-uppercase w-100 mt-3">SAVE_CHANGES</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card border-bw bg-transparent text-bw">
|
||||||
|
<div class="card-body">
|
||||||
|
<h3 class="text-uppercase mb-4">YOUR_PROGRESS</h3>
|
||||||
|
{% if user_progress %}
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bw text-bw mb-0">
|
||||||
|
<thead class="text-uppercase small">
|
||||||
|
<tr>
|
||||||
|
<th>COURSE</th>
|
||||||
|
<th>LESSON</th>
|
||||||
|
<th>COMPLETED</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for progress in user_progress %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ progress.lesson.module.course.title }}</td>
|
||||||
|
<td>
|
||||||
|
<a href="{% url 'lesson_detail' progress.lesson.pk %}" class="text-bw">{{ progress.lesson.title }}</a>
|
||||||
|
</td>
|
||||||
|
<td>{{ progress.completed_at|date:"M d, Y" }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<p class="text-muted">YOU_HAVENT_STARTED_ANY_LESSONS_YET</p>
|
||||||
|
<a href="{% url 'home' %}" class="btn btn-bw-outline text-uppercase">BROWSE_COURSES</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.form-control, .form-select {
|
||||||
|
background-color: transparent !important;
|
||||||
|
border: 2px solid #000 !important;
|
||||||
|
color: #000 !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
font-family: var(--bs-font-monospace);
|
||||||
|
}
|
||||||
|
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select {
|
||||||
|
border-color: #fff !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
.table-bw {
|
||||||
|
border-color: #000;
|
||||||
|
}
|
||||||
|
[data-theme="dark"] .table-bw {
|
||||||
|
border-color: #fff;
|
||||||
|
}
|
||||||
|
.table-bw td, .table-bw th {
|
||||||
|
border-color: inherit;
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: inherit !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
48
core/templates/registration/login.html
Normal file
48
core/templates/registration/login.html
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<section class="hero-bw text-center">
|
||||||
|
<div class="container">
|
||||||
|
<div class="hero-content text-start" style="max-width: 450px; width: 100%;">
|
||||||
|
<h1 class="h2 mb-4">AUTHENTICATE</h1>
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
{% if form.errors %}
|
||||||
|
<div class="alert alert-danger font-mono small border-2 border-dark rounded-0 mb-4">
|
||||||
|
INVALID_CREDENTIALS. PLEASE_TRY_AGAIN.
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% for field in form %}
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="{{ field.id_for_label }}" class="form-label font-mono small">{{ field.label|upper }}</label>
|
||||||
|
<input type="{{ field.field.widget.input_type }}"
|
||||||
|
name="{{ field.name }}"
|
||||||
|
id="{{ field.id_for_label }}"
|
||||||
|
class="form-control font-mono rounded-0 border-2"
|
||||||
|
placeholder="{{ field.label|upper }}"
|
||||||
|
{% if field.value %}value="{{ field.value }}"{% endif %}
|
||||||
|
required>
|
||||||
|
{% if field.help_text %}
|
||||||
|
<div class="form-text font-mono small opacity-50">{{ field.help_text|safe }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% for error in field.errors %}
|
||||||
|
<div class="text-danger font-mono small mt-1">{{ error }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
<div class="d-grid gap-3 mt-4">
|
||||||
|
<button type="submit" class="btn btn-bw w-100">LOG_IN</button>
|
||||||
|
<div class="d-flex flex-column gap-2">
|
||||||
|
<a href="{% url 'signup' %}" class="btn btn-bw-outline w-100">CREATE_ACCOUNT</a>
|
||||||
|
<a href="{% url 'password_reset' %}" class="btn btn-bw-outline w-100">FORGOT_PASSWORD?</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
16
core/templates/registration/password_reset_complete.html
Normal file
16
core/templates/registration/password_reset_complete.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<section class="hero-bw text-center">
|
||||||
|
<div class="container">
|
||||||
|
<div class="hero-content" style="max-width: 450px; width: 100%;">
|
||||||
|
<h1 class="h2 mb-4">RESET_COMPLETE</h1>
|
||||||
|
<p class="font-mono lead mb-4">YOUR_PASSWORD_HAS_BEEN_SUCCESSFULLY_UPDATED.</p>
|
||||||
|
<div class="d-grid">
|
||||||
|
<a href="{% url 'login' %}" class="btn btn-bw">LOG_IN</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
45
core/templates/registration/password_reset_confirm.html
Normal file
45
core/templates/registration/password_reset_confirm.html
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<section class="hero-bw text-center">
|
||||||
|
<div class="container">
|
||||||
|
<div class="hero-content text-start" style="max-width: 450px; width: 100%;">
|
||||||
|
<h1 class="h2 mb-4">SET_NEW_PASSWORD</h1>
|
||||||
|
|
||||||
|
{% if validlink %}
|
||||||
|
<form method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
{% for field in form %}
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="{{ field.id_for_label }}" class="form-label font-mono small">{{ field.label|upper }}</label>
|
||||||
|
<input type="{{ field.field.widget.input_type|default:'password' }}"
|
||||||
|
name="{{ field.name }}"
|
||||||
|
id="{{ field.id_for_label }}"
|
||||||
|
class="form-control font-mono rounded-0 border-2"
|
||||||
|
placeholder="{{ field.label|upper }}"
|
||||||
|
required>
|
||||||
|
{% if field.help_text %}
|
||||||
|
<div class="form-text font-mono small opacity-50">{{ field.help_text|safe }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% for error in field.errors %}
|
||||||
|
<div class="text-danger font-mono small mt-1">{{ error }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
<div class="d-grid mt-4">
|
||||||
|
<button type="submit" class="btn btn-bw w-100">UPDATE_PASSWORD</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{% else %}
|
||||||
|
<div class="text-center">
|
||||||
|
<p class="font-mono text-danger mb-4">INVALID_OR_EXPIRED_LINK.</p>
|
||||||
|
<div class="d-grid">
|
||||||
|
<a href="{% url 'password_reset' %}" class="btn btn-bw">REQUEST_NEW_LINK</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
16
core/templates/registration/password_reset_done.html
Normal file
16
core/templates/registration/password_reset_done.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<section class="hero-bw text-center">
|
||||||
|
<div class="container">
|
||||||
|
<div class="hero-content" style="max-width: 450px; width: 100%;">
|
||||||
|
<h1 class="h2 mb-4">EMAIL_SENT</h1>
|
||||||
|
<p class="font-mono lead mb-4">CHECK_YOUR_INBOX_FOR_FURTHER_INSTRUCTIONS.</p>
|
||||||
|
<div class="d-grid">
|
||||||
|
<a href="{% url 'login' %}" class="btn btn-bw">RETURN_TO_LOGIN</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
37
core/templates/registration/password_reset_form.html
Normal file
37
core/templates/registration/password_reset_form.html
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<section class="hero-bw text-center">
|
||||||
|
<div class="container">
|
||||||
|
<div class="hero-content text-start" style="max-width: 450px; width: 100%;">
|
||||||
|
<h1 class="h2 mb-4">RESET_PASSWORD</h1>
|
||||||
|
<p class="font-mono small opacity-75 mb-4">ENTER_EMAIL_TO_RECEIVE_INSTRUCTIONS</p>
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
{% for field in form %}
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="{{ field.id_for_label }}" class="form-label font-mono small">{{ field.label|upper }}</label>
|
||||||
|
<input type="{{ field.field.widget.input_type }}"
|
||||||
|
name="{{ field.name }}"
|
||||||
|
id="{{ field.id_for_label }}"
|
||||||
|
class="form-control font-mono rounded-0 border-2"
|
||||||
|
placeholder="{{ field.label|upper }}"
|
||||||
|
required>
|
||||||
|
{% for error in field.errors %}
|
||||||
|
<div class="text-danger font-mono small mt-1">{{ error }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
<div class="d-grid gap-3 mt-4">
|
||||||
|
<button type="submit" class="btn btn-bw w-100">SEND_RESET_LINK</button>
|
||||||
|
<div class="text-center">
|
||||||
|
<a href="{% url 'login' %}" class="btn btn-bw-outline w-100">BACK_TO_LOGIN</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
48
core/templates/registration/signup.html
Normal file
48
core/templates/registration/signup.html
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<section class="hero-bw text-center">
|
||||||
|
<div class="container">
|
||||||
|
<div class="hero-content text-start" style="max-width: 500px; width: 100%;">
|
||||||
|
<h1 class="h2 mb-4">REGISTER</h1>
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
|
{% if form.errors %}
|
||||||
|
<div class="alert alert-danger font-mono small border-2 border-dark rounded-0 mb-4">
|
||||||
|
REGISTRATION_FAILED. CHECK_DATA.
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% for field in form %}
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="{{ field.id_for_label }}" class="form-label font-mono small">{{ field.label|upper }}</label>
|
||||||
|
<input type="{{ field.field.widget.input_type|default:'text' }}"
|
||||||
|
name="{{ field.name }}"
|
||||||
|
id="{{ field.id_for_label }}"
|
||||||
|
class="form-control font-mono rounded-0 border-2"
|
||||||
|
placeholder="{{ field.label|upper }}"
|
||||||
|
required>
|
||||||
|
{% if field.help_text %}
|
||||||
|
<div class="form-text font-mono small opacity-50">{{ field.help_text|safe }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% for error in field.errors %}
|
||||||
|
<div class="text-danger font-mono small mt-1">{{ error }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
<div class="d-grid gap-3 mt-4">
|
||||||
|
<button type="submit" class="btn btn-bw w-100">CREATE_ACCOUNT</button>
|
||||||
|
<div class="text-center">
|
||||||
|
<span class="font-mono small opacity-75 d-block mb-2">ALREADY_HAVE_AN_ACCOUNT?</span>
|
||||||
|
<a href="{% url 'login' %}" class="btn btn-bw-outline w-100">LOG_IN</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
17
core/urls.py
17
core/urls.py
@ -1,7 +1,18 @@
|
|||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
from . import views
|
||||||
from .views import home
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("", home, name="home"),
|
path('', views.index, name='index'),
|
||||||
|
path('signup/', views.signup, name='signup'),
|
||||||
|
path('course/<int:pk>/', views.course_detail, name='course_detail'),
|
||||||
|
path('lesson/<int:pk>/', views.lesson_detail, name='lesson_detail'),
|
||||||
|
path('profile/', views.profile, name='profile'),
|
||||||
|
path('dashboard/', views.dashboard, name='dashboard'),
|
||||||
|
path('course/add/', views.course_create, name='course_create'),
|
||||||
|
path('course/<int:pk>/edit/', views.course_edit, name='course_edit'),
|
||||||
|
path('course/<int:pk>/delete/', views.course_delete, name='course_delete'),
|
||||||
|
path('course/<int:course_pk>/module/add/', views.module_create, name='module_create'),
|
||||||
|
path('module/<int:pk>/edit/', views.module_edit, name='module_edit'),
|
||||||
|
path('module/<int:module_pk>/lesson/add/', views.lesson_create, name='lesson_create'),
|
||||||
|
path('lesson/<int:pk>/edit/', views.lesson_edit, name='lesson_edit'),
|
||||||
]
|
]
|
||||||
171
core/views.py
171
core/views.py
@ -1,25 +1,158 @@
|
|||||||
import os
|
from django.shortcuts import render, get_object_or_404, redirect
|
||||||
import platform
|
from django.contrib.auth.decorators import login_required
|
||||||
|
from django.contrib import messages
|
||||||
|
from django.contrib.auth.forms import UserCreationForm
|
||||||
|
from django.contrib.auth import login as auth_login
|
||||||
|
from .models import Course, Module, Lesson, UserProgress
|
||||||
|
from .forms import UserUpdateForm, ProfileUpdateForm, CourseForm, ModuleForm, LessonForm
|
||||||
|
|
||||||
from django import get_version as django_version
|
def index(request):
|
||||||
from django.shortcuts import render
|
courses = Course.objects.all()
|
||||||
from django.utils import timezone
|
return render(request, 'core/index.html', {'courses': courses})
|
||||||
|
|
||||||
|
def signup(request):
|
||||||
|
if request.method == 'POST':
|
||||||
|
form = UserCreationForm(request.POST)
|
||||||
|
if form.is_valid():
|
||||||
|
user = form.save()
|
||||||
|
auth_login(request, user)
|
||||||
|
messages.success(request, 'Registration successful!')
|
||||||
|
return redirect('index')
|
||||||
|
else:
|
||||||
|
form = UserCreationForm()
|
||||||
|
return render(request, 'registration/signup.html', {'form': form})
|
||||||
|
|
||||||
def home(request):
|
def course_detail(request, pk):
|
||||||
"""Render the landing screen with loader and environment details."""
|
course = get_object_or_404(Course, pk=pk)
|
||||||
host_name = request.get_host().lower()
|
return render(request, 'core/course_detail.html', {'course': course})
|
||||||
agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic"
|
|
||||||
now = timezone.now()
|
def lesson_detail(request, pk):
|
||||||
|
lesson = get_object_or_404(Lesson, pk=pk)
|
||||||
|
course = lesson.module.course
|
||||||
|
|
||||||
|
if request.user.is_authenticated:
|
||||||
|
UserProgress.objects.get_or_create(user=request.user, lesson=lesson)
|
||||||
|
|
||||||
|
return render(request, 'core/lesson_detail.html', {'lesson': lesson, 'course': course})
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def profile(request):
|
||||||
|
if request.method == 'POST':
|
||||||
|
u_form = UserUpdateForm(request.POST, instance=request.user)
|
||||||
|
p_form = ProfileUpdateForm(request.POST, request.FILES, instance=request.user.profile)
|
||||||
|
if u_form.is_valid() and p_form.is_valid():
|
||||||
|
u_form.save()
|
||||||
|
p_form.save()
|
||||||
|
messages.success(request, f'Your account has been updated!')
|
||||||
|
return redirect('profile')
|
||||||
|
else:
|
||||||
|
u_form = UserUpdateForm(instance=request.user)
|
||||||
|
p_form = ProfileUpdateForm(instance=request.user.profile)
|
||||||
|
|
||||||
|
user_progress = UserProgress.objects.filter(user=request.user)
|
||||||
|
completed_lessons = [progress.lesson for progress in user_progress]
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"project_name": "New Style",
|
'u_form': u_form,
|
||||||
"agent_brand": agent_brand,
|
'p_form': p_form,
|
||||||
"django_version": django_version(),
|
'completed_lessons': completed_lessons
|
||||||
"python_version": platform.python_version(),
|
|
||||||
"current_time": now,
|
|
||||||
"host_name": host_name,
|
|
||||||
"project_description": os.getenv("PROJECT_DESCRIPTION", ""),
|
|
||||||
"project_image_url": os.getenv("PROJECT_IMAGE_URL", ""),
|
|
||||||
}
|
}
|
||||||
return render(request, "core/index.html", context)
|
|
||||||
|
return render(request, 'core/profile.html', context)
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def dashboard(request):
|
||||||
|
authored_courses = Course.objects.filter(author=request.user)
|
||||||
|
return render(request, 'core/dashboard.html', {'courses': authored_courses})
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def course_create(request):
|
||||||
|
if request.method == 'POST':
|
||||||
|
form = CourseForm(request.POST, request.FILES)
|
||||||
|
if form.is_valid():
|
||||||
|
course = form.save(commit=False)
|
||||||
|
course.author = request.user
|
||||||
|
course.save()
|
||||||
|
messages.success(request, 'Course created successfully!')
|
||||||
|
return redirect('dashboard')
|
||||||
|
else:
|
||||||
|
form = CourseForm()
|
||||||
|
return render(request, 'core/course_form.html', {'form': form, 'title': 'Create Course'})
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def course_edit(request, pk):
|
||||||
|
course = get_object_or_404(Course, pk=pk, author=request.user)
|
||||||
|
if request.method == 'POST':
|
||||||
|
form = CourseForm(request.POST, request.FILES, instance=course)
|
||||||
|
if form.is_valid():
|
||||||
|
form.save()
|
||||||
|
messages.success(request, 'Course updated successfully!')
|
||||||
|
return redirect('dashboard')
|
||||||
|
else:
|
||||||
|
form = CourseForm(instance=course)
|
||||||
|
return render(request, 'core/course_form.html', {'form': form, 'title': 'Edit Course'})
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def course_delete(request, pk):
|
||||||
|
course = get_object_or_404(Course, pk=pk, author=request.user)
|
||||||
|
if request.method == 'POST':
|
||||||
|
course.delete()
|
||||||
|
messages.success(request, 'Course deleted successfully!')
|
||||||
|
return redirect('dashboard')
|
||||||
|
return render(request, 'core/course_confirm_delete.html', {'object': course})
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def module_create(request, course_pk):
|
||||||
|
course = get_object_or_404(Course, pk=course_pk, author=request.user)
|
||||||
|
if request.method == 'POST':
|
||||||
|
form = ModuleForm(request.POST)
|
||||||
|
if form.is_valid():
|
||||||
|
module = form.save(commit=False)
|
||||||
|
module.course = course
|
||||||
|
module.save()
|
||||||
|
messages.success(request, 'Module added successfully!')
|
||||||
|
return redirect('course_edit', pk=course.pk)
|
||||||
|
else:
|
||||||
|
form = ModuleForm()
|
||||||
|
return render(request, 'core/module_form.html', {'form': form, 'course': course})
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def module_edit(request, pk):
|
||||||
|
module = get_object_or_404(Module, pk=pk, course__author=request.user)
|
||||||
|
if request.method == 'POST':
|
||||||
|
form = ModuleForm(request.POST, instance=module)
|
||||||
|
if form.is_valid():
|
||||||
|
form.save()
|
||||||
|
messages.success(request, 'Module updated successfully!')
|
||||||
|
return redirect('course_edit', pk=module.course.pk)
|
||||||
|
else:
|
||||||
|
form = ModuleForm(instance=module)
|
||||||
|
return render(request, 'core/module_form.html', {'form': form, 'course': module.course})
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def lesson_create(request, module_pk):
|
||||||
|
module = get_object_or_404(Module, pk=module_pk, course__author=request.user)
|
||||||
|
if request.method == 'POST':
|
||||||
|
form = LessonForm(request.POST)
|
||||||
|
if form.is_valid():
|
||||||
|
lesson = form.save(commit=False)
|
||||||
|
lesson.module = module
|
||||||
|
lesson.save()
|
||||||
|
messages.success(request, 'Lesson added successfully!')
|
||||||
|
return redirect('course_edit', pk=module.course.pk)
|
||||||
|
else:
|
||||||
|
form = LessonForm()
|
||||||
|
return render(request, 'core/lesson_form.html', {'form': form, 'module': module})
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def lesson_edit(request, pk):
|
||||||
|
lesson = get_object_or_404(Lesson, pk=pk, module__course__author=request.user)
|
||||||
|
if request.method == 'POST':
|
||||||
|
form = LessonForm(request.POST, instance=lesson)
|
||||||
|
if form.is_valid():
|
||||||
|
form.save()
|
||||||
|
messages.success(request, 'Lesson updated successfully!')
|
||||||
|
return redirect('course_edit', pk=lesson.module.course.pk)
|
||||||
|
else:
|
||||||
|
form = LessonForm(instance=lesson)
|
||||||
|
return render(request, 'core/lesson_form.html', {'form': form, 'module': lesson.module})
|
||||||
@ -1,4 +1,300 @@
|
|||||||
/* Custom styles for the application */
|
/* Black & White Theme for Python Lern App */
|
||||||
body {
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=JetBrains+Mono:wght@400;700&display=swap');
|
||||||
font-family: system-ui, -apple-system, sans-serif;
|
|
||||||
|
:root {
|
||||||
|
--bw-bg: #ffffff;
|
||||||
|
--bw-text: #000000;
|
||||||
|
--bw-black: #000000;
|
||||||
|
--bw-white: #ffffff;
|
||||||
|
--bw-grey-light: #f5f5f5;
|
||||||
|
--bw-grey-medium: #888888;
|
||||||
|
--bw-grey-dark: #333333;
|
||||||
|
--bw-border: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme='dark'] {
|
||||||
|
--bw-bg: #000000;
|
||||||
|
--bw-text: #ffffff;
|
||||||
|
--bw-grey-light: #1a1a1a;
|
||||||
|
--bw-border: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
background-color: var(--bw-bg) !important;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Inter', sans-serif;
|
||||||
|
line-height: 1.6;
|
||||||
|
transition: background-color 0.3s ease, color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6, .font-mono {
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-weight: 700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
color: var(--bw-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Utilities that respect theme */
|
||||||
|
.bw-text { color: var(--bw-text) !important; }
|
||||||
|
.bw-bg { background-color: var(--bw-bg) !important; }
|
||||||
|
.bw-border { border-color: var(--bw-border) !important; }
|
||||||
|
|
||||||
|
/* Override some Bootstrap defaults to respect theme */
|
||||||
|
.text-muted {
|
||||||
|
color: var(--bw-grey-medium) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-group-item {
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
border-color: var(--bw-border) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-group-item-action:hover {
|
||||||
|
background-color: var(--bw-grey-light) !important;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Brutalist UI Elements */
|
||||||
|
.btn-bw {
|
||||||
|
background-color: var(--bw-text) !important;
|
||||||
|
color: var(--bw-bg) !important;
|
||||||
|
border: 2px solid var(--bw-text) !important;
|
||||||
|
border-radius: 0;
|
||||||
|
padding: 10px 25px;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-weight: 700;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-bw:hover {
|
||||||
|
background-color: var(--bw-bg) !important;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-bw-outline {
|
||||||
|
background-color: var(--bw-bg) !important;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
border: 2px solid var(--bw-text) !important;
|
||||||
|
border-radius: 0;
|
||||||
|
padding: 10px 25px;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-weight: 700;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-bw-outline:hover {
|
||||||
|
background-color: var(--bw-text) !important;
|
||||||
|
color: var(--bw-bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-bw {
|
||||||
|
border: 2px solid var(--bw-border) !important;
|
||||||
|
border-radius: 0;
|
||||||
|
background-color: var(--bw-bg) !important;
|
||||||
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-bw:hover {
|
||||||
|
transform: translate(-4px, -4px);
|
||||||
|
box-shadow: 4px 4px 0px var(--bw-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.border-bw {
|
||||||
|
border: 2px solid var(--bw-border) !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Section Inverted logic */
|
||||||
|
.section-inverted {
|
||||||
|
background-color: var(--bw-text) !important;
|
||||||
|
color: var(--bw-bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-inverted h1,
|
||||||
|
.section-inverted h2,
|
||||||
|
.section-inverted h3,
|
||||||
|
.section-inverted h4,
|
||||||
|
.section-inverted h5,
|
||||||
|
.section-inverted h6,
|
||||||
|
.section-inverted p,
|
||||||
|
.section-inverted li,
|
||||||
|
.section-inverted div,
|
||||||
|
.section-inverted span,
|
||||||
|
.section-inverted .font-mono,
|
||||||
|
.section-inverted .lead {
|
||||||
|
color: var(--bw-bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Adjust components inside inverted section */
|
||||||
|
.section-inverted .btn-bw {
|
||||||
|
background-color: var(--bw-bg) !important;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
border-color: var(--bw-bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-inverted .btn-bw-outline {
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: var(--bw-bg) !important;
|
||||||
|
border-color: var(--bw-bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hero Section */
|
||||||
|
.hero-bw {
|
||||||
|
padding: 100px 0;
|
||||||
|
border-bottom: 2px solid var(--bw-border);
|
||||||
|
background-image: radial-gradient(var(--bw-text) 1px, transparent 1px);
|
||||||
|
background-size: 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-content {
|
||||||
|
background-color: var(--bw-bg) !important;
|
||||||
|
padding: 40px;
|
||||||
|
border: 4px solid var(--bw-border) !important;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 800px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Navbar */
|
||||||
|
.navbar-bw {
|
||||||
|
border-bottom: 2px solid var(--bw-border);
|
||||||
|
padding: 20px 0;
|
||||||
|
background-color: var(--bw-bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand-bw {
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link {
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-toggler {
|
||||||
|
border-color: var(--bw-border) !important;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme='dark'] .navbar-toggler-icon {
|
||||||
|
filter: invert(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Timeline/Modules */
|
||||||
|
.module-list {
|
||||||
|
border-left: 2px solid var(--bw-border);
|
||||||
|
padding-left: 30px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-item {
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-item::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: -41px;
|
||||||
|
top: 5px;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background-color: var(--bw-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Code block styling */
|
||||||
|
pre, code {
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
background-color: var(--bw-grey-light) !important;
|
||||||
|
border: 1px solid var(--bw-border) !important;
|
||||||
|
padding: 10px;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Progress Bar */
|
||||||
|
.progress {
|
||||||
|
background-color: var(--bw-grey-light) !important;
|
||||||
|
border-color: var(--bw-border) !important;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
background-color: var(--bw-text) !important;
|
||||||
|
color: var(--bw-bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Theme Toggle Button */
|
||||||
|
.theme-toggle {
|
||||||
|
cursor: pointer;
|
||||||
|
border: 2px solid var(--bw-text);
|
||||||
|
background: var(--bw-bg);
|
||||||
|
color: var(--bw-text);
|
||||||
|
padding: 5px 15px;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-left: 15px;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-toggle:hover {
|
||||||
|
background: var(--bw-text);
|
||||||
|
color: var(--bw-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Footer fixes */
|
||||||
|
footer.bw-border {
|
||||||
|
border-top: 2px solid var(--bw-border) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Global Form Styling */
|
||||||
|
.form-control, .form-select {
|
||||||
|
background-color: transparent !important;
|
||||||
|
border: 2px solid var(--bw-border) !important;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
padding: 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control:focus, .form-select:focus {
|
||||||
|
box-shadow: 4px 4px 0px var(--bw-border) !important;
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Alert Styling */
|
||||||
|
.alert-bw {
|
||||||
|
background-color: var(--bw-bg) !important;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
|
border: 2px solid var(--bw-border) !important;
|
||||||
|
border-radius: 0;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-close {
|
||||||
|
filter: invert(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme='dark'] .btn-close {
|
||||||
|
filter: invert(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Table Styling */
|
||||||
|
.table-bw {
|
||||||
|
border-color: var(--bw-border);
|
||||||
|
color: var(--bw-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-bw td, .table-bw th {
|
||||||
|
border-color: var(--bw-border);
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: var(--bw-text) !important;
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user