Skip to content

Commit

Permalink
fix(isSubCategoryHeader): ensure we hide the content of the left colu…
Browse files Browse the repository at this point in the history
…mn if this flag is not set

Fix #47
  • Loading branch information
redox committed Dec 23, 2015
1 parent 1ba090f commit 0e04ce4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ let templates = {
suggestion: `
<div class="${suggestionPrefix}
{{#isCategoryHeader}}${suggestionPrefix}__main{{/isCategoryHeader}}
{{#isSubcategoryHeader}}${suggestionPrefix}__secondary{{/isSubcategoryHeader}}
{{#isSubCategoryHeader}}${suggestionPrefix}__secondary{{/isSubCategoryHeader}}
">
<div class="${suggestionPrefix}--category-header">{{{category}}}</div>
<div class="${suggestionPrefix}--wrapper">
<div class="${suggestionPrefix}--subcategory-column">{{{subcategory}}}</div>
<div class="${suggestionPrefix}--subcategory-column"><span class="${suggestionPrefix}--subcategory-column-text">{{{subcategory}}}</span></div>
<div class="${suggestionPrefix}--content">
<div class="${suggestionPrefix}--subcategory-inline">{{{subcategory}}}</div>
<div class="${suggestionPrefix}--title">{{{title}}}</div>
Expand Down
8 changes: 8 additions & 0 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@
max-width: 135px; // Hardcoded
min-width: 135px; // Hardcoded
}

.algolia-docsearch-suggestion--subcategory-column-text {
display: none;

.algolia-docsearch-suggestion__secondary & {
display: block;
}
}
.algolia-docsearch-suggestion--content {
display: table-cell;
padding: 5px 10px;
Expand Down

0 comments on commit 0e04ce4

Please sign in to comment.