From 9a0a9eced626e316dd43a6c4b0da3fb0b5c15d50 Mon Sep 17 00:00:00 2001 From: Ahmed Khalid <106074266+ahmed-arb@users.noreply.github.com> Date: Tue, 23 May 2023 13:11:40 +0500 Subject: [PATCH] feat: add study next feature --- .../lms/static/sass/features/_catalog.scss | 21 ++++ .../sass/partials/lms/theme/_extras.scss | 1 + .../sass/partials/lms/theme/_variables.scss | 8 ++ .../lms/templates/courseware/courses.html | 98 +++++++++++++++++++ 4 files changed, 128 insertions(+) create mode 100644 edx-platform/wikilearn/lms/static/sass/features/_catalog.scss create mode 100644 edx-platform/wikilearn/lms/templates/courseware/courses.html diff --git a/edx-platform/wikilearn/lms/static/sass/features/_catalog.scss b/edx-platform/wikilearn/lms/static/sass/features/_catalog.scss new file mode 100644 index 0000000..bb82900 --- /dev/null +++ b/edx-platform/wikilearn/lms/static/sass/features/_catalog.scss @@ -0,0 +1,21 @@ +.prerequisits-button { + @extend %ui-depth2; + @extend %t-icon3; + @extend %t-strong; + + border: 2px solid $m-blue-d6; + border-radius: ($baseline*0.1); + padding: 0 ($baseline*0.7); + background: $blue; + box-shadow: none; + color: $white; + text-shadow: none; + float: right; + margin-bottom: 1rem; + + //STATE: hover, focus + &:hover, + &:focus { + background: $theme-blue; + } + } diff --git a/edx-platform/wikilearn/lms/static/sass/partials/lms/theme/_extras.scss b/edx-platform/wikilearn/lms/static/sass/partials/lms/theme/_extras.scss index ef6e49a..813c8d3 100644 --- a/edx-platform/wikilearn/lms/static/sass/partials/lms/theme/_extras.scss +++ b/edx-platform/wikilearn/lms/static/sass/partials/lms/theme/_extras.scss @@ -19,3 +19,4 @@ @import '../../../components/header'; @import '../../../components/footer'; @import '../../../components/course'; +@import '../../../features/catalog'; diff --git a/edx-platform/wikilearn/lms/static/sass/partials/lms/theme/_variables.scss b/edx-platform/wikilearn/lms/static/sass/partials/lms/theme/_variables.scss index 9511c43..16747db 100644 --- a/edx-platform/wikilearn/lms/static/sass/partials/lms/theme/_variables.scss +++ b/edx-platform/wikilearn/lms/static/sass/partials/lms/theme/_variables.scss @@ -7,6 +7,7 @@ $header-logo-width: 60px !default; $header-logo-height: 36px; $header-user-image-size: 40px !default; +$baseline: 20px !default; // ---------------------------- // #COLORS @@ -16,6 +17,10 @@ $cornflower-blue: #447ff5; $butterfly-bush: #6b4ba1; $base-font-color: #000; $footer-bg: #f6f6f6; +$m-blue-d6: #256a97 !default; +$blue: rgb(0, 159, 230) !default; +$white: rgb(255, 255, 255) !default; +$m-blue-d5: rgb(0, 158, 231) !default; $primary: $theme-blue; $action-primary-bg: $theme-blue; @@ -23,6 +28,9 @@ $link-color: $theme-blue; $link-hover: $cornflower-blue; $link-visited: $butterfly-bush; +// Course Discover +$course-card-height: ($baseline*18) !default; + $font-family-sans-serif: "Helvetica Neue", Helvetica, "Open Sans", Arial, sans-serif; diff --git a/edx-platform/wikilearn/lms/templates/courseware/courses.html b/edx-platform/wikilearn/lms/templates/courseware/courses.html new file mode 100644 index 0000000..b13f749 --- /dev/null +++ b/edx-platform/wikilearn/lms/templates/courseware/courses.html @@ -0,0 +1,98 @@ +<%page expression_filter="h"/> +<%! + import json + from django.utils.translation import ugettext as _ + from django.urls import reverse + + from openedx.core.djangolib.js_utils import js_escaped_string, dump_js_escaped_json +%> +<%inherit file="../main.html" /> +<% + course_discovery_enabled = settings.FEATURES.get('ENABLE_COURSE_DISCOVERY') +%> + +<%namespace name='static' file='../static_content.html'/> + +% if course_discovery_enabled: +<%block name="header_extras"> + % for template_name in ["course_card", "filter_bar", "filter", "facet", "facet_option"]: + + % endfor + <%static:require_module module_name="js/discovery/discovery_factory" class_name="DiscoveryFactory"> + DiscoveryFactory( + ${course_discovery_meanings | n, dump_js_escaped_json}, + getParameterByName('search_query'), + "${user_language | n, js_escaped_string}", + "${user_timezone | n, js_escaped_string}" + ); + + + +% endif + +<%block name="pagetitle">${_("Courses")} + +
+
+
+ %if follow_up_courses: + + % endif + % if course_discovery_enabled: + + + + % endif + +
+
    + %for course in courses: +
  • + <%include file="../course.html" args="course=course" /> +
  • + %endfor +
+
+ + + + + % if course_discovery_enabled: + + % endif + +
+
+