Skip to content

Commit

Permalink
Search: Remove popular tags (AdvisorySG#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
wei2912 authored Apr 10, 2022
1 parent 7d80c11 commit bdff646
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 46 deletions.
1 change: 0 additions & 1 deletion assets/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
@import "site/footer.css";
@import "site/modal.css";
@import "site/search.css";
@import "site/popular.css";
@import "site/burger.css";
@import "blog/feed.css";
@import "blog/featured.css";
Expand Down
25 changes: 0 additions & 25 deletions assets/css/site/popular.css

This file was deleted.

7 changes: 0 additions & 7 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ function search() {
var searchInput = $('.search-input');
var searchButton = $('.search-button');
var searchResult = $('.search-result');
var popular = $('.popular-wrapper');
var includeContent =
typeof gh_search_content == 'undefined' || gh_search_content == true
? true
Expand Down Expand Up @@ -329,12 +328,6 @@ function search() {
} else {
searchButton.removeClass('search-button-clear');
}

if (result.length > 0) {
popular.hide();
} else {
popular.show();
}
});

$('.search-form').on('submit', function (e) {
Expand Down
14 changes: 1 addition & 13 deletions partials/modal.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,11 @@
</svg>
</button>
</div>
{{#get "tags" limit="5" include="count.posts" order="count.posts desc"}}
{{#if tags}}
<div class="popular-wrapper">
<h4 class="popular-title">Popular tags</h4>
<div class="popular-feed">
{{#foreach tags}}
<a class="popular" href="{{url}}">{{name}}</a>
{{/foreach}}
</div>
</div>
{{/if}}
{{/get}}
<div class="search-result"></div>
</div>
<button class="button-icon modal-close" aria-label="Close">
<svg class="icon icon-close">
<use xlink:href="#window-close"></use>
</svg>
</button>
</div>
</div>

0 comments on commit bdff646

Please sign in to comment.