Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,31 +122,18 @@

{% set hasSidebar = content.field_sidebar_content and content.field_sidebar_content|render|striptags|trim %}

<div class="container">

<div>
{% if content.field_program_description|render|trim is not empty %}
<div class="row">
<div class="main-region col">
<p class="lead">{{ content.field_program_description }}</p>
<div class="container">
<div class="row">
<div class="main-region col">
<p class="lead">{{ content.field_program_description }}</p>
</div>
</div>
</div>
</div>
{% endif %}

<div class="row mt-3">

{# Program content #}
<div class="main-region col">
{{ content.field_content }}
</div>

{# Program sidebar #}
{% if hasSidebar %}
<div class="sidebar-region col-md-5 col-lg-4">
<article class="program-sidebar">
{{ content.field_sidebar_content }}
</article>
</div>
{% endif %}

<div class="main-region">
{{ content.field_content }}
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -102,28 +102,12 @@
</div>
{% endif %}

{# Filters #}
{% set hasSidebar = content.field_sidebar_content and content.field_sidebar_content|render|striptags|trim %}

<div class="container">
<div class="row">

{# Category content #}
<div class="main-region col">
{{ content.field_category_description }}
{{ content.field_content }}
</div>

{# Category sidebar #}
{% if hasSidebar %}
<div class="sidebar-region col-md-5 col-lg-4">
<article class="program-sidebar program-sidebar-sub-category">
{{ content.field_sidebar_content }}
</article>
</div>
{% endif %}

<div class="main-region">
<div class="container">
{{ content.field_category_description }}
</div>
{{ content.field_content }}
</div>

{{ content.field_bottom_content }}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
set classes = [
'paragraph',
'paragraph-1c-wrapper',
'row',
'container',
]
%}

Expand All @@ -49,5 +49,7 @@
{% endif %}

<div{{ attributes.addClass(classes) }}>
{{ content }}
<div class="row">
{{ content }}
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
'paragraph',
'block-description--wrapper',
'block-description--2',
'row'
'container'
]
%}

Expand All @@ -50,5 +50,7 @@
{% endif %}

<div{{ attributes.addClass(classes) }}>
{{ content }}
<div class="row">
{{ content }}
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
'paragraph',
'block-description--wrapper',
'block-description--3',
'row',
'container',
]
%}

Expand All @@ -50,5 +50,7 @@
{% endif %}

<div{{ attributes.addClass(classes) }}>
{{ content }}
<div class="row">
{{ content }}
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@
'paragraph',
'block-description--wrapper',
'block-description--4',
'row'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't there be a row inside a container, as in paragraph--2c.html.twig, /paragraph--3c.html.twig ?

]
%}

{% if paragraph.field_prfg_display_line_above.value %}
{% set classes = classes|merge(['block-description--wrapper--outline--top']) %}
{% endif %}

<div{{ attributes.addClass(classes) }}>
{{ content }}
<div class="container">
<div{{ attributes.addClass(classes) }}>
{{ content }}
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{#
/**
* @file
* Default theme implementation to display a paragraph.
*
* Available variables:
* - paragraph: Full paragraph entity.
* Only method names starting with "get", "has", or "is" and a few common
* methods such as "id", "label", and "bundle" are available. For example:
* - paragraph.getCreatedTime() will return the paragraph creation timestamp.
* - paragraph.id(): The paragraph ID.
* - paragraph.bundle(): The type of the paragraph, for example, "image" or "text".
* - paragraph.getOwnerId(): The user ID of the paragraph author.
* See Drupal\paragraphs\Entity\Paragraph for a full list of public properties
* and methods for the paragraph object.
* - content: All paragraph items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use
* {{ content|without('field_example') }} to temporarily suppress the printing
* of a given child element.
* - attributes: HTML attributes for the containing element.
* The attributes.class element may contain one or more of the following
* classes:
* - paragraphs: The current template type (also known as a "theming hook").
* - paragraphs--type-[type]: The current paragraphs type. For example, if the paragraph is an
* "Image" it would result in "paragraphs--type--image". Note that the machine
* name will often be in a short form of the human readable label.
* - paragraphs--view-mode--[view_mode]: The View Mode of the paragraph; for example, a
* preview would result in: "paragraphs--view-mode--preview", and
* default: "paragraphs--view-mode--default".
* - view_mode: View mode; for example, "preview" or "full".
* - logged_in: Flag for authenticated user status. Will be true when the
* current user is a logged-in member.
* - is_admin: Flag for admin user status. Will be true when the current user
* is an administrator.
*
* @see template_preprocess_paragraph()
*
* @ingroup themeable
*/
#}
{%
set classes = [
'paragraph',
'paragraph--type--' ~ paragraph.bundle|clean_class,
view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
not paragraph.isPublished() ? 'paragraph--unpublished'
]
%}
{% block paragraph %}
<div class="container">
<div{{ attributes.addClass(classes) }}>
{% block content %}
{{ content }}
{% endblock %}
</div>
</div>
{% endblock paragraph %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{#
/**
* @file
* Default theme implementation to display a paragraph.
*
* Available variables:
* - paragraph: Full paragraph entity.
* Only method names starting with "get", "has", or "is" and a few common
* methods such as "id", "label", and "bundle" are available. For example:
* - paragraph.getCreatedTime() will return the paragraph creation timestamp.
* - paragraph.id(): The paragraph ID.
* - paragraph.bundle(): The type of the paragraph, for example, "image" or "text".
* - paragraph.getOwnerId(): The user ID of the paragraph author.
* See Drupal\paragraphs\Entity\Paragraph for a full list of public properties
* and methods for the paragraph object.
* - content: All paragraph items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use
* {{ content|without('field_example') }} to temporarily suppress the printing
* of a given child element.
* - attributes: HTML attributes for the containing element.
* The attributes.class element may contain one or more of the following
* classes:
* - paragraphs: The current template type (also known as a "theming hook").
* - paragraphs--type-[type]: The current paragraphs type. For example, if the paragraph is an
* "Image" it would result in "paragraphs--type--image". Note that the machine
* name will often be in a short form of the human readable label.
* - paragraphs--view-mode--[view_mode]: The View Mode of the paragraph; for example, a
* preview would result in: "paragraphs--view-mode--preview", and
* default: "paragraphs--view-mode--default".
* - view_mode: View mode; for example, "preview" or "full".
* - logged_in: Flag for authenticated user status. Will be true when the
* current user is a logged-in member.
* - is_admin: Flag for admin user status. Will be true when the current user
* is an administrator.
*
* @see template_preprocess_paragraph()
*
* @ingroup themeable
*/
#}
{%
set classes = [
'container',
'paragraph',
'paragraph--type--' ~ paragraph.bundle|clean_class,
view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
not paragraph.isPublished() ? 'paragraph--unpublished'
]
%}
{% block paragraph %}
<div{{ attributes.addClass(classes) }}>
{% block content %}
{{ content }}
{% endblock %}
</div>
{% endblock paragraph %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{#
/**
* @file
* Default theme implementation to display a paragraph.
*
* Available variables:
* - paragraph: Full paragraph entity.
* Only method names starting with "get", "has", or "is" and a few common
* methods such as "id", "label", and "bundle" are available. For example:
* - paragraph.getCreatedTime() will return the paragraph creation timestamp.
* - paragraph.id(): The paragraph ID.
* - paragraph.bundle(): The type of the paragraph, for example, "image" or "text".
* - paragraph.getOwnerId(): The user ID of the paragraph author.
* See Drupal\paragraphs\Entity\Paragraph for a full list of public properties
* and methods for the paragraph object.
* - content: All paragraph items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use
* {{ content|without('field_example') }} to temporarily suppress the printing
* of a given child element.
* - attributes: HTML attributes for the containing element.
* The attributes.class element may contain one or more of the following
* classes:
* - paragraphs: The current template type (also known as a "theming hook").
* - paragraphs--type-[type]: The current paragraphs type. For example, if the paragraph is an
* "Image" it would result in "paragraphs--type--image". Note that the machine
* name will often be in a short form of the human readable label.
* - paragraphs--view-mode--[view_mode]: The View Mode of the paragraph; for example, a
* preview would result in: "paragraphs--view-mode--preview", and
* default: "paragraphs--view-mode--default".
* - view_mode: View mode; for example, "preview" or "full".
* - logged_in: Flag for authenticated user status. Will be true when the
* current user is a logged-in member.
* - is_admin: Flag for admin user status. Will be true when the current user
* is an administrator.
*
* @see template_preprocess_paragraph()
*
* @ingroup themeable
*/
#}
{%
set classes = [
'paragraph',
'paragraph--type--' ~ paragraph.bundle|clean_class,
view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
not paragraph.isPublished() ? 'paragraph--unpublished',
'container'
]
%}
{% block paragraph %}
<div{{ attributes.addClass(classes) }}>
{% block content %}
{{ content }}
{% endblock %}
</div>
{% endblock paragraph %}
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,20 @@ set classes = [
'featured-content',
'paragraph--type--' ~ paragraph.bundle|clean_class,
view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
'container',
'my-5'
]
%}
{% set item_class = 'col-lg' %}

{% if content.field_prgf_grid_style.0['#markup'] == '2' %}
{% set item_class = 'col-lg-6' %}
{% elseif content.field_prgf_grid_style.0['#markup'] == '3' %}
{% set item_class = 'col-lg-4' %}
{% elseif content.field_prgf_grid_style.0['#markup'] == '4' %}
{% set item_class = 'col-lg-3' %}
{% endif %}

<div{{ attributes.addClass(classes) }}>

<h2 class="mb-3 text-center">
Expand All @@ -55,20 +66,18 @@ set classes = [
{{ content.field_prgf_description }}
</div>

{#
For printing the columns we need access to the grid style which we don't
have after this was converted from a field collection.
#}
{{ attach_library('openy_rose/featured_slider') }}
<div class="{{ 'wrapper-' ~ content.field_prgf_fc_clm_description['#field_name']|clean_class}}">
<div class="card-deck pt-3">
<div class="row pt-3">
{% for key, item in content.field_prgf_fc_clm_description %}
{% if key matches '/^\\d+$/' %}
<div class="card">
<div class="card-body">
{{ item }}
<div class="row-eq-height col-12 col-sm-12 col-md-6 {{ item_class }} mb-4">
<div class="card">
<div class="card-body">
{{ item }}
</div>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
{% extends '@openy_prgf_featured_highlights/paragraph--featured-highlights--default.html.twig' %}
{% set classes = ['mb-4'] %}
{% set classes = [
'container',
'mb-4',
'paragraph',
'featured-highlights',
'paragraph--type--' ~ paragraph.bundle|clean_class,
view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
]|merge(classes|default([]))
%}
Loading