-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from wikimedia/ahmed-arb/study-next-feature
Add study next button and styling
- Loading branch information
Showing
4 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
edx-platform/wikilearn/lms/static/sass/features/_catalog.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
edx-platform/wikilearn/lms/templates/courseware/courses.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"]: | ||
<script type="text/template" id="${template_name}-tpl"> | ||
<%static:include path="discovery/${template_name}.underscore" /> | ||
</script> | ||
% 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}" | ||
); | ||
</%static:require_module> | ||
<script src="${static.url('js/courses.js')}"></script> | ||
</%block> | ||
% endif | ||
|
||
<%block name="pagetitle">${_("Courses")}</%block> | ||
|
||
<main id="main" aria-label="Content" tabindex="-1"> | ||
<section class="find-courses"> | ||
<section class="courses-container"> | ||
%if follow_up_courses: | ||
<button onclick="prerequisitsHandler()" class="button postfix prerequisits-button" id="study-next-btn"> | ||
What to study next? | ||
</button> | ||
% endif | ||
% if course_discovery_enabled: | ||
<div id="discovery-form" role="search" aria-label="course" class="wrapper-search-context all-courses"> | ||
<div id="discovery-message" class="search-status-label"></div> | ||
<form class="wrapper-search-input"> | ||
<label for="discovery-input" class="sr">${_('Search for a course')}</label> | ||
<input id="discovery-input" class="discovery-input" placeholder="${_('Search for a course')}" type="text"/> | ||
<button type="submit" class="button postfix discovery-submit" title="${_('Search')}"> | ||
<span class="icon fa fa-search" aria-hidden="true"></span> | ||
<div aria-live="polite" aria-relevant="all"> | ||
<div id="loading-indicator" class="loading-spinner hidden"> | ||
<span class="icon fa fa-spinner fa-spin" aria-hidden="true"></span> | ||
<span class="sr">${_('Loading')}</span> | ||
</div> | ||
</div> | ||
</button> | ||
</form> | ||
</div> | ||
|
||
<div id="filter-bar" class="filters hide-phone is-collapsed"> | ||
</div> | ||
% endif | ||
|
||
<div class="courses${'' if course_discovery_enabled else ' no-course-discovery'} all-courses" role="region" aria-label="${_('List of Courses')}"> | ||
<ul class="courses-listing courses-list"> | ||
%for course in courses: | ||
<li class="courses-listing-item"> | ||
<%include file="../course.html" args="course=course" /> | ||
</li> | ||
%endfor | ||
</ul> | ||
</div> | ||
|
||
<div class="courses no-course-discovery follow-up-courses hidden" role="region" aria-label="${_('List of Courses')}"> | ||
<ul class="courses-listing courses-list"> | ||
%for course in follow_up_courses: | ||
<li class="courses-listing-item"> | ||
<%include file="../course.html" args="course=course" /> | ||
</li> | ||
%endfor | ||
</ul> | ||
</div> | ||
|
||
|
||
% if course_discovery_enabled: | ||
<aside aria-label="${_('Refine Your Search')}" class="search-facets phone-menu all-courses"> | ||
<h2 class="header-search-facets">${_('Refine Your Search')}</h2> | ||
<section class="search-facets-lists"> | ||
</section> | ||
</aside> | ||
% endif | ||
|
||
</section> | ||
</section> | ||
</main> |