From a67a8f0285f48696ab6766d445f888df1db36b6c Mon Sep 17 00:00:00 2001 From: rdrew Date: Thu, 29 Jun 2023 14:14:22 -0300 Subject: [PATCH 1/2] proxie link --- css/sass/components/_megamenu.scss | 0 roblib_2023.info.yml | 1 + roblib_2023.theme | 11 + ...ea11-76f7-4d80-b914-1386b250fb6b.html.twig | 222 ++++++++++++++++++ .../{field.html.twig => field.html.twig.bk} | 0 ...de--field-proxied-link--database.html.twig | 82 +++++++ ...fields--landing_page_news_blocks.html.twig | 4 +- ...ain.html.twig => menu--main.html.twig.old} | 0 templates/components/region--header.html.twig | 31 +-- .../search-facets/facets-item-list.html.twig | 64 +++++ .../facets-result-item.html.twig | 28 +++ templates/content/node--5706.html.twig | 64 +++++ 12 files changed, 490 insertions(+), 17 deletions(-) mode change 100644 => 100755 css/sass/components/_megamenu.scss create mode 100755 templates/block/block--block-content--72a4ea11-76f7-4d80-b914-1386b250fb6b.html.twig rename templates/components/accordion_nodes/{field.html.twig => field.html.twig.bk} (100%) create mode 100755 templates/components/field--node--field-proxied-link--database.html.twig rename templates/components/{menu--main.html.twig => menu--main.html.twig.old} (100%) create mode 100755 templates/components/search-facets/facets-item-list.html.twig create mode 100755 templates/components/search-facets/facets-result-item.html.twig create mode 100755 templates/content/node--5706.html.twig diff --git a/css/sass/components/_megamenu.scss b/css/sass/components/_megamenu.scss old mode 100644 new mode 100755 diff --git a/roblib_2023.info.yml b/roblib_2023.info.yml index c6c6f44..5d482e2 100755 --- a/roblib_2023.info.yml +++ b/roblib_2023.info.yml @@ -21,6 +21,7 @@ regions: footer: 'Footer' subfooter: 'Subfooter' breadcrumb: 'Breadcrumb' + hidden: 'Hidden' page_top: 'Page top' page_bottom: 'Page bottom' generator: 'starterkit_theme:10.0.1' diff --git a/roblib_2023.theme b/roblib_2023.theme index acacf87..3b24144 100755 --- a/roblib_2023.theme +++ b/roblib_2023.theme @@ -19,6 +19,17 @@ function roblib_2023_preprocess_image_widget(array &$variables) { unset($data['preview']); } } +function roblib_2023_field__field_proxied_link__database($variables) { + // the name of the function came from the devel themer tool after 1st putting dpm() in themename_field() + + // dpm($variables); + // this dumps the vars using the devel mod. use it to target the varibles printed below. + + $output = ''; + $output = '' . $variables['items'][0]['#element']['title'] . ''; + + return $output; +} function roblib_2023_preprocess_html(&$variables) { diff --git a/templates/block/block--block-content--72a4ea11-76f7-4d80-b914-1386b250fb6b.html.twig b/templates/block/block--block-content--72a4ea11-76f7-4d80-b914-1386b250fb6b.html.twig new file mode 100755 index 0000000..ab4f52e --- /dev/null +++ b/templates/block/block--block-content--72a4ea11-76f7-4d80-b914-1386b250fb6b.html.twig @@ -0,0 +1,222 @@ + + +

+ Hot topics this week: Wireless configuration; Printing +

+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +{##} + {#{{ title_prefix }}#} + {#{% if label %}#} + {#{{ label }}#} + {#{% endif %}#} + {#{{ title_suffix }}#} + {#{% block content %}#} + {#{{ content }}#} + {#{% endblock %}#} +{##} diff --git a/templates/components/accordion_nodes/field.html.twig b/templates/components/accordion_nodes/field.html.twig.bk similarity index 100% rename from templates/components/accordion_nodes/field.html.twig rename to templates/components/accordion_nodes/field.html.twig.bk diff --git a/templates/components/field--node--field-proxied-link--database.html.twig b/templates/components/field--node--field-proxied-link--database.html.twig new file mode 100755 index 0000000..6469fa1 --- /dev/null +++ b/templates/components/field--node--field-proxied-link--database.html.twig @@ -0,0 +1,82 @@ +{# +/** + * @file + * Theme override for a field. + * + * To override output, copy the "field.html.twig" from the templates directory + * to your theme's directory and customize it, just like customizing other + * Drupal templates such as page.html.twig or node.html.twig. + * + * Instead of overriding the theming for all fields, you can also just override + * theming for a subset of fields using + * @link themeable Theme hook suggestions. @endlink For example, + * here are some theme hook suggestions that can be used for a field_foo field + * on an article node type: + * - field--node--field-foo--article.html.twig + * - field--node--field-foo.html.twig + * - field--node--article.html.twig + * - field--field-foo.html.twig + * - field--text-with-summary.html.twig + * - field.html.twig + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - label_hidden: Whether to show the field label or not. + * - title_attributes: HTML attributes for the title. + * - label: The label for the field. + * - multiple: TRUE if a field can contain multiple items. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item's content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * + * + * @see template_preprocess_field() + */ +#} +{% + set classes = [ + 'field', + 'field--name-' ~ field_name|clean_class, + 'field--type-' ~ field_type|clean_class, + 'field--label-' ~ label_display, + label_display == 'inline' ? 'clearfix', + ] +%} +{% + set title_classes = [ + 'field__label', + label_display == 'visually_hidden' ? 'visually-hidden', + ] +%} +{#{{ kint(items)}}#} +{% if label_hidden %} + {% if multiple %} + + {% for item in items %} + {{ item.content }} + {% endfor %} + + {% else %} + {% for item in items %} +

 {{ item.content['#title']}}

+ {% endfor %} + {% endif %} +{% else %} + + {{ label }} + {% if multiple %} +
+ {% endif %} + {% for item in items %} + {{ item.content }}
+ test4 + {% endfor %} + {% if multiple %} + + {% endif %} + +{% endif %} diff --git a/templates/components/lp-news-blocks/views-view-fields--landing_page_news_blocks.html.twig b/templates/components/lp-news-blocks/views-view-fields--landing_page_news_blocks.html.twig index c8578d4..d411a6b 100755 --- a/templates/components/lp-news-blocks/views-view-fields--landing_page_news_blocks.html.twig +++ b/templates/components/lp-news-blocks/views-view-fields--landing_page_news_blocks.html.twig @@ -32,7 +32,6 @@ */ #} - - diff --git a/templates/components/menu--main.html.twig b/templates/components/menu--main.html.twig.old similarity index 100% rename from templates/components/menu--main.html.twig rename to templates/components/menu--main.html.twig.old diff --git a/templates/components/region--header.html.twig b/templates/components/region--header.html.twig index b39915b..f91bfb9 100755 --- a/templates/components/region--header.html.twig +++ b/templates/components/region--header.html.twig @@ -20,22 +20,23 @@ %} {% if content %} {#foundation title bar#} -
- - + + {#
#} + {##} + {##} -
+ {#
#} diff --git a/templates/components/search-facets/facets-item-list.html.twig b/templates/components/search-facets/facets-item-list.html.twig new file mode 100755 index 0000000..f45973c --- /dev/null +++ b/templates/components/search-facets/facets-item-list.html.twig @@ -0,0 +1,64 @@ +{# +/** + * @file + * Default theme implementation for a facets item list. + * + * Available variables: + * - items: A list of items. Each item contains: + * - attributes: HTML attributes to be applied to each list item. + * - value: The content of the list element. + * - title: The title of the list. + * - list_type: The tag for list element ("ul" or "ol"). + * - wrapper_attributes: HTML attributes to be applied to the list wrapper. + * - attributes: HTML attributes to be applied to the list. + * - empty: A message to display when there are no items. Allowed value is a + * string or render array. + * - context: A list of contextual data associated with the list. May contain: + * - list_style: The ID of the widget plugin this facet uses. + * - facet: The facet for this result item. + * - id: the machine name for the facet. + * - label: The facet label. + * + * @see facets_preprocess_facets_item_list() + * + * @ingroup themeable + */ +#} +{% if cache_hash %} + +{%- endif %} +
+ {% if facet.widget.type %} + {%- set attributes = attributes.addClass('item-list__' ~ facet.widget.type) %} + {% endif %} + {% if items or empty %} + {%- if title is not empty -%} +

{{ title }}

+ {%- endif -%} + + {%- if items -%} + <{{ list_type }}{{ attributes.addClass("menu vertical") }}> + {%- for item in items -%} + {{ item.value }} + {%- endfor -%} + + {%- else -%} + {{- empty -}} + {%- endif -%} + {%- endif %} + +{% if facet.widget.type == "dropdown" %} + +{%- endif %} +
diff --git a/templates/components/search-facets/facets-result-item.html.twig b/templates/components/search-facets/facets-result-item.html.twig new file mode 100755 index 0000000..cace87f --- /dev/null +++ b/templates/components/search-facets/facets-result-item.html.twig @@ -0,0 +1,28 @@ +{# +/** + * @file + * Default theme implementation of a facet result item. + * + * Available variables: + * - value: The item value. + * - raw_value: The raw item value. + * - show_count: If this facet provides count. + * - count: The amount of results. + * - is_active: The item is active. + * - facet: The facet for this result item. + * - id: the machine name for the facet. + * - label: The facet label. + * + * @ingroup themeable + */ +#} +{% if is_active %} +   +{{ value }} +{% else %} +   +{{ value }} +{% endif %} +{% if show_count %} + ({{ count }}) +{% endif %} diff --git a/templates/content/node--5706.html.twig b/templates/content/node--5706.html.twig new file mode 100755 index 0000000..d3e89ee --- /dev/null +++ b/templates/content/node--5706.html.twig @@ -0,0 +1,64 @@ + + + + +

Animated Accordion

+

Click on the buttons to open the collapsible content.

+ + +
+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

+
+ + +
+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

+
+ + +
+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

+
+ + + From 79c8a65d4fc8db0c58763ee9e9151b615152ab8b Mon Sep 17 00:00:00 2001 From: rdrew Date: Thu, 6 Jul 2023 11:56:57 -0300 Subject: [PATCH 2/2] proxie link --- templates/components/block--roblib-2023-site-branding.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/components/block--roblib-2023-site-branding.html.twig b/templates/components/block--roblib-2023-site-branding.html.twig index 602ce4f..89fa944 100755 --- a/templates/components/block--roblib-2023-site-branding.html.twig +++ b/templates/components/block--roblib-2023-site-branding.html.twig @@ -17,7 +17,7 @@