From 24bbe1d6c9b9382ff739630cb72815ea2542005c Mon Sep 17 00:00:00 2001 From: James Hunt <10615884+thetwopct@users.noreply.github.com> Date: Sun, 16 Jun 2024 23:38:57 +0700 Subject: [PATCH] Changes to PJR to accomodate End User reports, new quote styling Signed-off-by: James Hunt <10615884+thetwopct@users.noreply.github.com> --- .../acf-json/group_646840fbbe94f.json | 20 ++- .../acf-json/group_666f072665825.json | 128 ++++++++++++++++++ .../blocks/quote-with-image/block.json | 45 ++++++ .../blocks/quote-with-image/editor.css | 1 + .../blocks/quote-with-image/editor.scss | 21 +++ .../quote-with-image/quote-with-image.css | 1 + .../quote-with-image/quote-with-image.php | 95 +++++++++++++ .../quote-with-image/quote-with-image.scss | 44 ++++++ .../cncf-twenty-two/components/pjr-page.php | 87 ++++++++---- .../themes/cncf-twenty-two/includes/acf.php | 1 + .../source/scss/detached/pjr-template.scss | 37 ++++- 11 files changed, 449 insertions(+), 31 deletions(-) create mode 100644 web/wp-content/themes/cncf-twenty-two/acf-json/group_666f072665825.json create mode 100644 web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/block.json create mode 100644 web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/editor.css create mode 100644 web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/editor.scss create mode 100644 web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/quote-with-image.css create mode 100644 web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/quote-with-image.php create mode 100644 web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/quote-with-image.scss diff --git a/web/wp-content/themes/cncf-twenty-two/acf-json/group_646840fbbe94f.json b/web/wp-content/themes/cncf-twenty-two/acf-json/group_646840fbbe94f.json index b1653a3ab..5a61fa0f9 100644 --- a/web/wp-content/themes/cncf-twenty-two/acf-json/group_646840fbbe94f.json +++ b/web/wp-content/themes/cncf-twenty-two/acf-json/group_646840fbbe94f.json @@ -103,6 +103,22 @@ "ui_on_text": "", "ui_off_text": "", "ui": 1 + }, + { + "key": "field_666f029568573", + "label": "Download Link", + "name": "pjr_download_link", + "aria-label": "", + "type": "link", + "instructions": "", + "required": 0, + "conditional_logic": 0, + "wrapper": { + "width": "", + "class": "", + "id": "" + }, + "return_format": "url" } ], "location": [ @@ -123,5 +139,5 @@ "active": true, "description": "", "show_in_rest": 0, - "modified": 1685625500 -} \ No newline at end of file + "modified": 1718551513 +} diff --git a/web/wp-content/themes/cncf-twenty-two/acf-json/group_666f072665825.json b/web/wp-content/themes/cncf-twenty-two/acf-json/group_666f072665825.json new file mode 100644 index 000000000..101e0f3e3 --- /dev/null +++ b/web/wp-content/themes/cncf-twenty-two/acf-json/group_666f072665825.json @@ -0,0 +1,128 @@ +{ + "key": "group_666f072665825", + "title": "Block - Quote with Image", + "fields": [ + { + "key": "field_666f07266800e", + "label": "Border Color", + "name": "quote_image_border_color", + "aria-label": "", + "type": "color_picker", + "instructions": "", + "required": 0, + "conditional_logic": 0, + "wrapper": { + "width": "", + "class": "", + "id": "" + }, + "default_value": "#ef7b4d", + "enable_opacity": 0, + "return_format": "string" + }, + { + "key": "field_666f0726683bc", + "label": "Cite Line 1", + "name": "quote_image_cite_line_1", + "aria-label": "", + "type": "text", + "instructions": "", + "required": 0, + "conditional_logic": 0, + "wrapper": { + "width": "", + "class": "", + "id": "" + }, + "default_value": "", + "maxlength": "", + "placeholder": "", + "prepend": "", + "append": "" + }, + { + "key": "field_666f0726687b2", + "label": "Cite Line 2", + "name": "quote_image_cite_line_2", + "aria-label": "", + "type": "text", + "instructions": "", + "required": 0, + "conditional_logic": 0, + "wrapper": { + "width": "", + "class": "", + "id": "" + }, + "default_value": "", + "maxlength": "", + "placeholder": "", + "prepend": "", + "append": "" + }, + { + "key": "field_666f0758e51f4", + "label": "Cite Line 3", + "name": "quote_image_cite_line_3", + "aria-label": "", + "type": "text", + "instructions": "", + "required": 0, + "conditional_logic": 0, + "wrapper": { + "width": "", + "class": "", + "id": "" + }, + "default_value": "", + "maxlength": "", + "placeholder": "", + "prepend": "", + "append": "" + }, + { + "key": "field_666f0763e51f5", + "label": "Quote Image", + "name": "quote_image_id", + "aria-label": "", + "type": "image", + "instructions": "", + "required": 0, + "conditional_logic": 0, + "wrapper": { + "width": "", + "class": "", + "id": "" + }, + "return_format": "id", + "library": "all", + "min_width": "", + "min_height": "", + "min_size": "", + "max_width": "", + "max_height": "", + "max_size": "", + "mime_types": "", + "preview_size": "medium" + } + ], + "location": [ + [ + { + "param": "block", + "operator": "==", + "value": "lf\/quote-with-image" + } + ] + ], + "menu_order": 0, + "position": "side", + "style": "default", + "label_placement": "top", + "instruction_placement": "label", + "hide_on_screen": "", + "active": true, + "description": "", + "show_in_rest": 0, + "modified": 1718553279 +} diff --git a/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/block.json b/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/block.json new file mode 100644 index 000000000..048e27751 --- /dev/null +++ b/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/block.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "lf/quote-with-image", + "title": "Quote with Image", + "description": "A quote with two lined citation alongside an image", + "style": "file:./quote-with-image.css", + "editorStyle": "file:./editor.css", + "editorScript": [], + "category": "lf", + "icon": "format-quote", + "keywords": [ + "testimonial", + "comment" + ], + "acf": { + "mode": "preview", + "renderTemplate": "quote-with-image.php", + "postTypes": [ "lf_report" ] + }, + "supports": { + "mode": false, + "align": false, + "alignWide": false, + "alignContent": false, + "alignText": false, + "anchor": false, + "color": { + "background": false, + "gradients": false, + "link": false, + "text": true + }, + "spacing": { + "margin": false, + "padding": false + }, + "typography": { + "fontSize": false, + "lineHeight": false + }, + "fullHeight": false + }, + "example": {} +} \ No newline at end of file diff --git a/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/editor.css b/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/editor.css new file mode 100644 index 000000000..6eb0bbf53 --- /dev/null +++ b/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/editor.css @@ -0,0 +1 @@ +.wp-block.wp-block-lf-quote-with-image{border:1px solid #757ba2;padding-left:0}.wp-block.wp-block-lf-quote-with-image:before{color:#757ba2;content:"Quote with Image";font-size:10px;font-style:normal;left:1px;line-height:1;position:absolute;top:0}#editor .wp-block .wp-block-lf-quote-with-image__cite p{-webkit-margin-before:0;-webkit-margin-after:0;line-height:inherit;margin-block-end:0;margin-block-start:0} \ No newline at end of file diff --git a/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/editor.scss b/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/editor.scss new file mode 100644 index 000000000..f32650966 --- /dev/null +++ b/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/editor.scss @@ -0,0 +1,21 @@ +.wp-block.wp-block-lf-quote-with-image { + border: 1px solid #757ba2; + padding-left: 0; + + &:before { + content: 'Quote with Image'; + color: #757ba2; + position: absolute; + left: 1px; + top: 0; + line-height: 1; + font-size: 10px; + font-style: normal; + } +} + +#editor .wp-block .wp-block-lf-quote-with-image__cite p { + line-height: inherit; + margin-block-start: 0; + margin-block-end: 0; +} diff --git a/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/quote-with-image.css b/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/quote-with-image.css new file mode 100644 index 000000000..2d4fab181 --- /dev/null +++ b/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/quote-with-image.css @@ -0,0 +1 @@ +.wp-block-lf-quote-with-image{font-style:italic;padding-left:40px}@media(min-width:700px){.wp-block-lf-quote-with-image{max-width:643px}}.wp-block-lf-quote-with-image__quote{font-size:20px;line-height:160%;margin-bottom:32px}.wp-block-lf-quote-with-image__align{align-items:center;display:flex;gap:32px}.wp-block-lf-quote-with-image__image{border-radius:50%;height:74px;width:74px}.wp-block-lf-quote-with-image__cite{font-family:"Source Serif Pro",Apple Garamond,Baskerville,Times New Roman,"Droid Serif",Times,serif}.wp-block-lf-quote-with-image__name{font-size:18px;font-weight:700;line-height:130%;margin:0}@media(min-width:1000px){.wp-block-lf-quote-with-image__name{font-size:20px}}.wp-block-lf-quote-with-image__additional,.wp-block-lf-quote-with-image__position{font-size:16px;line-height:160%;margin:0;margin-top:2px!important} \ No newline at end of file diff --git a/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/quote-with-image.php b/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/quote-with-image.php new file mode 100644 index 000000000..5838483a3 --- /dev/null +++ b/web/wp-content/themes/cncf-twenty-two/blocks/quote-with-image/quote-with-image.php @@ -0,0 +1,95 @@ + 'This is a quote', + 'className' => 'wp-block-lf-quote-with-image__quote', + ), + ), +); +?> + + + +