From ede54dbf35cba7984c078e57a5537f6e5589861a Mon Sep 17 00:00:00 2001 From: Adriana Leites <45805842+adrianaleites@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:23:21 +0100 Subject: [PATCH 1/3] Poetry: add header small pattern - Add spacing sizes to the theme.json as in Twenty Twenty-Four theme. - Replace spacing with pixels values with spacing presets in header pattern. - Convert "Food for thoughts" to Heading 1, instead of Paragraph. - Convert "A collection of valuable thoughts by a very egocentric person." to Site Tagline block, instead of Paragraph. - Add header small pattern (note: added custom style in theme.json to define the align-items as baseline). - Replace header in 404, search and archive templates to use instead header small. --- poetry/parts/header-small.html | 1 + poetry/patterns/header-small.php | 31 +++++++++++++++++++ poetry/patterns/header.php | 26 ++++++++-------- poetry/templates/404.html | 2 +- poetry/templates/archive.html | 2 +- poetry/templates/search.html | 2 +- poetry/theme.json | 53 +++++++++++++++++++++++++++----- 7 files changed, 92 insertions(+), 25 deletions(-) create mode 100644 poetry/parts/header-small.html create mode 100644 poetry/patterns/header-small.php diff --git a/poetry/parts/header-small.html b/poetry/parts/header-small.html new file mode 100644 index 00000000..ac84109e --- /dev/null +++ b/poetry/parts/header-small.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/poetry/patterns/header-small.php b/poetry/patterns/header-small.php new file mode 100644 index 00000000..b14aeef4 --- /dev/null +++ b/poetry/patterns/header-small.php @@ -0,0 +1,31 @@ + + +
+
+ + +
+
+

Food for thoughts

+ + +
+ + + +
+
+
+
+ + + + + diff --git a/poetry/patterns/header.php b/poetry/patterns/header.php index 98a85524..2f990569 100644 --- a/poetry/patterns/header.php +++ b/poetry/patterns/header.php @@ -6,19 +6,17 @@ * Inserter: no */ ?> - -
-
-
+ +
+
+
- -
-

Food
for thoughts

- + +
+

Food
for thoughts

+ - -

A collection of valuable thoughts by a very egocentric person.

-
+
@@ -28,6 +26,6 @@
- - - \ No newline at end of file + + + diff --git a/poetry/templates/404.html b/poetry/templates/404.html index 16c366f1..a2728b7c 100644 --- a/poetry/templates/404.html +++ b/poetry/templates/404.html @@ -1,4 +1,4 @@ - +
diff --git a/poetry/templates/archive.html b/poetry/templates/archive.html index e0f5e239..65ea3f98 100644 --- a/poetry/templates/archive.html +++ b/poetry/templates/archive.html @@ -1,4 +1,4 @@ - +
diff --git a/poetry/templates/search.html b/poetry/templates/search.html index 1e25efa2..6b659b5f 100644 --- a/poetry/templates/search.html +++ b/poetry/templates/search.html @@ -1,4 +1,4 @@ - +
diff --git a/poetry/theme.json b/poetry/theme.json index 40e4c1b8..c2fe7e75 100644 --- a/poetry/theme.json +++ b/poetry/theme.json @@ -30,14 +30,42 @@ "wideSize": "1200px" }, "spacing": { - "units": [ - "%", - "px", - "em", - "rem", - "vh", - "vw" - ] + "spacingScale": { + "steps": 0 + }, + "spacingSizes": [ + { + "name": "1", + "size": "1rem", + "slug": "10" + }, + { + "name": "2", + "size": "min(1.5rem, 2vw)", + "slug": "20" + }, + { + "name": "3", + "size": "min(2.5rem, 3vw)", + "slug": "30" + }, + { + "name": "4", + "size": "min(4rem, 5vw)", + "slug": "40" + }, + { + "name": "5", + "size": "min(6.5rem, 8vw)", + "slug": "50" + }, + { + "name": "6", + "size": "min(10.5rem, 13vw)", + "slug": "60" + } + ], + "units": ["%", "px", "em", "rem", "vh", "vw"] }, "typography": { "fontFamilies": [ @@ -121,6 +149,11 @@ } }, "styles": { + "blocks": { + "core/group": { + "css": ".header-small__container {align-items: baseline !important;}" + } + }, "color": { "background": "var(--wp--preset--color--custom-background)" }, @@ -167,6 +200,10 @@ "area": "header", "name": "header" }, + { + "area": "header", + "name": "header-small" + }, { "area": "footer", "name": "footer" From d351f15513ed7901363754e7923c7be938ab333f Mon Sep 17 00:00:00 2001 From: Maggie Cabrera Date: Sun, 10 Nov 2024 10:56:01 +0100 Subject: [PATCH 2/3] removed custom class --- poetry/patterns/header-small.php | 4 ++-- poetry/theme.json | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/poetry/patterns/header-small.php b/poetry/patterns/header-small.php index b14aeef4..170a3b51 100644 --- a/poetry/patterns/header-small.php +++ b/poetry/patterns/header-small.php @@ -7,8 +7,8 @@ */ ?> -
-
+
+
diff --git a/poetry/theme.json b/poetry/theme.json index c2fe7e75..bc47a4be 100644 --- a/poetry/theme.json +++ b/poetry/theme.json @@ -149,11 +149,6 @@ } }, "styles": { - "blocks": { - "core/group": { - "css": ".header-small__container {align-items: baseline !important;}" - } - }, "color": { "background": "var(--wp--preset--color--custom-background)" }, From 27c81fade783a8dbda076819d73f13963f63e5ea Mon Sep 17 00:00:00 2001 From: Maggie Cabrera Date: Sun, 10 Nov 2024 10:57:34 +0100 Subject: [PATCH 3/3] escaped string --- poetry/patterns/header-small.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poetry/patterns/header-small.php b/poetry/patterns/header-small.php index 170a3b51..1697e503 100644 --- a/poetry/patterns/header-small.php +++ b/poetry/patterns/header-small.php @@ -13,7 +13,7 @@
-

Food for thoughts

+