diff --git a/CourseMaster/settings.py b/CourseMaster/settings.py index f568ec2..105f98d 100644 --- a/CourseMaster/settings.py +++ b/CourseMaster/settings.py @@ -132,7 +132,7 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/4.2/howto/static-files/ -STATIC_URL = 'static/' +STATIC_URL = '/static/' # Default primary key field type # https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field diff --git a/README.md b/README.md index 57e711c..b263ecf 100644 --- a/README.md +++ b/README.md @@ -84,16 +84,16 @@ OR ### Expiration -Expiration of the course: The course expires after 2 minutes. +Expiration of the course: The course expires after 5 minutes. If a student register to the course, it add 1 minute. --- -### Design +### Students management -Design is not existing yet. +As a teacher, you can't manage students registered to your course. --- -### Students management +### Searching -As a teacher, you can't manage students registered to your course. \ No newline at end of file +The search looks for title, description and level fo the course. There's no advanced search for the moment. \ No newline at end of file diff --git a/redis_app/static/redis_app/style.css b/redis_app/static/redis_app/style.css new file mode 100644 index 0000000..ec83e4f --- /dev/null +++ b/redis_app/static/redis_app/style.css @@ -0,0 +1,202 @@ +body { + margin: 0; + font-family: Arial, sans-serif; + color: #333; + background-color: #f4f4f9; + text-align: center; +} + +nav { + background-color: #333; + padding: 1rem; + display: flex; + justify-content: center; +} + +nav a { + color: white; + text-decoration: none; + margin: 0 1rem; + padding: 0.5rem 1rem; + font-family: Arial, sans-serif; + font-size: 1rem; + border-radius: 4px; + transition: background-color 0.3s ease, color 0.3s ease; +} + +nav a:hover { + background-color: #555; + color: #f5f5f5; +} + +nav a:active { + background-color: #777; +} + +p.no-courses { + text-align: center; + color: #777; + font-size: 1.2rem; + font-style: italic; +} + +.body a, .submit { + display: inline-block; + padding: 0.7rem 0.8rem; + background-color: #4a90e2; + color: white; + text-decoration: none; + border-radius: 5px; + font-size: 1rem; + text-align: center; + transition: background-color 0.3s ease; +} + +.body a { + margin: .5rem; +} + +.body a:hover, .submit:hover { + background-color: #357abd; +} + +.body { + margin-top: 2rem; + display: flex; + justify-content: center; +} + +.container { + width: 60%; + display: flex; + flex-direction: column; + flex-wrap: wrap; + justify-content: center; + align-items: center; +} + +form { + width: 500px; + padding: 1.5rem; + background-color: #f7f7f7; + border-radius: 8px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + font-family: Arial, sans-serif; +} + +fieldset { + border: none; + padding: 0; + margin: 0; +} + +label { + font-weight: bold; + margin-top: 1rem; + display: block; + color: #555; +} + +h1 { + margin-top: 0; + margin-bottom: 0; +} + +legend h1 { + text-align: center; + font-size: 1.8rem; + color: #333; + margin-bottom: 1rem; +} + +input, textarea, select { + padding: 0.6rem; + margin-top: 0.5rem; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; + font-size: 1rem; +} + +.input, textarea, select { + width: 100%; +} + +textarea { + height: 100px; + resize: vertical; +} + +.error-message { + background-color: #ee332d; + color: white; + width: 100%; + padding: 15px 0; + border-radius: 5px; + font-weight: bold; + text-align: center; + margin-top: 0.5rem; +} + +.success-message { + background-color: #51c961; + color: white; + width: 100%; + padding: 15px 0; + border-radius: 5px; + font-weight: bold; + text-align: center; + margin-top: 0.5rem; +} + +.submit-container { + display: flex; + flex-direction: column; + justify-content: end; + align-items: end; +} + +.div-container { + width: 500px; + padding: 1.5rem; + background-color: #f7f7f7; + border-radius: 8px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + font-family: Arial, sans-serif; +} + +.create-container { + display: flex; + justify-content: end; + align-items: end; +} + +.plus { + font-size: 30px; + font-weight: bold; + padding: 0; +} + +.create-course { + padding: 0 10 !important; + display: flex !important; + align-items: center !important; + justify-content: center !important; + flex-direction: row !important; + height: auto; +} + +.create-course>p { + margin: 0 5px 0 0 !important; +} + +.notifications { + display: flex; + justify-content: space-between; + flex-direction: row; +} + +.notifications h1 { + vertical-align: middle; + line-height: 50px; +} \ No newline at end of file diff --git a/redis_app/templates/courses.html b/redis_app/templates/courses.html index de03077..bf6d2d1 100644 --- a/redis_app/templates/courses.html +++ b/redis_app/templates/courses.html @@ -1,4 +1,8 @@ +
+ {% load static %} + + -No course yet
- {% endif %} -- Register to a course by Searching -
-No course yet
+ {% endif %} ++ Register to a course by Searching +
+