From 40cf76ac0f831a484924cbfcc491956a4d25cb40 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Mon, 22 Oct 2018 13:56:43 -0400 Subject: [PATCH] Fix Algolia search link positioning (#1904) * Add link for testing purposes * Fix excerpt link positioning in Algolia search results * Fix Algolia search input color * Update CHANGELOG and history Fixes #1903 --- CHANGELOG.md | 1 + _sass/minimal-mistakes/_archive.scss | 35 +++++++++++++++------ _sass/minimal-mistakes/_search.scss | 4 +-- _sass/minimal-mistakes/skins/_dark.scss | 4 +++ _sass/minimal-mistakes/skins/_neon.scss | 4 +++ _sass/minimal-mistakes/skins/_plum.scss | 4 +++ docs/_docs/18-history.md | 3 +- test/_posts/2016-02-24-welcome-to-jekyll.md | 2 +- 8 files changed, 44 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1ac603daccd..e3861a356a50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Enhancements +- Fix Algolia search link positioning. [#1904](https://github.com/mmistakes/minimal-mistakes/pull/1904) - Update Lunr to `2.3.3`. [#1885](https://github.com/mmistakes/minimal-mistakes/pull/1885) - Cache "static" includes to improve build performance. **Note:** The theme uses the [jekyll-include-cache](https://github.com/benbalter/jekyll-include-cache) plugin which will need to be installed in your `Gemfile` and added to the `plugins` array of `_config.yml`. Otherwise you'll throw `Unknown tag 'include_cached'` errors at build. [#1874](https://github.com/mmistakes/minimal-mistakes/pull/1874) - Make entire feature and archive items "clickable". [#1864](https://github.com/mmistakes/minimal-mistakes/pull/1864) diff --git a/_sass/minimal-mistakes/_archive.scss b/_sass/minimal-mistakes/_archive.scss index 81f504b2d202..cd42e137efe9 100644 --- a/_sass/minimal-mistakes/_archive.scss +++ b/_sass/minimal-mistakes/_archive.scss @@ -20,15 +20,6 @@ .archive__item { position: relative; - - a::before { - content: ''; - position: absolute; - left: 0; - top: 0; - right: 0; - bottom: 0; - } } .archive__subtitle { @@ -50,6 +41,15 @@ overflow: hidden; text-overflow: ellipsis; + a::before { + content: ''; + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + } + a + a { opacity: 0.5; } @@ -70,6 +70,10 @@ & + p { text-indent: 0; } + + a { + position: relative; + } } .archive__item-teaser { @@ -281,6 +285,10 @@ clear: both; font-size: 1.125em; + .archive__item { + float: left; + } + .archive__item-teaser { margin-bottom: 2em; } @@ -318,6 +326,10 @@ clear: both; font-size: 1.125em; + .archive__item { + float: left; + } + .archive__item-teaser { margin-bottom: 2em; } @@ -357,6 +369,11 @@ clear: both; font-size: 1.125em; + .archive__item { + float: left; + width: 100%; + } + .archive__item-teaser { margin-bottom: 2em; } diff --git a/_sass/minimal-mistakes/_search.scss b/_sass/minimal-mistakes/_search.scss index fe3c4367ea90..fa2790344367 100644 --- a/_sass/minimal-mistakes/_search.scss +++ b/_sass/minimal-mistakes/_search.scss @@ -114,12 +114,12 @@ } .archive__item-title .ais-Highlight { - color: $link-color; + color: $primary-color; font-style: normal; text-decoration: underline; } .archive__item-excerpt .ais-Highlight { - color: $link-color; + color: $primary-color; font-style: normal; font-weight: bold; } diff --git a/_sass/minimal-mistakes/skins/_dark.scss b/_sass/minimal-mistakes/skins/_dark.scss index 4f0a77e0028d..9547a38b44c6 100644 --- a/_sass/minimal-mistakes/skins/_dark.scss +++ b/_sass/minimal-mistakes/skins/_dark.scss @@ -40,3 +40,7 @@ $base0f: #cc6633 !default; .page__footer-follow .social-icons .svg-inline--fa { color: inherit; } + +.ais-search-box .ais-search-box--input { + background-color: $form-background-color; +} \ No newline at end of file diff --git a/_sass/minimal-mistakes/skins/_neon.scss b/_sass/minimal-mistakes/skins/_neon.scss index 5da3688f8183..649cbff28233 100644 --- a/_sass/minimal-mistakes/skins/_neon.scss +++ b/_sass/minimal-mistakes/skins/_neon.scss @@ -51,3 +51,7 @@ $base0f: #cc6633 !default; color: $text-color; } } + +.ais-search-box .ais-search-box--input { + background-color: $form-background-color; +} \ No newline at end of file diff --git a/_sass/minimal-mistakes/skins/_plum.scss b/_sass/minimal-mistakes/skins/_plum.scss index b777a8ea1657..67975d502786 100644 --- a/_sass/minimal-mistakes/skins/_plum.scss +++ b/_sass/minimal-mistakes/skins/_plum.scss @@ -58,3 +58,7 @@ $base0f: #cc6633 !default; color: $text-color; } } + +.ais-search-box .ais-search-box--input { + background-color: $form-background-color; +} \ No newline at end of file diff --git a/docs/_docs/18-history.md b/docs/_docs/18-history.md index 9b8d29867baa..cc8ded7e7ac2 100644 --- a/docs/_docs/18-history.md +++ b/docs/_docs/18-history.md @@ -4,7 +4,7 @@ permalink: /docs/history/ excerpt: "Change log of enhancements and bug fixes made to the theme." sidebar: nav: docs -last_modified_at: 2018-10-09T14:49:28-04:00 +last_modified_at: 2018-10-22T13:55:29-04:00 toc: true --- @@ -12,6 +12,7 @@ toc: true ### Enhancements +- Fix Algolia search link positioning. [#1904](https://github.com/mmistakes/minimal-mistakes/pull/1904) - Update Lunr to `2.3.3`. [#1885](https://github.com/mmistakes/minimal-mistakes/pull/1885) - Cache "static" includes to improve build performance. **Note:** The theme uses the [jekyll-include-cache](https://github.com/benbalter/jekyll-include-cache) plugin which will need to be installed in your `Gemfile` and added to the `plugins` array of `_config.yml`. Otherwise you'll throw `Unknown tag 'include_cached'` errors at build. [#1874] - Make entire feature and archive items "clickable". [#1864](https://github.com/mmistakes/minimal-mistakes/pull/1864) diff --git a/test/_posts/2016-02-24-welcome-to-jekyll.md b/test/_posts/2016-02-24-welcome-to-jekyll.md index 521593642c60..0ed6b2b0b9a7 100644 --- a/test/_posts/2016-02-24-welcome-to-jekyll.md +++ b/test/_posts/2016-02-24-welcome-to-jekyll.md @@ -8,7 +8,7 @@ tags: - update --- -You'll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. +You'll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in [many different ways](https://jekyllrb.com/docs/usage/), but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.