Skip to content

Commit

Permalink
Merge pull request #103 from wikimedia/ahmed-arb/search-languages
Browse files Browse the repository at this point in the history
Add: search input elem in facets
  • Loading branch information
ahmed-arb authored May 26, 2023
2 parents 66be197 + 68fe15b commit 4abe166
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.facet-header-container{
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
border-top: 1px solid $gray-l4;

.lng-srch-facet-input {
margin: ($baseline/4) !important;
}
}

.facet-list{
ul{
max-height: ($baseline*1.5)*5;
overflow: hidden;
overflow-y:scroll;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
@import '../../../components/footer';
@import '../../../components/course';
@import '../../../features/catalog';
@import "../../../components/refine-sidebar"
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ $theme-blue: #36c;
$cornflower-blue: #447ff5;
$butterfly-bush: #6b4ba1;
$base-font-color: #000;
$gray: rgb(127,127,127);
$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;
$gray-l4: tint($gray,80%);
$primary: $theme-blue;
$action-primary-bg: $theme-blue;

Expand Down
23 changes: 23 additions & 0 deletions edx-platform/wikilearn/lms/templates/discovery/facet.underscore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<div class=".facet-container">
<div class="facet-header-container">
<h3 class="header-facet">
<%- displayName %>
</h3>
<% if (listIsHuge) { %>
<input type="text" id="lng-srch-facet-input", class="lng-srch-facet-input" placeholder="Search..." />
<% } %>
</div>
<ul data-facet="<%- name %>" class="facet-list collapse">
<%= HtmlUtils.ensureHtml(optionsHtml) %>
</ul>
</div>
<% if (listIsHuge) { %>
<div class="toggle ">
<button class="show-more discovery-button">
<%- gettext("More") %>
</button>
<button class="show-less hidden discovery-button">
<%- gettext("Less") %>
</button>
</div>
<% } %>

0 comments on commit 4abe166

Please sign in to comment.