From 028108a4f2a958c500119540460c69d465755a01 Mon Sep 17 00:00:00 2001 From: Jacob Korf Date: Wed, 24 Apr 2024 13:56:42 -0600 Subject: [PATCH 1/2] removal of all how-to files --- boulder_base.libraries.yml | 6 - templates/content/node--how-to-page.html.twig | 135 ------------------ ...ld--field_how_to_estimated_costs.html.twig | 3 - .../field--field_how_to_step_image.html.twig | 3 - .../field--field_how_to_step_title.html.twig | 3 - .../field/field--field_how_to_tools.html.twig | 10 -- ...aragraph--how-to-individual-step.html.twig | 9 -- 7 files changed, 169 deletions(-) delete mode 100644 templates/content/node--how-to-page.html.twig delete mode 100644 templates/field/field--field_how_to_estimated_costs.html.twig delete mode 100644 templates/field/field--field_how_to_step_image.html.twig delete mode 100644 templates/field/field--field_how_to_step_title.html.twig delete mode 100644 templates/field/field--field_how_to_tools.html.twig delete mode 100644 templates/paragraphs/paragraph--how-to-individual-step.html.twig diff --git a/boulder_base.libraries.yml b/boulder_base.libraries.yml index fca5c962..0d7e97bb 100644 --- a/boulder_base.libraries.yml +++ b/boulder_base.libraries.yml @@ -78,12 +78,6 @@ ucb-people-list-page: theme: css/ucb-people-list.css: {} -ucb-how-to-page: - version: 1.x - css: - theme: - css/ucb-how-to-page.css: {} - ucb-secondary-menu-region: version: 1.x css: diff --git a/templates/content/node--how-to-page.html.twig b/templates/content/node--how-to-page.html.twig deleted file mode 100644 index aa7628b5..00000000 --- a/templates/content/node--how-to-page.html.twig +++ /dev/null @@ -1,135 +0,0 @@ -{# -/** - * Theme layout to display a Basic Page. - * - */ -#} - -{{ attach_library('boulder_base/ucb-how-to-page') }} -{% - set classes = [ - 'node', - 'node--type-' ~ node.bundle|clean_class, - node.isPromoted() ? 'node--promoted', - node.isSticky() ? 'node--sticky', - not node.isPublished() ? 'node--unpublished', - view_mode ? 'node--view-mode-' ~ view_mode|clean_class, -] -%} - -{# Used for hiding site title visibly using sr-only bootstrap class, if front page #} -{% set isFrontPage = '' %} -{% if is_front %} - {% set isFrontPage = 'sr-only' %} -{% endif %} - -{% set jsonLD2 = ' "@context": "https://schema.org", "@type": "HowTo",' %} - -
- - {{ label }} - {% set jsonLD2 = jsonLD2 ~ '"name": ' ~ label|render|striptags|json_encode ~ ','%} -
-
- -
-
-
- {{ content.body }} -
-
- {% if items in content.field_how_to_materials %} -

Materials -

- {% set matList = '"supply": [' %} -
    - {% for key, item in content.field_how_to_materials %} - {% if key|first != '#' %} - {% set matList = matList ~ '{ "@type": "HowToSupply", "name": ' ~ item|render|striptags|trim|json_encode ~ ' },' %} -
  • {{item|render}}
  • - {% endif %} - {% endfor %} -
- {% set matList = matList|slice(0, -1) ~ '],' %} - {% endif %} - - {% if items in content.field_how_to_tools %} -

Tools -

- {% set toolList = '"tool": [' %} -
    - {% for key, item in content.field_how_to_tools %} - {% if key|first != '#' %} - {% set toolList = toolList ~ '{ "@type": "HowToTool", "name": ' ~ item|render|striptags|trim|json_encode ~ ' },' %} -
  • {{item|render}}
  • - {% endif %} - {% endfor %} -
- {% set toolList = toolList|slice(0, -1) ~ '],' %} - {% endif %} - {% if items in content.field_how_to_estimated_costs %} -

Estimated Cost: - - - {% set estimatedC = '' %} - {% for key, item in content.field_how_to_estimated_costs %} - {% if key|first != '#' %} - {% set estimatedC = '"estimatedCost": { "@type": "MonetaryAmount", "currency": "USD", "value": ' ~item|render|striptags|trim|json_encode ~' },' %} - ${{item|render}} - {% endif %} - {% endfor %} - -

- {% endif %} -
- -
-
- {% for key, item in node.field_how_to_initial_image %} - {% if key|first != '#' %} - {% set initialImageJSON = '"image": { "@type": "ImageObject","url": "' ~ file_url(item.entity.field_media_image.entity.fileuri) ~ '", "height": "406", "width": "305"},' %} - {{item|view}} - {% endif %} - {% endfor %} -
-
- {% set stepList = '"step": [' %} - {% for key, item in node.field_how_to_steps %} - {% if key|first != '#' %} -
-
- {{item.entity.field_how_to_step_image|view}} - {% set imgURL = file_url(item.entity.field_how_to_step_image.entity.field_media_image.entity.fileuri) %} - {% set stepImage = '"image": { "@type": "ImageObject","url": "' ~ imgURL ~ '", "height": "406", "width": "305"}' %} -
-
- {% set stepList = stepList ~ '{"@type": "HowToStep",' %} -

{{item.entity.field_how_to_step_title|view}}

- {% set stepList = stepList ~ '"url": "' ~ url("")|render ~ '#step' ~ key ~'",' %} - {% set stepList = stepList ~ '"name": ' ~ item.entity.field_how_to_step_title.value|render|striptags|trim|json_encode ~ ',' %} - - - {% set stepList = stepList ~ '"itemListElement": [' %} -
    - {% for key2, item2 in item.entity.field_how_to_sub_steps %} - {% if key2|first != '#' %} -
  • {{item2|view}}
  • - {% set stepList = stepList ~ '{ "@type": "HowToDirection", "text": ' ~ item2.value|render|striptags|trim|json_encode ~ '},' %} - {% endif %} - {% endfor %} -
- {% set stepList = stepList|slice(0,-1) ~ '],' %} - {% set stepList = stepList ~ stepImage %} - {% set stepList = stepList ~ '},' %} -
-
- {% endif %} - {% endfor %} - {% set stepList = stepList|slice(0,-1) ~ ']' %} -
- - diff --git a/templates/field/field--field_how_to_estimated_costs.html.twig b/templates/field/field--field_how_to_estimated_costs.html.twig deleted file mode 100644 index accc3c02..00000000 --- a/templates/field/field--field_how_to_estimated_costs.html.twig +++ /dev/null @@ -1,3 +0,0 @@ -{% for item in items %} - {{ item.content }} -{% endfor %} diff --git a/templates/field/field--field_how_to_step_image.html.twig b/templates/field/field--field_how_to_step_image.html.twig deleted file mode 100644 index accc3c02..00000000 --- a/templates/field/field--field_how_to_step_image.html.twig +++ /dev/null @@ -1,3 +0,0 @@ -{% for item in items %} - {{ item.content }} -{% endfor %} diff --git a/templates/field/field--field_how_to_step_title.html.twig b/templates/field/field--field_how_to_step_title.html.twig deleted file mode 100644 index accc3c02..00000000 --- a/templates/field/field--field_how_to_step_title.html.twig +++ /dev/null @@ -1,3 +0,0 @@ -{% for item in items %} - {{ item.content }} -{% endfor %} diff --git a/templates/field/field--field_how_to_tools.html.twig b/templates/field/field--field_how_to_tools.html.twig deleted file mode 100644 index 964c458b..00000000 --- a/templates/field/field--field_how_to_tools.html.twig +++ /dev/null @@ -1,10 +0,0 @@ -{% if items %} -
- Tools: - {% for item in items %} -
    -
  • {{ item.content }}
  • -
- {% endfor %} -
-{% endif %} diff --git a/templates/paragraphs/paragraph--how-to-individual-step.html.twig b/templates/paragraphs/paragraph--how-to-individual-step.html.twig deleted file mode 100644 index 27ff9944..00000000 --- a/templates/paragraphs/paragraph--how-to-individual-step.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -
-
- {{ content.field_how_to_step_image|render }} -
-
- {{ content.field_how_to_step_title|render }} - {{ content.field_how_to_step_text|render }} -
-
From e0aea829acee3d1dd354e249dc705a505addd2f3 Mon Sep 17 00:00:00 2001 From: Jacob Korf Date: Wed, 24 Apr 2024 16:13:09 -0600 Subject: [PATCH 2/2] removal of css files --- css/ucb-how-to-page.css | 60 ----------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 css/ucb-how-to-page.css diff --git a/css/ucb-how-to-page.css b/css/ucb-how-to-page.css deleted file mode 100644 index 7961801c..00000000 --- a/css/ucb-how-to-page.css +++ /dev/null @@ -1,60 +0,0 @@ -.eachStepDiv { - display: flex; - flex-direction: row; - margin-bottom: 20px; -} -.initialImage { - margin-left: 10px; - margin-bottom: 10px; - max-width: 50%; -} - -.verticalFlex { - display: flex; - flex-direction: column; - margin-bottom: 10px; - width: 100%; -} -.stepFlex { - display: flex; - flex-direction: column; - margin-bottom: 10px; - margin-right: 30px; -} -.stepTitle { - font-size: 24px; - margin-bottom: 10px; - margin-top: 10px; -} - -.stepText { - font-size: 20px; - margin-bottom: 10px; - margin-top: 10px; -} - -.eachStepImage { - width: 100%; - margin-bottom: 10px; - margin-top: 10px; - margin-right: 20px; -} - -@media (max-width: 767px) { - .initialStepDiv.eachStepDiv { - display: flex; - flex-direction: column-reverse; - margin-bottom: 20px; - margin-right: 10px; - } - .howToStep.eachStepDiv { - display: flex; - flex-direction: column; - margin-bottom: 20px; - margin-right: 10px; - } - .initialImage { - max-width: 100%; - margin-left: 0px; - } -}