From 8f2b300c8d84133132673a4fb1b6f5b7f2b715c4 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 17 Feb 2020 10:49:46 +0100 Subject: [PATCH 1/3] Add a home page template using the latest posts block to 2019 --- .../block-templates/index.html | 4 ++- .../block-templates/singular.html | 11 +++++++ twentynineteen-blocks/style.css | 29 +++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 twentynineteen-blocks/block-templates/singular.html diff --git a/twentynineteen-blocks/block-templates/index.html b/twentynineteen-blocks/block-templates/index.html index 878da927..b46760c0 100644 --- a/twentynineteen-blocks/block-templates/index.html +++ b/twentynineteen-blocks/block-templates/index.html @@ -3,7 +3,9 @@ -
+
+ +
diff --git a/twentynineteen-blocks/block-templates/singular.html b/twentynineteen-blocks/block-templates/singular.html new file mode 100644 index 00000000..878da927 --- /dev/null +++ b/twentynineteen-blocks/block-templates/singular.html @@ -0,0 +1,11 @@ + + + + + +
+ + + + + \ No newline at end of file diff --git a/twentynineteen-blocks/style.css b/twentynineteen-blocks/style.css index 03ffd1ff..69368273 100644 --- a/twentynineteen-blocks/style.css +++ b/twentynineteen-blocks/style.css @@ -99,6 +99,14 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me /* Post title positioning */ +@media only screen and (min-width: 768px) { + .wp-site-blocks .site-content > .wp-block-group__inner-container > *:not(.align-full):not(.align-wide) { + max-width: 80%; + margin: 0 10%; + padding: 0 60px; + } +} + .wp-site-blocks .site-content > .wp-block-group__inner-container > h1:first-child { max-width: calc(100% - (2 * 1rem)); margin: 0 1rem; @@ -112,6 +120,27 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me } } +/* Latest posts block */ +.wp-block-latest-posts li > a { + font-size: 2.25em; + font-weight: 700; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; + color: #111; +} + +.wp-block-latest-posts.wp-block-latest-posts__list li > a::before { + background: #767676; + content: "\020"; + display: block; + height: 2px; + margin: 1rem 0; + width: 1em; +} + +.wp-block-latest-posts.wp-block-latest-posts__list li:not(:first-child) { + margin-top: calc(6 * 1rem); +} + /* Site navigation styles */ .wp-block-navigation { From eb0b649fd81d20ac7293ef4e20bcdbaecbd8334f Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Mon, 17 Feb 2020 15:12:27 -0500 Subject: [PATCH 2/3] Consolidate positioning rules for direct children of site-content. --- twentynineteen-blocks/style.css | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/twentynineteen-blocks/style.css b/twentynineteen-blocks/style.css index 69368273..b8968a42 100644 --- a/twentynineteen-blocks/style.css +++ b/twentynineteen-blocks/style.css @@ -97,27 +97,19 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me } } -/* Post title positioning */ +/* Site content positioning */ -@media only screen and (min-width: 768px) { - .wp-site-blocks .site-content > .wp-block-group__inner-container > *:not(.align-full):not(.align-wide) { - max-width: 80%; - margin: 0 10%; - padding: 0 60px; - } -} - -.wp-site-blocks .site-content > .wp-block-group__inner-container > h1:first-child { +.wp-site-blocks .site-content > .wp-block-group__inner-container > *:not(.align-full):not(.align-wide) { max-width: calc(100% - (2 * 1rem)); margin: 0 1rem; } @media only screen and (min-width: 768px) { - .wp-site-blocks .site-content > .wp-block-group__inner-container > h1:first-child { - max-width: 80%; - margin: 0 10%; - padding: 0 60px; - } + .wp-site-blocks .site-content > .wp-block-group__inner-container > *:not(.align-full):not(.align-wide) { + max-width: 80%; + margin: 0 10%; + padding: 0 60px; + } } /* Latest posts block */ From f4da15b19cf5cfef508fb970b4d62d0dc981cf08 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Mon, 17 Feb 2020 15:49:24 -0500 Subject: [PATCH 3/3] Latest Post block cleanup. --- twentynineteen-blocks/style.css | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/twentynineteen-blocks/style.css b/twentynineteen-blocks/style.css index b8968a42..b8ad5fa5 100644 --- a/twentynineteen-blocks/style.css +++ b/twentynineteen-blocks/style.css @@ -113,11 +113,17 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me } /* Latest posts block */ + +.wp-block-latest-posts { + padding-left: 0; +} + .wp-block-latest-posts li > a { font-size: 2.25em; font-weight: 700; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; color: #111; + line-height: 1.2; } .wp-block-latest-posts.wp-block-latest-posts__list li > a::before { @@ -133,6 +139,19 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me margin-top: calc(6 * 1rem); } +.wp-block-latest-posts .wp-block-latest-posts__post-date { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; + font-size: 0.71111em; + margin-top: 0.71111em; + margin-bottom: 1.5em; +} + +@media only screen and (min-width: 768px) { + .wp-block-latest-posts__post-excerpt { + max-width: calc(6 * (100vw / 12) - 28px); + } +} + /* Site navigation styles */ .wp-block-navigation {