From 4e04b284e8475dbbe0ea7dd3da03e51a66389052 Mon Sep 17 00:00:00 2001 From: raiot Date: Wed, 20 Mar 2024 15:59:58 +0800 Subject: [PATCH] feat: style --- CourseField/settings.py | 5 +- templates/courses/base.html | 6 +- templates/courses/base_bak.html | 316 --------------------------- templates/courses/course_detail.html | 4 +- templates/courses/index.html | 2 +- templates/courses/lesson_detail.html | 11 +- 6 files changed, 18 insertions(+), 326 deletions(-) delete mode 100644 templates/courses/base_bak.html diff --git a/CourseField/settings.py b/CourseField/settings.py index 71bdbb2..760c716 100644 --- a/CourseField/settings.py +++ b/CourseField/settings.py @@ -120,9 +120,8 @@ USE_TZ = True # https://docs.djangoproject.com/en/5.0/howto/static-files/ STATIC_URL = 'static/' -STATICFILES_DIRS = [ - BASE_DIR / 'static', -] + +STATIC_ROOT = BASE_DIR / 'static' MEDIA_URL = '/' MEDIA_ROOT = BASE_DIR diff --git a/templates/courses/base.html b/templates/courses/base.html index d2c7250..25a7028 100644 --- a/templates/courses/base.html +++ b/templates/courses/base.html @@ -5,11 +5,11 @@ - Photo Grid with Tailwind CSS + CourseField {% block head_title %}{% endblock %} - - + + - - - - - -
- - -
- - -
- -
-
- -
-{% block content %} - -{% endblock %} -
-
- - -
- -
- {% block scripts %} - {% endblock %} - - \ No newline at end of file diff --git a/templates/courses/course_detail.html b/templates/courses/course_detail.html index c83b12f..e7cb505 100644 --- a/templates/courses/course_detail.html +++ b/templates/courses/course_detail.html @@ -1,9 +1,11 @@ {% extends 'courses/base.html' %} +{% block head_title %}{% endblock %} + {% block content %}
-
+
{% for lesson in lesson_list %} diff --git a/templates/courses/index.html b/templates/courses/index.html index 32c0f6d..be27cba 100644 --- a/templates/courses/index.html +++ b/templates/courses/index.html @@ -3,7 +3,7 @@ {% block content %}
-
+
{% for course in course_list %} diff --git a/templates/courses/lesson_detail.html b/templates/courses/lesson_detail.html index b0a821d..dbfb65b 100644 --- a/templates/courses/lesson_detail.html +++ b/templates/courses/lesson_detail.html @@ -1,4 +1,7 @@ {% extends 'courses/base.html' %} + +{% block head_title %}- {{ lesson.title }}{% endblock %} + {% block content %}

{{ lesson.title }}

@@ -18,8 +21,12 @@