From 8bdc0d0a56b8f0fe9910b905fc59b5411f7ae8f8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 3 Apr 2020 11:05:36 -0700 Subject: [PATCH 1/4] Replace gradient background image with embedded SVG --- public/css/lanyon.css | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/public/css/lanyon.css b/public/css/lanyon.css index 1d57108e617..b0b42b81b17 100644 --- a/public/css/lanyon.css +++ b/public/css/lanyon.css @@ -214,7 +214,8 @@ a.sidebar-nav-item:focus { position: absolute; top: .8rem; left: 1rem; - display: block; + display: flex; + align-items: center; padding: .25rem .75rem; color: #505050; background-color: #fff; @@ -222,15 +223,12 @@ a.sidebar-nav-item:focus { cursor: pointer; } -.sidebar-toggle:before { +.sidebar-toggle::before { display: inline-block; - width: 1rem; - height: .75rem; + width: 32px; + height: 32px; content: ""; - background-image: -webkit-linear-gradient(to bottom, #555, #555 20%, #fff 20%, #fff 40%, #555 40%, #555 60%, #fff 60%, #fff 80%, #555 80%, #555 100%); - background-image: -moz-linear-gradient(to bottom, #555, #555 20%, #fff 20%, #fff 40%, #555 40%, #555 60%, #fff 60%, #fff 80%, #555 80%, #555 100%); - background-image: -ms-linear-gradient(to bottom, #555, #555 20%, #fff 20%, #fff 40%, #555 40%, #555 60%, #fff 60%, #fff 80%, #555 80%, #555 100%); - background-image: linear-gradient(to bottom, #555, #555 20%, #fff 20%, #fff 40%, #555 40%, #555 60%, #fff 60%, #fff 80%, #555 80%, #555 100%); + background: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%23555' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M2.5 11.5A.5.5 0 013 11h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5zm0-4A.5.5 0 013 7h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5zm0-4A.5.5 0 013 3h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat; } .sidebar-toggle:active, @@ -241,12 +239,9 @@ a.sidebar-nav-item:focus { } .sidebar-toggle:active:before, -#sidebar-checkbox:focus ~ .sidebar-toggle:before, -#sidebar-checkbox:checked ~ .sidebar-toggle:before { - background-image: -webkit-linear-gradient(to bottom, #fff, #fff 20%, #555 20%, #555 40%, #fff 40%, #fff 60%, #555 60%, #555 80%, #fff 80%, #fff 100%); - background-image: -moz-linear-gradient(to bottom, #fff, #fff 20%, #555 20%, #555 40%, #fff 40%, #fff 60%, #555 60%, #555 80%, #fff 80%, #fff 100%); - background-image: -ms-linear-gradient(to bottom, #fff, #fff 20%, #555 20%, #555 40%, #fff 40%, #fff 60%, #555 60%, #555 80%, #fff 80%, #fff 100%); - background-image: linear-gradient(to bottom, #fff, #fff 20%, #555 20%, #555 40%, #fff 40%, #fff 60%, #555 60%, #555 80%, #fff 80%, #fff 100%); +#sidebar-checkbox:focus ~ .sidebar-toggle::before, +#sidebar-checkbox:checked ~ .sidebar-toggle::before { + background: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M2.5 11.5A.5.5 0 013 11h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5zm0-4A.5.5 0 013 7h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5zm0-4A.5.5 0 013 3h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat; } @media (min-width: 30.1em) { From b9b13c7d898ed001e1b76ee59bcae83f6d90d234 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 3 Apr 2020 11:14:15 -0700 Subject: [PATCH 2/4] Add size check for related posts Fixes #76 --- _layouts/post.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_layouts/post.html b/_layouts/post.html index c027477605b..c4bc2533557 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -8,8 +8,9 @@

{{ page.title }}

{{ content }} +{% if site.related_posts.size >= 1 %} +{% endif %} From fdb69d54e874dbbcc5c96f5322824ff02f1c1e14 Mon Sep 17 00:00:00 2001 From: Ahmed Sharif Khan <65096534+ahmedsharifkhan@users.noreply.github.com> Date: Sun, 29 Nov 2020 00:53:49 +0600 Subject: [PATCH 3/4] Update _config.yml --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 45bc1ac8463..6c96327c940 100644 --- a/_config.yml +++ b/_config.yml @@ -3,7 +3,7 @@ title: Lanyon tagline: 'A Jekyll theme' description: 'A reserved Jekyll theme that places the utmost gravity on content with a hidden drawer. Made by @mdo.' url: http://lanyon.getpoole.com -baseurl: '' +baseurl: '/lanyon' paginate: 5 permalink: pretty From a87fc04652ba1a83dbfd041bfd0079b612b92d3a Mon Sep 17 00:00:00 2001 From: Ahmed Sharif Khan <65096534+ahmedsharifkhan@users.noreply.github.com> Date: Sun, 29 Nov 2020 00:55:26 +0600 Subject: [PATCH 4/4] Update _config.yml --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 6c96327c940..45bc1ac8463 100644 --- a/_config.yml +++ b/_config.yml @@ -3,7 +3,7 @@ title: Lanyon tagline: 'A Jekyll theme' description: 'A reserved Jekyll theme that places the utmost gravity on content with a hidden drawer. Made by @mdo.' url: http://lanyon.getpoole.com -baseurl: '/lanyon' +baseurl: '' paginate: 5 permalink: pretty