rocketship_core-8.x-2.0-alpha11/templates/panels/rocketship-panel-3col.html.twig

templates/panels/rocketship-panel-3col.html.twig
{#
/**
 * @file
 * Panels: custom template for 1 col
 *
 * Regions:
 * - top: top region
 * - sidebar: sidebar region
 * - main: main content region
 * - bottom: bottom region
 */
#}

{# no sidebars by default #}
{% set sidebars = false %}
{% set modifierClass = 'no-sidebars' %}
{% set classMain = 'full' %}
{% set classAsideLeft = '' %}
{% set classAsideRight = '' %}

{# If left and right sidebar content #}
{% if (content.first is not empty) and (content.second is not empty) %}
  {% set sidebars = true %}
  {% set modifierClass = 'sidebars' %}
  {% set classMain = 'center' %}
  {% set classAsideLeft = 'left' %}
  {% set classAsideRight = 'right' %}

{# If left but no right sidebar content #}
{% elseif content.first is not empty %}
  {% set sidebars = true %}
  {% set modifierClass = 'sidebar-primary' %}
  {% set classMain = 'right' %}
  {% set classAsideLeft = 'left' %}

{# If right but no left sidebar content #}
{% elseif content.second is not empty %}
  {% set sidebars = true %}
  {% set modifierClass = 'sidebar-secondary' %}
  {% set classMain = 'left' %}
  {% set classAsideRight = 'right' %}
{% endif %}

{% if classes is not defined %}
  {% set classes = [] %}
{% endif %}
{%
  set classes = classes|merge([
    'panel-layout',
    'panel-layout--' ~ modifierClass,
    'clearfix',
    content['#page_variant'] ? 'page-variant--' ~ content['#page_variant'].getOriginalId|split('-')|last,
    settings['layout']['extra_classes'] ? settings['layout']['extra_classes'],
  ])
%}

<div{{ attributes.addClass(classes|join(' ')) }}>

  {% block panelsTop %}
  {% if content.top is not empty %}
    <div class="panel-layout__row panel-layout__top">
      {{ content.top }}
    </div>
  {% endif %}
  {% endblock %}

  {% block panelsVisual %}
  {% if content.visual is not empty %}
    <div class="panel-layout__row panel-layout__visual">
      {{ content.visual }}
    </div>
  {% endif %}
  {% endblock %}

  {% block panelsHeader %}
  {% if content.header is not empty %}
    <header class="panel-layout__row panel-layout__header">
      {{ content.header }}
    </header>
  {% endif %}
  {% endblock %}

  {% block panelsCTA01 %}
  {% if content.cta_01 is not empty %}
    <div class="panel-layout__row panel-layout__cta panel-layout__cta-01">
      {{ content.cta_01 }}
    </div>
  {% endif %}
  {% endblock %}

  {% if (content.content is not empty) or (content.first is not empty) or (content.second is not empty) %}

    {% if sidebars != false %}
    <div class="panel-layout__cols panel-layout__cols--main panel-layout__cols--{{modifierClass}}">
    {% endif %}

      {% block panelsSidebarFirst %}
      {% if content.first is not empty %}
        <aside class="panel-layout__row panel-layout__sidebar panel-layout__sidebar--{{modifierClass}} panel-layout__sidebar--{{classAsideLeft}}">
          {{ content.first }}
        </aside>
      {% endif %}
      {% endblock %}

      {% block panelsContent %}
      {% if content.content is not empty %}
        <div class="panel-layout__row panel-layout__content panel-layout__content--{{modifierClass}} panel-layout__content--{{classMain}}">
        {{ content.content }}
        </div>
      {% endif %}
      {% endblock %}

      {% block panelsSidebarSecond %}
      {% if content.second is not empty %}
        <aside class="panel-layout__row panel-layout__sidebar panel-layout__sidebar--{{modifierClass}} panel-layout__sidebar--{{classAsideRight}}">
          {{ content.second }}
        </aside>
      {% endif %}
      {% endblock %}

    {% if sidebars != false %}
    </div>
    {% endif %}

  {% endif %}

  {% block panelsCTA02 %}
  {% if content.cta_02 is not empty %}
    <div class="panel-layout__row panel-layout__cta panel-layout__cta-02">
      {{ content.cta_02 }}
    </div>
  {% endif %}
  {% endblock %}

  {% block panelsFooter %}
  {% if content.footer is not empty %}
    <footer class="panel-layout__row panel-layout__footer">
      {{ content.footer }}
    </footer>
  {% endif %}
  {% endblock %}

  {% block panelsBottom %}
  {% if content.bottom is not empty %}
    <div class="panel-layout__row panel-layout__bottom">
      {{ content.bottom }}
    </div>
  {% endif %}
  {% endblock %}
</div>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc