Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-introduce scrolling search results. #83

Merged
merged 5 commits into from
Jun 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## vNEXT

* Re-introduce the scrolling ability within search results.
[PR #83](https://github.com/meteor/meteor-theme-hexo/pull/83)

## v1.0.15

* Update Prism version to 1.15.0.
Expand Down
8 changes: 5 additions & 3 deletions layout/partials/sidebar.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@

<% if (config.apis && config.apis.docsearch) { %>
<div class="wrapper-search">
<div class="input-symbol small round">
<input type="text" placeholder="Search <%- config.subtitle %>" id="desktop-search-input" />
<span class="icon-search"></span>
<div class="input-area">
<div class="input-symbol small round">
<input type="text" placeholder="Search <%- config.subtitle %>" id="desktop-search-input" />
<span class="icon-search"></span>
</div>
</div>
<div class="wrapper-desktop-search-results"></div>
</div>
Expand Down
10 changes: 6 additions & 4 deletions source/style/_global/docsearch.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
}

// Main autocomplete wrapper
.wrapper-desktop-search-results .aa-dropdown-menu {
.wrapper-desktop-search-results .ds-dropdown-menu {
//reset algolia js styling
top: 0.75rem !important;
bottom: auto !important;
left: 0 !important;
right: 0 !important;
background: @color-lighter;
margin-right: 2rem;
}

.wrapper-mobile-search-results .aa-dropdown-menu {
.wrapper-mobile-search-results .ds-dropdown-menu {
//reset algolia js styling
bottom: auto !important;
left: 0 !important;
Expand Down Expand Up @@ -147,6 +148,7 @@
.font-s1;
color: @color-medium;
padding-top: 1rem;
.std-xpadding;

.algolia-docsearch-footer--logo {
display: inline-block !important;
Expand All @@ -166,11 +168,11 @@
&.charcoal {
@color-highlight-header-background: fade(@color-dark, 95%);

.wrapper-desktop-search-results .aa-dropdown-menu {
.wrapper-desktop-search-results .ds-dropdown-menu {
background: transparent;
}

.wrapper-mobile-search-results .aa-dropdown-menu {
.wrapper-mobile-search-results .ds-dropdown-menu {
background: transparent;
}

Expand Down
1 change: 1 addition & 0 deletions source/style/_theme/layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ body {
height: 100%;
max-height: 100vh;
.scrollbars(6px, rgba(0,0,0,0.07), rgba(0,0,0,0.05));
overflow-y: auto;
opacity: 1;
}

Expand Down
15 changes: 10 additions & 5 deletions source/style/_theme/sidebar.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@

.wrapper-search {
display: block;

.std-xpadding;
margin-bottom: .75rem;

.input-symbol {
width: 100%;
.input-area {

.std-xpadding;

input { box-shadow: @color-light 0 0 0 1px inset; }
.input-symbol {
width: 100%;

input {
box-shadow: @color-light 0 0 0 1px inset;
}
}
}
}

Expand Down