From c293df5b0029cd617b0009f7f81d2f66ea2f505d Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Tue, 2 Oct 2018 10:55:49 -0400 Subject: [PATCH 1/4] Make entire feature item "clickable" Use a pseudo element on the call to action button to cover the entire feature item and make it "clickable". --- _sass/minimal-mistakes/_archive.scss | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/_sass/minimal-mistakes/_archive.scss b/_sass/minimal-mistakes/_archive.scss index ae1ff4ab0ca6..eb377b09b960 100644 --- a/_sass/minimal-mistakes/_archive.scss +++ b/_sass/minimal-mistakes/_archive.scss @@ -215,6 +215,7 @@ } .feature__item { + position: relative; margin-bottom: 2em; font-size: 1.125em; @@ -249,7 +250,17 @@ padding-right: gutter(1 of 12); } + a.btn::before { + content: ''; + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + } + &--left { + position: relative; float: left; margin-left: 0; margin-right: 0; @@ -261,6 +272,15 @@ margin-bottom: 2em; } + a.btn::before { + content: ''; + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + } + @include breakpoint($small) { .archive__item-teaser { float: left; @@ -277,6 +297,7 @@ } &--right { + position: relative; float: left; margin-left: 0; margin-right: 0; @@ -288,6 +309,15 @@ margin-bottom: 2em; } + a.btn::before { + content: ''; + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + } + @include breakpoint($small) { text-align: right; @@ -306,6 +336,7 @@ } &--center { + position: relative; float: left; margin-left: 0; margin-right: 0; @@ -317,6 +348,15 @@ margin-bottom: 2em; } + a.btn::before { + content: ''; + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + } + @include breakpoint($small) { text-align: center; From ffc6eca98978ed026167c0a416377af6ad13a71e Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Tue, 2 Oct 2018 10:59:11 -0400 Subject: [PATCH 2/4] Make entire archive item "clickable" Use a pseudo element on the `` element to cover the entire archive item and make it "clickable". --- _sass/minimal-mistakes/_archive.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/_sass/minimal-mistakes/_archive.scss b/_sass/minimal-mistakes/_archive.scss index eb377b09b960..81f504b2d202 100644 --- a/_sass/minimal-mistakes/_archive.scss +++ b/_sass/minimal-mistakes/_archive.scss @@ -18,6 +18,19 @@ } } +.archive__item { + position: relative; + + a::before { + content: ''; + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + } +} + .archive__subtitle { margin: 1.414em 0 0; padding-bottom: 0.5em; From 1c1e244cb4c5436ac86f1dfaff47bf646f8609e6 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Tue, 2 Oct 2018 11:00:14 -0400 Subject: [PATCH 3/4] Update CHANGELOG and history --- CHANGELOG.md | 1 + docs/_docs/18-history.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6c6962e6158..356e238f13ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Enhancements +- Make entire feature and archive items "clickable". - Allow custom Staticman endpoints. [#1842](https://github.com/mmistakes/minimal-mistakes/issues/1842) - Remove `type="text/css"` from Algolia script includes. [#1836](https://github.com/mmistakes/minimal-mistakes/pull/1836) - Remove unneeded `HandheldFriendly` and `MobileOptimized` meta tags. [#1837](https://github.com/mmistakes/minimal-mistakes/pull/1837) diff --git a/docs/_docs/18-history.md b/docs/_docs/18-history.md index b0948bc63971..d7936621b929 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-09-16T18:19:55-04:00 +last_modified_at: 2018-10-02T11:00:03-04:00 toc: true --- @@ -12,6 +12,7 @@ toc: true ### Enhancements +- Make entire feature and archive items "clickable". - Allow custom Staticman endpoints. [#1842](https://github.com/mmistakes/minimal-mistakes/issues/1842) - Remove `type="text/css"` from Algolia script includes. [#1836](https://github.com/mmistakes/minimal-mistakes/pull/1836) - Remove unneeded `HandheldFriendly` and `MobileOptimized` meta tags. [#1837](https://github.com/mmistakes/minimal-mistakes/pull/1837) From 5cf5566ce4eb3675c94008af5eb6ab615a612903 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Tue, 2 Oct 2018 11:04:05 -0400 Subject: [PATCH 4/4] Reference issue --- CHANGELOG.md | 2 +- docs/_docs/18-history.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 356e238f13ba..bfdb4a600b92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ### Enhancements -- Make entire feature and archive items "clickable". +- Make entire feature and archive items "clickable". [#1864](https://github.com/mmistakes/minimal-mistakes/pull/1864) - Allow custom Staticman endpoints. [#1842](https://github.com/mmistakes/minimal-mistakes/issues/1842) - Remove `type="text/css"` from Algolia script includes. [#1836](https://github.com/mmistakes/minimal-mistakes/pull/1836) - Remove unneeded `HandheldFriendly` and `MobileOptimized` meta tags. [#1837](https://github.com/mmistakes/minimal-mistakes/pull/1837) diff --git a/docs/_docs/18-history.md b/docs/_docs/18-history.md index d7936621b929..25783c94e82f 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-02T11:00:03-04:00 +last_modified_at: 2018-10-02T11:03:51-04:00 toc: true --- @@ -12,7 +12,7 @@ toc: true ### Enhancements -- Make entire feature and archive items "clickable". +- Make entire feature and archive items "clickable". [#1864](https://github.com/mmistakes/minimal-mistakes/pull/1864) - Allow custom Staticman endpoints. [#1842](https://github.com/mmistakes/minimal-mistakes/issues/1842) - Remove `type="text/css"` from Algolia script includes. [#1836](https://github.com/mmistakes/minimal-mistakes/pull/1836) - Remove unneeded `HandheldFriendly` and `MobileOptimized` meta tags. [#1837](https://github.com/mmistakes/minimal-mistakes/pull/1837)