From c8f4820d31c6b4c605ec96f74213df007c74c7cd 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 c1ac603d..e3861a35 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 81f504b2..cd42e137 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 fe3c4367..fa279034 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 4f0a77e0..9547a38b 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 5da3688f..649cbff2 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 b777a8ea..67975d50 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 9b8d2986..cc8ded7e 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 52159364..0ed6b2b0 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.