diff --git a/tutorindigo/templates/indigo/lms/static/sass/course/_new-home.scss b/tutorindigo/templates/indigo/lms/static/sass/course/_new-home.scss index 011cd4b19..131f260be 100644 --- a/tutorindigo/templates/indigo/lms/static/sass/course/_new-home.scss +++ b/tutorindigo/templates/indigo/lms/static/sass/course/_new-home.scss @@ -115,6 +115,8 @@ section.home { align-items: center; justify-content: center; flex-direction: column; + transition: background-color 0.3s ease; + &__heading { color: var(--fx-2025-indigo-white-color); text-shadow: 0 0 10px var(--fx-2025-indigo-black); @@ -161,6 +163,16 @@ section.home { .platformMainWrap { margin-top: 64px; padding: 40px; + border-radius: 16px; + + // Add smooth transitions for background color changes + transition: background-color 0.3s ease; + + // Ensure proper spacing when background is applied + &[style*="background-color"]:not([style*="background-color: transparent"]) { + padding: 48px 40px; + margin-bottom: 24px; + } } .courseMainWrapper { background-color: $concrete-color; @@ -844,3 +856,16 @@ section.home { } } } + +// Paragraph section styling for background colors +.fx-raw-html-paragraph-container { + border-radius: 16px; + transition: background-color 0.3s ease; + + // Add padding when background color is applied + &[style*="background-color"]:not([style*="background-color: transparent"]) { + padding: 40px; + margin-top: 64px; + margin-bottom: 24px; + } +} diff --git a/tutorindigo/templates/indigo/lms/static/sass/home/_home.scss b/tutorindigo/templates/indigo/lms/static/sass/home/_home.scss index 2543bc6cb..aa453fd9b 100644 --- a/tutorindigo/templates/indigo/lms/static/sass/home/_home.scss +++ b/tutorindigo/templates/indigo/lms/static/sass/home/_home.scss @@ -206,4 +206,41 @@ body.indigo-dark-theme { } } } +} + +// Course Category Tabs - Theme Integration +.fx-course-categories-section { + .fx-category-tab-btn.active { + background: $primary; + } + + .fx-category-tab-btn:focus { + outline-color: $primary; + } +} + +body.indigo-dark-theme { + .fx-course-categories-section { + .fx-category-tabs { + background: $primary-light-d; + } + + .fx-category-tab-btn { + color: $text-color-d; + + &:hover { + background: rgba($primary-d, 0.3); + color: $text-color-d; + } + + &.active { + background: $primary-d; + color: $btn-color-d; + } + + &:focus { + outline-color: $primary-d; + } + } + } } \ No newline at end of file diff --git a/tutorindigo/templates/indigo/lms/templates/courses_list.html b/tutorindigo/templates/indigo/lms/templates/courses_list.html index a0d865602..6661027cb 100644 --- a/tutorindigo/templates/indigo/lms/templates/courses_list.html +++ b/tutorindigo/templates/indigo/lms/templates/courses_list.html @@ -1,5 +1,9 @@ -<%page args="fx_grid_type" expression_filter="h"/> -<%! from django.utils.translation import gettext as _ %> +<%page args="fx_grid_type, section_title='', section_description=''" expression_filter="h"/> +<%namespace name='fx_static' file='fx_templates/fx_static_content.html'/> +<%! +from django.utils.translation import gettext as _ +from django.urls import reverse +%> <% if fx_grid_type == 'categorised': @@ -10,23 +14,321 @@ homepage_course_max = 9999 no_courses = not courses + +# Use provided title/description or defaults +display_title = fx_static.t(section_title) if section_title else _("Training courses") +display_description = fx_static.t(section_description) if section_description else _("We aim to enable individuals to achieve their full potential through high-quality education that is accessible to all.") %> -
-% if no_courses: -
-
-

${_("There are no courses available at this time!")}

-
-
-% elif settings.FEATURES.get('COURSES_ARE_BROWSABLE'): - %for course in courses[:homepage_course_max]: - <%include file="course.html" args="course=course, source_page='main_page'" /> - %endfor - % if homepage_course_max and len(courses) > homepage_course_max: -
- ${_("Browse all courses")} +
+ +
+

${display_title}

+

${display_description}

+ + % if no_courses: +
+

${_("There are no courses available at this time!")}

+
+ % elif settings.FEATURES.get('COURSES_ARE_BROWSABLE'): +
+ +
+ + % if homepage_course_max and len(courses) > homepage_course_max: + + % endif % endif -% endif
+ + diff --git a/tutorindigo/templates/indigo/lms/templates/courses_list_categorised.html b/tutorindigo/templates/indigo/lms/templates/courses_list_categorised.html new file mode 100644 index 000000000..480a4a045 --- /dev/null +++ b/tutorindigo/templates/indigo/lms/templates/courses_list_categorised.html @@ -0,0 +1,476 @@ +<%page args="fx_course_categories, section_id, section_title='', section_description=''" expression_filter="h"/> +<%namespace name='fx_static' file='fx_templates/fx_static_content.html'/> +<%! +from django.utils.translation import gettext as _ +from django.urls import reverse +%> + +<% +import json + +# 1. CATEGORY LOGIC +has_categories_with_courses = False +for cat in fx_course_categories: + if cat.get('courses'): + has_categories_with_courses = True + break + +no_courses = not fx_course_categories or not has_categories_with_courses + +all_category_course_ids = set() +course_to_categories = {} +for cat in fx_course_categories: + cat_id = cat.get('id', '') + for cid in cat.get('courses', []): + all_category_course_ids.add(cid) + if cid not in course_to_categories: + course_to_categories[cid] = [] + course_to_categories[cid].append(cat_id) + +categories_json = {} +for cat in fx_course_categories: + cat_id = cat.get('id', '') + categories_json[cat_id] = cat.get('courses', []) + +# Use provided title/description or defaults +display_title = fx_static.t(section_title) if section_title else _("Training courses") +display_description = fx_static.t(section_description) if section_description else _("We aim to enable individuals to achieve their full potential through high-quality education that is accessible to all.") +%> + +
+ +
+

${display_title}

+

${display_description}

+
+ + % if no_courses: +
+

${_("There are no courses available at this time!")}

+
+ % elif settings.FEATURES.get('COURSES_ARE_BROWSABLE') and fx_course_categories: + +
+
+ + % for category in fx_course_categories: + <% + cat_id = category.get('id', '') + cat_label = fx_static.t(category.get('label', {})) + cat_courses = category.get('courses', []) + %> + % if cat_label and cat_courses: + + % endif + % endfor +
+
+ +
+ +
+ % endif +
+ + + + \ No newline at end of file diff --git a/tutorindigo/templates/indigo/lms/templates/fx_templates/fx_header_navbar_links.html b/tutorindigo/templates/indigo/lms/templates/fx_templates/fx_header_navbar_links.html index 0e49add1d..25ec0262a 100644 --- a/tutorindigo/templates/indigo/lms/templates/fx_templates/fx_header_navbar_links.html +++ b/tutorindigo/templates/indigo/lms/templates/fx_templates/fx_header_navbar_links.html @@ -8,7 +8,7 @@
% for h_section in header_sections: