diff --git a/core/context_processor.py b/core/context_processor.py new file mode 100644 index 0000000..a1410e3 --- /dev/null +++ b/core/context_processor.py @@ -0,0 +1,5 @@ +from .models import SiteSettings + +def site_settings(request): + # On récupère le premier objet, ou None s'il n'existe pas encore + return {'settings': SiteSettings.objects.first()} \ No newline at end of file diff --git a/courses/migrations/0001_initial.py b/courses/migrations/0001_initial.py deleted file mode 100644 index 5aeffd2..0000000 --- a/courses/migrations/0001_initial.py +++ /dev/null @@ -1,35 +0,0 @@ -# Generated by Django 5.0.6 on 2024-06-10 16:02 - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Course', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('content', models.TextField()), - ('created_at', models.DateTimeField(auto_now_add=True)), - ('updated_at', models.DateTimeField(auto_now=True)), - ], - ), - migrations.CreateModel( - name='Lesson', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('content', models.TextField()), - ('order', models.PositiveIntegerField()), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lecons', to='courses.course')), - ], - ), - ] diff --git a/courses/migrations/0002_course_thumbnail.py b/courses/migrations/0002_course_thumbnail.py deleted file mode 100644 index 423ce06..0000000 --- a/courses/migrations/0002_course_thumbnail.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 5.0.6 on 2024-06-10 17:14 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('courses', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='course', - name='thumbnail', - field=models.ImageField(default='default.jpg', upload_to='thumbnails/courses/'), - ), - ] diff --git a/courses/migrations/0003_lesson_author_alter_course_thumbnail.py b/courses/migrations/0003_lesson_author_alter_course_thumbnail.py deleted file mode 100644 index 585d114..0000000 --- a/courses/migrations/0003_lesson_author_alter_course_thumbnail.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 5.0.6 on 2024-06-11 07:51 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('courses', '0002_course_thumbnail'), - ] - - operations = [ - migrations.AddField( - model_name='lesson', - name='author', - field=models.CharField(default=None, max_length=100), - ), - migrations.AlterField( - model_name='course', - name='thumbnail', - field=models.ImageField(default='default.jpg', upload_to='static/uploads/thumbnails/courses/'), - ), - ] diff --git a/courses/migrations/0004_remove_lesson_author_course_author.py b/courses/migrations/0004_remove_lesson_author_course_author.py deleted file mode 100644 index 2e3dadc..0000000 --- a/courses/migrations/0004_remove_lesson_author_course_author.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 5.0.6 on 2024-06-11 08:26 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('courses', '0003_lesson_author_alter_course_thumbnail'), - ] - - operations = [ - migrations.RemoveField( - model_name='lesson', - name='author', - ), - migrations.AddField( - model_name='course', - name='author', - field=models.CharField(default='Anthony Violet', max_length=100), - ), - ] diff --git a/courses/migrations/0005_rename_author_course_old_author.py b/courses/migrations/0005_rename_author_course_old_author.py deleted file mode 100644 index fd7d7f0..0000000 --- a/courses/migrations/0005_rename_author_course_old_author.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 4.2.17 on 2024-12-14 10:12 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('courses', '0004_remove_lesson_author_course_author'), - ] - - operations = [ - migrations.RenameField( - model_name='course', - old_name='author', - new_name='old_author', - ), - ] diff --git a/courses/migrations/0006_course_author.py b/courses/migrations/0006_course_author.py deleted file mode 100644 index f41013f..0000000 --- a/courses/migrations/0006_course_author.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 4.2.17 on 2024-12-14 10:13 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('courses', '0005_rename_author_course_old_author'), - ] - - operations = [ - migrations.AddField( - model_name='course', - name='author', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - ), - ] diff --git a/courses/migrations/0007_convert_old_authors.py b/courses/migrations/0007_convert_old_authors.py deleted file mode 100644 index 7e2d7bc..0000000 --- a/courses/migrations/0007_convert_old_authors.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 4.2.17 on 2024-12-14 10:13 - -from django.db import migrations - -def convert_old_authors(apps, schema_editor): - Course = apps.get_model('courses', 'Course') - User = apps.get_model('auth', 'User') - default_user = User.objects.get(id=1) - for course in Course.objects.all(): - course.author = default_user - course.save() - -class Migration(migrations.Migration): - - dependencies = [ - ('courses', '0006_course_author'), - ] - - operations = [ - migrations.RunPython(convert_old_authors), - ] diff --git a/courses/migrations/0008_remove_course_old_author_alter_course_author.py b/courses/migrations/0008_remove_course_old_author_alter_course_author.py deleted file mode 100644 index 4748659..0000000 --- a/courses/migrations/0008_remove_course_old_author_alter_course_author.py +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by Django 4.2.17 on 2024-12-14 10:16 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('courses', '0007_convert_old_authors'), - ] - - operations = [ - migrations.RemoveField( - model_name='course', - name='old_author', - ), - migrations.AlterField( - model_name='course', - name='author', - field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - preserve_default=False, - ), - ] diff --git a/courses/models.py b/courses/models.py index 4ad3997..83ced4d 100644 --- a/courses/models.py +++ b/courses/models.py @@ -1,22 +1,37 @@ from django.db import models from django.contrib.auth.models import User -from django.utils.html import escape class Course(models.Model): name = models.CharField(max_length=200) - content = models.TextField() + slug = models.SlugField(unique=True) + tags = models.CharField(max_length=200) author = models.ForeignKey(User, on_delete=models.CASCADE) - thumbnail = models.ImageField(upload_to='static/uploads/thumbnails/courses/', default='default.jpg') + thumbnail = models.ImageField(upload_to='thumbnails/courses/', default='default.jpg') + description = models.TextField() created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) + enable = models.BooleanField(default=True) def __str__(self): return self.name -class Lesson(models.Model): - course_id = models.ForeignKey(Course, on_delete=models.CASCADE, related_name='lecons') +class Module(models.Model): name = models.CharField(max_length=200) + slug = models.SlugField() + course = models.ForeignKey(Course, on_delete=models.CASCADE, related_name='modules') + description = models.TextField() + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) + enable = models.BooleanField(default=True) + order = models.PositiveIntegerField() + +class Lesson(models.Model): + name = models.CharField(max_length=200) + slug = models.SlugField() + module = models.ForeignKey(Module, on_delete=models.CASCADE, related_name='lessons') content = models.TextField() + video_id = models.CharField(max_length=200, blank=True) + is_premium = models.BooleanField(default=False) order = models.PositiveIntegerField() def clean(self): diff --git a/data78HyT4mloSq_Gt.sqlite3 b/data78HyT4mloSq_Gt.sqlite3 deleted file mode 100644 index b1fd805..0000000 Binary files a/data78HyT4mloSq_Gt.sqlite3 and /dev/null differ diff --git a/devart/settings.py b/devart/settings.py index 47b692a..103e5ea 100644 --- a/devart/settings.py +++ b/devart/settings.py @@ -45,6 +45,7 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', + 'core', 'courses', 'users', ] @@ -75,6 +76,7 @@ TEMPLATES = [ 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'core.context_processor.site_settings', 'courses.context_processors.course_list', ], }, diff --git a/static/css/colors_dark.css b/static/css/colors_dark.css deleted file mode 100644 index 5d5f272..0000000 --- a/static/css/colors_dark.css +++ /dev/null @@ -1,164 +0,0 @@ -/* Couleurs en mode sombre */ -html { - background-color: #0f1f2e; /* Fond sombre pour toute la page */ - color:#5e88a0; -} - -nav { - background-color: #000824;; /* Fond sombre pour la barre de navigation */ -} - -.navbar ul ul li { - background-color: #000824; /* Fond sombre pour les sous-menus */ - border-color: #4f6f8f; /* Couleur de la bordure */ - box-shadow: 2px 2px 2px #0f1f2e; /* Ombre légère */ -} - -.navbar ul ul a { - color: #5e88a0; /* Couleur du texte pour les liens des sous-menus */ -} - -.brand { - color: #c4d7e0; /* Couleur du texte pour la marque */ -} - -a { - color: #7ca9c6; /* Couleur de base pour les liens */ -} - -a:hover { - color: #ffc3a0; /* Couleur au survol */ - text-shadow: #fff 0px 1px 5px; /* Ombre du texte au survol */ -} - -a.house { - color: #5e88a0; /* Couleur spécifique pour certains liens */ -} - -a.house:hover { - color: #7ca9c6; /* Couleur au survol */ -} - -.button { - background-color: #2a3e4c; /* Fond sombre pour les boutons */ - color: #fff; /* Couleur du texte */ - border-color: transparent; /* Bordure transparente */ -} - -.button:hover { - background-color: #ff8a6b; /* Fond au survol */ -} - -.test-me { - border-color: #7ca9c6; /* Couleur de bordure */ - background-color: #9cd0ef; /* Fond */ - color: #2e485d; /* Couleur du texte */ -} - -.reset { - border-color: #ff7b39; /* Couleur de bordure */ - background-color: #ffd0a1; /* Fond */ - color: #8e4b1e; /* Couleur du texte */ -} - -.courseNav { - border-color: #0f1f2e; /* Couleur de bordure */ - box-shadow: 2px 2px 2px #4f6f8f; /* Ombre */ - background-color: #334c66; /* Fond sombre */ -} - -.edito { - border-color: #a4b8c7; /* Couleur de bordure */ - background-color: #334c66; /* Fond sombre */ - color: #86a3b4; -} - -.test { - border-color: #8c7d49; /* Couleur de bordure */ - background-color: #b5ac8f; /* Fond */ - color: #70685a; /* Couleur du texte */ -} - -.comment { - color: #6cb87e; /* Couleur pour les commentaires */ -} - -h1 { - color: #4e9ed6; /* Couleur pour les titres h1 */ - border-left-color: #ffa500; /* Couleur de la bordure gauche */ - border-bottom-color: #ffa500; /* Couleur de la bordure inférieure */ -} - -h2 { - color: #e58a01; /* Couleur pour les titres h2 */ -} - -.card { - border-color: #b5b5b5; /* Couleur de bordure des cartes */ - box-shadow: 2px 2px 2px #888888; /* Ombre */ -} - -.card-header img.thumbnails { - transition: transform 1s ease; /* Transition pour les images */ -} - -.card:hover img.thumbnails { - transform: scale(1.2); /* Zoom au survol */ -} - -.card-body { - background-color: #0f1f2e; /* Couleur des liens dans le corps des cartes */ -} - -.card-body a { - color: #4e9ed6; /* Couleur des liens dans le corps des cartes */ -} - -.card-body a:hover { - color: #631a37; /* Couleur au survol */ -} - -.question { - background-color: #c5fffa; /* Fond pour les questions */ - border-color: #006e65; /* Couleur de bordure */ - color: #006e65; /* Couleur du texte */ -} - -.validation { - background-color: #c5ffcf; - border-color: #006e18; - color: #006e18; -} - -.conclusion { - background-color: #ffdac5; /* Fond pour les conclusions */ - border-color: #6e1f00; /* Couleur de bordure */ - color: #6e1f00; /* Couleur du texte */ -} - -.exercice { - background-color: #eeffc5; /* Fond pour les exercices */ - border-color: #636e00; /* Couleur de bordure */ - color: #636e00; /* Couleur du texte */ -} - -.info { - background-color: #c5f3ff; /* Fond pour les exercices */ - border-color: #004f6e; /* Couleur de bordure */ - color: #002c6e; /* Couleur du texte */ -} - -th { - border-color: #b5b5b5; /* Couleur de bordure pour les cellules d'en-tête */ -} - -tr:nth-child(even) { - background-color: #536a7d; /* Fond pour les lignes paires */ - color: #002c6e; -} - - -footer { - background-color: #000824; /* Fond sombre pour le pied de page */ - color: #8d8d8d; /* Couleur du texte */ -} diff --git a/static/css/colors_light.css b/static/css/colors_light.css deleted file mode 100644 index fe3525e..0000000 --- a/static/css/colors_light.css +++ /dev/null @@ -1,149 +0,0 @@ -/* Couleurs */ -nav { - background-color: #252525; -} - -.navbar ul ul li { - background-color: #252525; - border-color: #fff; - box-shadow: 2px 2px 2px #252525; -} - -.navbar ul ul a { - color: #10B3DB; -} - -.brand { - color: #fff; -} - -a { - color: #458741; -} - -a:hover { - color: #ffbdbd; - text-shadow: #fff 0px 1px 5px; -} - -a.house { - color: #10B3DB; -} - -a.house:hover { - color: #458741; -} - -.button { - background-color: #fff; - color: #000; - border-color: transparent; -} - -.button:hover { - background-color: #ffbdbd; -} - -.test-me { - border-color: #458741; - background-color: #93ec8e; - color: #2b422a; -} - -.reset { - border-color: #ff5e00; - background-color: #ffb286; - color: #6b3618; -} - -.courseNav { - border-color: #252525; - box-shadow: 2px 2px 2px #888888; - background-color: #f8f8f8; -} - -.edito { - border-color: #b4b4b4; - background-color: #f8f8f8; -} - -.test { - border-color: #a38d2b; - background-color: #eee4b7; - color: #504721; -} - -.comment { - color: green; -} - -h1 { - color: #236877; - border-left-color: orange; - border-bottom-color: orange; -} - -h2 { - color: #DB6310; -} - -.card { - border-color: #c9c9c9; - box-shadow: 2px 2px 2px #888888; -} - -.card-header img.thumbnails { - transition: transform 1s ease; -} - -.card:hover img.thumbnails { - transform: scale(1.2); -} - -.card-body a { - color: #236877; - background-color: #f9f9f9; - border-top: 1px solid; -} - -.card-body a:hover { - color: #9e1888; -} - -.question { - background-color: #c5fffa; - border-color: #006e65; - color: #006e65; -} - -.validation { - background-color: #c5ffcf; - border-color: #006e18; - color: #006e18; -} - -.conclusion { - background-color: #ffdac5; - border-color: #6e1f00; - color: #6e1f00; -} - -.exercice { - background-color: #eeffc5; - border-color: #636e00; - color: #636e00; -} - -th { - border-color: #888888; -} - -tr:nth-child(even) { - background-color: #e2e2e2; -} - - -footer { - background-color: #252525; - color: #8d8d8d; -} diff --git a/static/css/design.css b/static/css/design.css deleted file mode 100644 index 244ac6b..0000000 --- a/static/css/design.css +++ /dev/null @@ -1,455 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap'); - -html { - display: flex; - flex-direction: column; - font-size: 16px; - font-family: "Montserrat"; - scroll-behavior: smooth; -} - -body { - display: flex; - flex-direction: column; - margin: 0; -} - -nav { - display: flex; - /*position: fixed;*/ - /*width: 100vw;*/ - align-items: center; - justify-content: space-between; - top: 0; - padding: 0 10px; - height: 80px; - border-bottom: 2px solid #000; -} - -.navbar { - display: flex; - width: 70%; - justify-content: flex-start; - margin-right: 30px; -} - -.navbar ul, .navbar li { - list-style: none; - padding: 0; - margin: 0; -} - -.navbar ul { - display: flex; - flex-direction: row; - width: 100%; -} - -.navbar li { - position: relative; - margin: auto 10px; -} - -.navend { - margin-right: 20px; - display: flex; - width: 100%; - align-items: end; - flex-direction: row-reverse; -} - -.navend a { - cursor: pointer; -} - -.navbar ul ul { - display: none; - position: absolute; - width: auto; - left: 0; - top: 100%; - flex-direction: column; - transform: translateX(-25%); -} - -.navbar li:hover ul, -.navbar li ul:hover { - display: flex; /* Changed to flex to support horizontal layout */ -} - -.navbar ul ul li { - width: auto; /* Adjust width for inline layout */ - margin: auto 10px; - padding: 10px; - border-left: 1px solid; -} - -.navbar ul ul li:first-child { - margin-top: 20px; -} - -.navbar ul ul a { - display: block; - padding: 0 0 10px 0; - text-decoration: none; - white-space: nowrap; /* Prevents text from wrapping */ -} - -.brand { - font-size: 1.5rem; - font-weight: 600; - letter-spacing: 0.2cm; - font-variant: small-caps; -} - -.subtitle { - font-size: 1rem; - letter-spacing: 0.05cm; -} - -a { - text-decoration: none; - font-weight: 600; - transition: all 1s; - scroll-margin-top: 80px; -} - -.button { - padding: 5px; - max-width: 300px; - cursor: pointer; - font-size: 1.5rem; - border: 1px solid; - border-radius: 2px; - margin: 20px; -} - -.button-grp { - display: flex; - flex-direction: row; - justify-content: center; - width: 100%; -} - -main { - flex: 1; -} - -section { - display: flex; - flex-direction: column; - padding: 20px; - width: 60%; - margin: 20px auto; -} - -.courseNav { - display: block; - float: left; - position: fixed; - left: 0; - top: 150px; - max-width: 15%; - border: 1px solid; -} - -.edito { - border: 1px solid; - border-radius: 5px; -} - -.comment { - font-weight: 500; -} - -.test { - border: 1px solid; - padding: 10px; -} - -.ul-arrow li { - list-style: none; -} - -.ul-arrow li:before { - content: "→ "; - font-size: 1.5rem; -} - -h1 { - font-size: 2rem; - border-left: 5px solid; - border-bottom: 1px solid; -} - -h2 { - font-size: 1.5rem; -} - -img { - max-width: 100%; -} - -.card-header img.thumbnails { - transition: transform 1s ease -} - -.card:hover img.thumbnails { - transform: scale(1.2); -} - -.container-inline { - display: flex; - flex-direction: row; -} - -.card { - display: flex; - flex-direction: column; - max-width: 250px; - border-left: 1px solid; - border-top: 1px solid; - border-radius: 2px; - overflow: hidden; - margin: 20px; -} - -.card-header h2 { - display: flex; - overflow: hidden; -} - -.card-header { - display: flex; - width: 100%; - font-size: 1rem; - font-weight: 500; -} - -.card-body a { - font-size: 1rem; - font-weight: 600; -} - -.card-body a:hover { - text-decoration: underline -} - -.card-body { - border-top: 1px solid; - padding: 5px; - line-height: 90%; - overflow: hidden; - z-index: 3; -} - -.def-author { - display: flex; - padding: 10px; - flex-direction: row; - align-items: center; - font-size: 0.8rem; - font-style: italic; -} - -/* CODE */ -.inline { - display: inline-block; -} - -pre { - border-radius: 5px; -} - -code { - font-family: "Courier New", Courier, monospace; - border-radius: 5px; -} - -.alert { - border: 1px solid; - border-radius: 2px; - padding: 20px; - margin: 20px 0; -} - -.question { - background-image: url('../img/question.png') right no-repeat; -} - -#hide { - display: none; -} - -footer { - flex-direction: column; - background-color: #252525; - color: #8d8d8d; - padding: 10px; - flex-shrink: 0; -} - -.footer { - display: flex; - flex-direction: row; - justify-content: space-between; -} - -.about { - width: 30%; -} - -.footer-link { - width: 30%; -} - -@media (max-width: 1000px) { - .courseNav { - display: block; - position: relative; - top: 0; - border: 0; - max-width: 100%; - box-shadow: 0 0 transparent; - background-color: transparent; - } -} - -@media (max-width: 678px) { - nav { - position: absolute; - height: auto; - align-items - : flex-start; - justify-content: flex-start; - flex-direction: column; - width: 100%; - } - - .navbar { - width: 100%; - } - - .navbar ul { - flex-direction: column; - width: 100%; - } - - .navbar ul li { - width: 100%; - } - - .navbar ul ul { - position: static; - flex-direction: column; - } - - .navbar ul ul li { - width: 100%; - margin: 0; - } - - .navbar ul ul a { - padding: 10px 20px; - } - - /* Initialement, les sous-menus sont cachés */ - .navbar ul ul { - display: none; - } - - /* Afficher les sous-menus lorsque l'élément parent est focalisé */ - .navbar li:focus-within > ul { - display: flex; - } - - /* Styles pour les liens parents pour permettre le focus */ - .navbar a { - display: block; - padding: 10px; - text-decoration: none; - } - - .navbar li > a:focus + ul { - display: flex; - } - - section { - margin: 300px auto; - width: 85%; - } - - .submenu { - display: none; - } -} - - -/* design.css */ -.snowflake { - position: fixed; - top: -10px; - color: white; - font-size: 1em; - opacity: 0.8; - filter: blur(1px); - z-index: 1000; /* Assurez-vous que les flocons sont au premier plan */ - pointer-events: none; /* Empêche les flocons d'interférer avec les clics */ - animation: fall linear infinite; -} - -@keyframes fall { - to { - transform: translateY(100vh); - } -} - -/* design.css */ -.light { - animation: blink 1s infinite; -} - -.light:nth-child(2) { - animation-delay: 0.2s; -} - -.light:nth-child(3) { - animation-delay: 0.4s; -} - -.light:nth-child(4) { - animation-delay: 0.6s; -} - -.light:nth-child(5) { - animation-delay: 0.8s; -} - -.light:nth-child(6) { - animation-delay: 1s; -} - -.light:nth-child(7) { - animation-delay: 1.2s; -} - -.light:nth-child(8) { - animation-delay: 1.4s; -} - -.light:nth-child(9) { - animation-delay: 1.6s; -} - -.light:nth-child(10) { - animation-delay: 1.8s; -} - -@keyframes blink { - 0%, 100% { - opacity: 1; - } - 50% { - opacity: 0.5; - } -} \ No newline at end of file diff --git a/static/css/forms.css b/static/css/forms.css deleted file mode 100644 index c60f444..0000000 --- a/static/css/forms.css +++ /dev/null @@ -1,98 +0,0 @@ -/* FORUMULAIRES */ - -form { - display: flex; - flex-direction: column; - width: 50%; - margin: 20px auto; -} - -/* Styles pour la section du formulaire */ -.form-section { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px; - background-color: rgba(0, 0, 0, 0.4); /* Fond blanc pour plus de clarté */ - border: 1px solid #dddddd; /* Bordure légère */ - border-radius: 10px; /* Bordure arrondie */ - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Ombre légère */ - margin: 20px auto; - width: 50%; -} - -.login-form { - display: flex; - flex-direction: column; - width: 100%; - align-items: center; -} - -.form-group { - display: flex; - flex-direction: column; - margin-bottom: 15px; -} - -.form-group label { - margin-bottom: 5px; - font-weight: bold; -} - -.login-form input[type="text"], -.login-form input[type="email"], -.login-form input[type="password"], -.login-form textarea { - padding: 10px; - border: 1px solid #cccccc; /* Gris clair */ - border-radius: 5px; /* Bordure légèrement arrondie */ - background-color: rgba(0, 0, 0, 0.7); /* Fond gris très clair */ - color: #a8a8a8; - margin-bottom: 10px; - font-size: 1rem; /* Taille de police harmonisée */ - box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); /* Ombre intérieure subtile */ -} - -.login-form .btn-submit { - padding: 10px; - border: 1px solid #007bff; - border-radius: 5px; /* Bordure légèrement arrondie */ - background-color: #007bff; - color: #ffffff; - cursor: pointer; - transition: background-color 0.3s ease; - font-size: 1rem; /* Taille de police harmonisée */ -} - -.login-form .btn-submit:hover { - background-color: #0056b3; -} - -input[type="text"], input[type="email"], input[type="password"], textarea { - padding: 10px; - border: 1px solid #888888; /* Gris foncé */ - border-radius: 2px; - background-color: #e0e0e0; /* Gris clair harmonisé */ - color: #333333; -} - -input[type="submit"], button { - padding: 10px; - border: 1px solid #007bff; - border-radius: 2px; - background-color: #007bff; - color: #ffffff; - cursor: pointer; - transition: background-color 0.3s ease; -} - -input[type="submit"]:hover, button:hover { - background-color: #0056b3; -} - -button { - padding: 10px; - border: 1px solid; - border-radius: 2px; - cursor: pointer; -} \ No newline at end of file diff --git a/static/css/profile.css b/static/css/profile.css deleted file mode 100644 index 0ac2965..0000000 --- a/static/css/profile.css +++ /dev/null @@ -1,95 +0,0 @@ -/* PROFILE */ - -.profile-section { - max-width: 800px; - margin: 0 auto; - padding: 20px; - border-radius: 8px; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); -} - -.profile-header { - text-align: center; - margin-bottom: 20px; -} - -.profile-header h2 { - font-size: 2em; - margin-bottom: 10px; -} - -.profile-picture { - width: 150px; - height: 150px; - border-radius: 50%; - object-fit: cover; - margin-bottom: 20px; -} - -.profile-picture-mini { - width: 30px; - height: 30px; - border-radius: 50%; - object-fit: cover; - margin: 10px; -} - -.profile-details p { - font-size: 1.1em; - margin: 10px 0; -} - -.profile-actions { - text-align: center; - margin-top: 20px; -} - -.profile-actions .btn { - margin: 0 10px; - padding: 10px 20px; - font-size: 1em; - border-radius: 5px; - text-decoration: none; -} - -.profile-actions .btn-primary { - background-color: #007bff; - color: white; -} - -.profile-actions .btn-secondary { - background-color: #6c757d; - color: white; -} - -.profile-nav { - display: flex; - border-bottom: 1px solid #ddd; /* Bordure légère */ - margin: 20px auto; /* Centrer la navigation */ -} - -.profile-nav ul { - list-style: none; /* Supprimer les puces */ - display: flex; - flex-direction: row; - padding: 0; - margin: 0; -} - -.profile-nav li { - margin-bottom: 10px; /* Espacement entre les éléments */ -} - -.profile-nav a { - text-decoration: none; /* Supprimer la décoration de texte */ - color: #007bff; /* Couleur du texte */ - font-weight: bold; /* Texte en gras */ - display: block; /* Afficher les liens comme des blocs */ - padding: 10px; /* Espacement interne */ - border-radius: 5px; /* Bordure arrondie */ - transition: background-color 0.3s ease; /* Transition pour le survol */ -} - -.profile-nav a:hover { - background-color: #31363b; /* Couleur de fond au survol */ -} \ No newline at end of file diff --git a/static/css/tabs.css b/static/css/tabs.css deleted file mode 100644 index 25dd081..0000000 --- a/static/css/tabs.css +++ /dev/null @@ -1,33 +0,0 @@ -/* TABLEAUX */ - -table { - width: 80%; - border-collapse: collapse; -} - -.table-40 { - width: 40%; -} - -.table-50 { - width: 50%; -} - -.table-60 { - width: 60%; -} - -.table-70 { - width: 70%; -} - -th { - border-bottom: 2px solid; - text-align: left; - font-size: 1.1rem; - padding: 5px; -} - -td { - padding: 10px; -} \ No newline at end of file diff --git a/static/css/utils.css b/static/css/utils.css deleted file mode 100644 index 8f4f7a4..0000000 --- a/static/css/utils.css +++ /dev/null @@ -1,46 +0,0 @@ -span.helptext { - font-size: 0.7em; - color: #f58787; - margin-left: 5px; - font-style: italic; -} - -ul.flash_messages { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - margin: 10px; - position: fixed; - top: 70px; - right: 10px; - z-index: 1000; -} - -ul.flash_message { - background-color: #f0f0f0; - border: 1px solid #ccc; - padding: 10px; - margin-bottom: 10px; - border-radius: 5px; - opacity: 1; - transition: opacity 1s ease-out; /* Transition pour l'opacité */ -} - -ul.flash_messages li { - list-style: none; - padding: 10px; - margin: 10px; - border-radius: 5px; - color: white; -} - -ul.flash_messages li.error { - background-color: #f58787; - color: red; -} - -ul.flash_messages li.success { - background-color: #a5edb5; - color: green; -} \ No newline at end of file diff --git a/static/js/functions.js b/static/js/functions.js index 12a77b9..aedd798 100644 --- a/static/js/functions.js +++ b/static/js/functions.js @@ -17,12 +17,47 @@ function show(id) { // Fonction pour supprimer le message d'alerte après 5 secondes document.addEventListener('DOMContentLoaded', function() { let messages = document.querySelector('.flash_messages') - setTimeout(function() { - messages.style.opacity = 0; - setTimeout(function() { - messages.style.display = 'none'; - }, 1000); - }, 5000); + if (messages) { + setTimeout(function() { + messages.style.opacity = 0; + setTimeout(function() { + messages.style.display = 'none'; + }, 1000); + }, 5000); + } + + // Theme toggle setup + var toggle = document.getElementById('themeToggle'); + var themeLink = document.getElementById('theme-css'); + function applyTheme(theme) { + document.documentElement.setAttribute('data-theme', theme); + if (theme === 'light') { + if (themeLink) themeLink.href = themeLink.href.replace('colors_dark.css', 'colors_light.css'); + } else { + if (themeLink) themeLink.href = themeLink.href.replace('colors_light.css', 'colors_dark.css'); + } + var icon = toggle && toggle.querySelector('i'); + if (icon) { + icon.classList.remove('fa-sun','fa-moon'); + icon.classList.add(theme === 'light' ? 'fa-moon' : 'fa-sun'); + } + if (toggle) { + toggle.setAttribute('aria-pressed', theme === 'dark' ? 'true' : 'false'); + toggle.setAttribute('aria-label', theme === 'light' ? 'Activer le thème sombre' : 'Activer le thème clair'); + toggle.title = toggle.getAttribute('aria-label'); + } + } + try { + var current = document.documentElement.getAttribute('data-theme') || 'dark'; + applyTheme(current); + if (toggle) { + toggle.addEventListener('click', function() { + var next = (document.documentElement.getAttribute('data-theme') === 'light') ? 'dark' : 'light'; + localStorage.setItem('pdz-theme', next); + applyTheme(next); + }); + } + } catch(e) {} }); // Fonction pour générer des flocons de neige @@ -46,5 +81,5 @@ function createSnowflake() { }, duration * 1000); } -// On génére lee flocons toute les 300ms +// On génère les flocons toutes les 300ms setInterval(createSnowflake, 300); \ No newline at end of file diff --git a/staticfiles/css/colors_dark.css b/staticfiles/css/colors_dark.css deleted file mode 100644 index 5d5f272..0000000 --- a/staticfiles/css/colors_dark.css +++ /dev/null @@ -1,164 +0,0 @@ -/* Couleurs en mode sombre */ -html { - background-color: #0f1f2e; /* Fond sombre pour toute la page */ - color:#5e88a0; -} - -nav { - background-color: #000824;; /* Fond sombre pour la barre de navigation */ -} - -.navbar ul ul li { - background-color: #000824; /* Fond sombre pour les sous-menus */ - border-color: #4f6f8f; /* Couleur de la bordure */ - box-shadow: 2px 2px 2px #0f1f2e; /* Ombre légère */ -} - -.navbar ul ul a { - color: #5e88a0; /* Couleur du texte pour les liens des sous-menus */ -} - -.brand { - color: #c4d7e0; /* Couleur du texte pour la marque */ -} - -a { - color: #7ca9c6; /* Couleur de base pour les liens */ -} - -a:hover { - color: #ffc3a0; /* Couleur au survol */ - text-shadow: #fff 0px 1px 5px; /* Ombre du texte au survol */ -} - -a.house { - color: #5e88a0; /* Couleur spécifique pour certains liens */ -} - -a.house:hover { - color: #7ca9c6; /* Couleur au survol */ -} - -.button { - background-color: #2a3e4c; /* Fond sombre pour les boutons */ - color: #fff; /* Couleur du texte */ - border-color: transparent; /* Bordure transparente */ -} - -.button:hover { - background-color: #ff8a6b; /* Fond au survol */ -} - -.test-me { - border-color: #7ca9c6; /* Couleur de bordure */ - background-color: #9cd0ef; /* Fond */ - color: #2e485d; /* Couleur du texte */ -} - -.reset { - border-color: #ff7b39; /* Couleur de bordure */ - background-color: #ffd0a1; /* Fond */ - color: #8e4b1e; /* Couleur du texte */ -} - -.courseNav { - border-color: #0f1f2e; /* Couleur de bordure */ - box-shadow: 2px 2px 2px #4f6f8f; /* Ombre */ - background-color: #334c66; /* Fond sombre */ -} - -.edito { - border-color: #a4b8c7; /* Couleur de bordure */ - background-color: #334c66; /* Fond sombre */ - color: #86a3b4; -} - -.test { - border-color: #8c7d49; /* Couleur de bordure */ - background-color: #b5ac8f; /* Fond */ - color: #70685a; /* Couleur du texte */ -} - -.comment { - color: #6cb87e; /* Couleur pour les commentaires */ -} - -h1 { - color: #4e9ed6; /* Couleur pour les titres h1 */ - border-left-color: #ffa500; /* Couleur de la bordure gauche */ - border-bottom-color: #ffa500; /* Couleur de la bordure inférieure */ -} - -h2 { - color: #e58a01; /* Couleur pour les titres h2 */ -} - -.card { - border-color: #b5b5b5; /* Couleur de bordure des cartes */ - box-shadow: 2px 2px 2px #888888; /* Ombre */ -} - -.card-header img.thumbnails { - transition: transform 1s ease; /* Transition pour les images */ -} - -.card:hover img.thumbnails { - transform: scale(1.2); /* Zoom au survol */ -} - -.card-body { - background-color: #0f1f2e; /* Couleur des liens dans le corps des cartes */ -} - -.card-body a { - color: #4e9ed6; /* Couleur des liens dans le corps des cartes */ -} - -.card-body a:hover { - color: #631a37; /* Couleur au survol */ -} - -.question { - background-color: #c5fffa; /* Fond pour les questions */ - border-color: #006e65; /* Couleur de bordure */ - color: #006e65; /* Couleur du texte */ -} - -.validation { - background-color: #c5ffcf; - border-color: #006e18; - color: #006e18; -} - -.conclusion { - background-color: #ffdac5; /* Fond pour les conclusions */ - border-color: #6e1f00; /* Couleur de bordure */ - color: #6e1f00; /* Couleur du texte */ -} - -.exercice { - background-color: #eeffc5; /* Fond pour les exercices */ - border-color: #636e00; /* Couleur de bordure */ - color: #636e00; /* Couleur du texte */ -} - -.info { - background-color: #c5f3ff; /* Fond pour les exercices */ - border-color: #004f6e; /* Couleur de bordure */ - color: #002c6e; /* Couleur du texte */ -} - -th { - border-color: #b5b5b5; /* Couleur de bordure pour les cellules d'en-tête */ -} - -tr:nth-child(even) { - background-color: #536a7d; /* Fond pour les lignes paires */ - color: #002c6e; -} - - -footer { - background-color: #000824; /* Fond sombre pour le pied de page */ - color: #8d8d8d; /* Couleur du texte */ -} diff --git a/staticfiles/css/colors_light.css b/staticfiles/css/colors_light.css deleted file mode 100644 index fe3525e..0000000 --- a/staticfiles/css/colors_light.css +++ /dev/null @@ -1,149 +0,0 @@ -/* Couleurs */ -nav { - background-color: #252525; -} - -.navbar ul ul li { - background-color: #252525; - border-color: #fff; - box-shadow: 2px 2px 2px #252525; -} - -.navbar ul ul a { - color: #10B3DB; -} - -.brand { - color: #fff; -} - -a { - color: #458741; -} - -a:hover { - color: #ffbdbd; - text-shadow: #fff 0px 1px 5px; -} - -a.house { - color: #10B3DB; -} - -a.house:hover { - color: #458741; -} - -.button { - background-color: #fff; - color: #000; - border-color: transparent; -} - -.button:hover { - background-color: #ffbdbd; -} - -.test-me { - border-color: #458741; - background-color: #93ec8e; - color: #2b422a; -} - -.reset { - border-color: #ff5e00; - background-color: #ffb286; - color: #6b3618; -} - -.courseNav { - border-color: #252525; - box-shadow: 2px 2px 2px #888888; - background-color: #f8f8f8; -} - -.edito { - border-color: #b4b4b4; - background-color: #f8f8f8; -} - -.test { - border-color: #a38d2b; - background-color: #eee4b7; - color: #504721; -} - -.comment { - color: green; -} - -h1 { - color: #236877; - border-left-color: orange; - border-bottom-color: orange; -} - -h2 { - color: #DB6310; -} - -.card { - border-color: #c9c9c9; - box-shadow: 2px 2px 2px #888888; -} - -.card-header img.thumbnails { - transition: transform 1s ease; -} - -.card:hover img.thumbnails { - transform: scale(1.2); -} - -.card-body a { - color: #236877; - background-color: #f9f9f9; - border-top: 1px solid; -} - -.card-body a:hover { - color: #9e1888; -} - -.question { - background-color: #c5fffa; - border-color: #006e65; - color: #006e65; -} - -.validation { - background-color: #c5ffcf; - border-color: #006e18; - color: #006e18; -} - -.conclusion { - background-color: #ffdac5; - border-color: #6e1f00; - color: #6e1f00; -} - -.exercice { - background-color: #eeffc5; - border-color: #636e00; - color: #636e00; -} - -th { - border-color: #888888; -} - -tr:nth-child(even) { - background-color: #e2e2e2; -} - - -footer { - background-color: #252525; - color: #8d8d8d; -} diff --git a/staticfiles/css/design.css b/staticfiles/css/design.css deleted file mode 100644 index 978b687..0000000 --- a/staticfiles/css/design.css +++ /dev/null @@ -1,599 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap'); - -html { - display: flex; - flex-direction: column; - font-size: 16px; - font-family: "Montserrat"; - scroll-behavior: smooth; -} - -body { - display: flex; - flex-direction: column; - margin: 0; -} - -nav { - display: flex; - /*position: fixed;*/ - /*width: 100vw;*/ - align-items: center; - justify-content: space-between; - top: 0; - padding: 0 10px; - height: 80px; - border-bottom: 2px solid #000; -} - -.navbar { - display: flex; - width: 70%; - justify-content: flex-start; - margin-right: 30px; -} - -.navbar ul, .navbar li { - list-style: none; - padding: 0; - margin: 0; -} - -.navbar ul { - display: flex; - flex-direction: row; - width: 100%; -} - -.navbar li { - position: relative; - margin: auto 10px; -} - -.navend { - margin-right: 20px; - display: flex; - width: 100%; - align-items: end; - flex-direction: row-reverse; -} - -.navend a { - cursor: pointer; -} - -.navbar ul ul { - display: none; - position: absolute; - width: auto; - left: 0; - top: 100%; - flex-direction: column; - transform: translateX(-25%); -} - -.navbar li:hover ul, -.navbar li ul:hover { - display: flex; /* Changed to flex to support horizontal layout */ -} - -.navbar ul ul li { - width: auto; /* Adjust width for inline layout */ - margin: auto 10px; - padding: 10px; - border-left: 1px solid; -} - -.navbar ul ul li:first-child { - margin-top: 20px; -} - -.navbar ul ul a { - display: block; - padding: 0 0 10px 0; - text-decoration: none; - white-space: nowrap; /* Prevents text from wrapping */ -} - -/* Styles pour la navigation du profil utilisateur */ -.profile-nav { - display: flex; - border-bottom: 1px solid #ddd; /* Bordure légère */ - margin: 20px auto; /* Centrer la navigation */ -} - -.profile-nav ul { - list-style: none; /* Supprimer les puces */ - display: flex; - flex-direction: row; - padding: 0; - margin: 0; -} - -.profile-nav li { - margin-bottom: 10px; /* Espacement entre les éléments */ -} - -.profile-nav a { - text-decoration: none; /* Supprimer la décoration de texte */ - color: #007bff; /* Couleur du texte */ - font-weight: bold; /* Texte en gras */ - display: block; /* Afficher les liens comme des blocs */ - padding: 10px; /* Espacement interne */ - border-radius: 5px; /* Bordure arrondie */ - transition: background-color 0.3s ease; /* Transition pour le survol */ -} - -.profile-nav a:hover { - background-color: #31363b; /* Couleur de fond au survol */ -} - -.brand { - font-size: 1.5rem; - font-weight: 600; - letter-spacing: 0.2cm; - font-variant: small-caps; -} - -.subtitle { - font-size: 1rem; - letter-spacing: 0.05cm; -} - -a { - text-decoration: none; - font-weight: 600; - transition: all 1s; - scroll-margin-top: 80px; -} - -.button { - padding: 5px; - max-width: 300px; - cursor: pointer; - font-size: 1.5rem; - border: 1px solid; - border-radius: 2px; - margin: 20px; -} - -.button-grp { - display: flex; - flex-direction: row; - justify-content: center; - width: 100%; -} - -main { - flex: 1; -} - -section { - display: flex; - flex-direction: column; - padding: 20px; - width: 60%; - margin: 20px auto; -} - -.courseNav { - display: block; - float: left; - position: fixed; - left: 0; - top: 150px; - max-width: 15%; - border: 1px solid; -} - -.edito { - border: 1px solid; - border-radius: 5px; -} - -.comment { - font-weight: 500; -} - -.test { - border: 1px solid; - padding: 10px; -} - -.ul-arrow li { - list-style: none; -} - -.ul-arrow li:before { - content: "→ "; - font-size: 1.5rem; -} - -h1 { - font-size: 2rem; - border-left: 5px solid; - border-bottom: 1px solid; -} - -h2 { - font-size: 1.5rem; -} - -img { - max-width: 100%; -} - -.card-header img.thumbnails { - transition: transform 1s ease -} - -.card:hover img.thumbnails { - transform: scale(1.2); -} - -.container-inline { - display: flex; - flex-direction: row; -} - -.card { - display: flex; - flex-direction: column; - max-width: 250px; - border-left: 1px solid; - border-top: 1px solid; - border-radius: 2px; - overflow: hidden; - margin: 20px; -} - -.card-header h2 { - display: flex; - overflow: hidden; -} - -.card-header { - display: flex; - width: 100%; - font-size: 1rem; - font-weight: 500; -} - -.card-body a { - font-size: 1rem; - font-weight: 600; -} - -.card-body a:hover { - text-decoration: underline -} - -.card-body { - border-top: 1px solid; - padding: 5px; - line-height: 90%; - overflow: hidden; - z-index: 3; -} - -.def-author { - font-size: 0.8rem; - font-style: italic; -} - -/* CODE */ -.inline { - display: inline-block; -} - -pre { - border-radius: 5px; -} - -code { - font-family: "Courier New", Courier, monospace; - border-radius: 5px; -} - -.alert { - border: 1px solid; - border-radius: 2px; - padding: 20px; - margin: 20px 0; -} - -.question { - background-image: url('../img/question.png') right no-repeat; -} - -#hide { - display: none; -} - -table { - width: 80%; - border-collapse: collapse; -} - -.table-40 { - width: 40%; -} - -.table-50 { - width: 50%; -} - -.table-60 { - width: 60%; -} - -.table-70 { - width: 70%; -} - -th { - border-bottom: 2px solid; - text-align: left; - font-size: 1.1rem; - padding: 5px; -} - -td { - padding: 10px; -} - -form { - display: flex; - flex-direction: column; - width: 50%; - margin: 20px auto; -} - -/* Styles pour la section du formulaire */ -.form-section { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px; - background-color: rgba(0, 0, 0, 0.4); /* Fond blanc pour plus de clarté */ - border: 1px solid #dddddd; /* Bordure légère */ - border-radius: 10px; /* Bordure arrondie */ - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Ombre légère */ - margin: 20px auto; - width: 50%; -} - -.login-form { - display: flex; - flex-direction: column; - width: 100%; - align-items: center; -} - -.form-group { - display: flex; - flex-direction: column; - margin-bottom: 15px; -} - -.form-group label { - margin-bottom: 5px; - font-weight: bold; -} - -.login-form input[type="text"], -.login-form input[type="email"], -.login-form input[type="password"], -.login-form textarea { - padding: 10px; - border: 1px solid #cccccc; /* Gris clair */ - border-radius: 5px; /* Bordure légèrement arrondie */ - background-color: rgba(0, 0, 0, 0.7); /* Fond gris très clair */ - color: #a8a8a8; - margin-bottom: 10px; - font-size: 1rem; /* Taille de police harmonisée */ - box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); /* Ombre intérieure subtile */ -} - -.login-form .btn-submit { - padding: 10px; - border: 1px solid #007bff; - border-radius: 5px; /* Bordure légèrement arrondie */ - background-color: #007bff; - color: #ffffff; - cursor: pointer; - transition: background-color 0.3s ease; - font-size: 1rem; /* Taille de police harmonisée */ -} - -.login-form .btn-submit:hover { - background-color: #0056b3; -} - -input[type="text"], input[type="email"], input[type="password"], textarea { - padding: 10px; - border: 1px solid #888888; /* Gris foncé */ - border-radius: 2px; - background-color: #e0e0e0; /* Gris clair harmonisé */ - color: #333333; -} - -input[type="submit"], button { - padding: 10px; - border: 1px solid #007bff; - border-radius: 2px; - background-color: #007bff; - color: #ffffff; - cursor: pointer; - transition: background-color 0.3s ease; -} - -input[type="submit"]:hover, button:hover { - background-color: #0056b3; -} - -button { - padding: 10px; - border: 1px solid; - border-radius: 2px; - cursor: pointer; -} - -/* PROFILE */ - -.profile-section { - max-width: 800px; - margin: 0 auto; - padding: 20px; - border-radius: 8px; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); -} - -.profile-header { - text-align: center; - margin-bottom: 20px; -} - -.profile-header h2 { - font-size: 2em; - margin-bottom: 10px; -} - -.profile-picture { - width: 150px; - height: 150px; - border-radius: 50%; - object-fit: cover; - margin-bottom: 20px; -} - -.profile-details p { - font-size: 1.1em; - margin: 10px 0; -} - -.profile-actions { - text-align: center; - margin-top: 20px; -} - -.profile-actions .btn { - margin: 0 10px; - padding: 10px 20px; - font-size: 1em; - border-radius: 5px; - text-decoration: none; -} - -.profile-actions .btn-primary { - background-color: #007bff; - color: white; -} - -.profile-actions .btn-secondary { - background-color: #6c757d; - color: white; -} - -footer { - flex-direction: column; - background-color: #252525; - color: #8d8d8d; - padding: 10px; - flex-shrink: 0; -} - -.footer { - display: flex; - flex-direction: row; - justify-content: space-between; -} - -.about { - width: 30%; -} - -.footer-link { - width: 30%; -} - -@media (max-width: 1000px) { - .courseNav { - display: block; - position: relative; - top: 0; - border: 0; - max-width: 100%; - box-shadow: 0 0 transparent; - background-color: transparent; - } -} - -@media (max-width: 678px) { - nav { - position: absolute; - height: auto; - align-items - : flex-start; - justify-content: flex-start; - flex-direction: column; - width: 100%; - } - - .navbar { - width: 100%; - } - - .navbar ul { - flex-direction: column; - width: 100%; - } - - .navbar ul li { - width: 100%; - } - - .navbar ul ul { - position: static; - flex-direction: column; - } - - .navbar ul ul li { - width: 100%; - margin: 0; - } - - .navbar ul ul a { - padding: 10px 20px; - } - - /* Initialement, les sous-menus sont cachés */ - .navbar ul ul { - display: none; - } - - /* Afficher les sous-menus lorsque l'élément parent est focalisé */ - .navbar li:focus-within > ul { - display: flex; - } - - /* Styles pour les liens parents pour permettre le focus */ - .navbar a { - display: block; - padding: 10px; - text-decoration: none; - } - - .navbar li > a:focus + ul { - display: flex; - } - - section { - margin: 300px auto; - width: 85%; - } - - .submenu { - display: none; - } -} diff --git a/staticfiles/css/profile.css b/staticfiles/css/profile.css deleted file mode 100644 index 559c8a5..0000000 --- a/staticfiles/css/profile.css +++ /dev/null @@ -1,55 +0,0 @@ - -.profile-section { - max-width: 800px; - margin: 0 auto; - padding: 20px; - background-color: #f9f9f9; - border-radius: 8px; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); -} - -.profile-header { - text-align: center; - margin-bottom: 20px; -} - -.profile-header h2 { - font-size: 2em; - margin-bottom: 10px; -} - -.profile-picture { - width: 150px; - height: 150px; - border-radius: 50%; - object-fit: cover; - margin-bottom: 20px; -} - -.profile-details p { - font-size: 1.1em; - margin: 10px 0; -} - -.profile-actions { - text-align: center; - margin-top: 20px; -} - -.profile-actions .btn { - margin: 0 10px; - padding: 10px 20px; - font-size: 1em; - border-radius: 5px; - text-decoration: none; -} - -.profile-actions .btn-primary { - background-color: #007bff; - color: white; -} - -.profile-actions .btn-secondary { - background-color: #6c757d; - color: white; -} \ No newline at end of file diff --git a/templates/home.html b/templates/home.html index 0e93226..925ab23 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,12 +1,90 @@ {% extends 'layout.html' %} {% block content %} -
-

Bienvenue sur Partir de zero, votre nouvelle communauté dédiée à l'apprentissage des langages informatiques !

+
+
+

Apprenez à coder de A à Z

+

Des cours gratuits et payants, structurés et concrets, pour progresser rapidement en programmation.

+ +
+ Pas de carte requise pour commencer + À votre rythme + Accès premium en option +
+
+
-

Je crois que l'apprentissage de la programmation et du développement est une aventure passionnante et accessible à tous. Que vous soyez un débutant curieux ou un développeur expérimenté en quête de nouvelles compétences, la plateforme est conçue pour vous accompagner à chaque étape de votre parcours.

+
+
+
+

Parcours guidés

+

Des cheminements clairs pour débuter et monter en compétence sans vous perdre.

+
+
+
+

Pratique d'abord

+

Des projets concrets, des exercices et des corrections expliquées pas-à-pas.

+
+
+
+

Communauté

+

Posez vos questions et obtenez de l'aide de la communauté et de l'auteur.

+
{% block course %} {% include "courses/partials/list.html" %} {% endblock %} + +
+

Gratuit pour commencer, Premium pour aller plus loin

+ + +
+ + + +
+

Ils progressent avec Partir de zéro

+
+
+

“Des cours clairs et progressifs. J’ai enfin compris Django et j’ai lancé mon premier projet.”

+
Alexandre — Débutant devenu autonome
+
+
+

“L’approche projet et les explications pas-à-pas m’ont fait gagner des semaines.”

+
Sarah — Étudiante en informatique
+
+
+

“Parfait pour reprendre les bases et aller plus loin. Le mode sombre est top 👌.”

+
Yassine — Dev front-end
+
+
+
{% endblock %} diff --git a/templates/layout.html b/templates/layout.html index a5ea775..c162cb4 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -4,18 +4,33 @@ {% load static %} - - - - - - + + + + + - + + PartirDeZero @@ -23,60 +38,65 @@ {% block header %} {% include "partials/_header.html" %} {% endblock %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
{% if messages %}