Initial Drupal 11 with DDEV setup
This commit is contained in:
		@ -0,0 +1,46 @@
 | 
			
		||||
{#
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Theme override for a views mini-pager.
 | 
			
		||||
 *
 | 
			
		||||
 * Available variables:
 | 
			
		||||
 * - heading_id: Pagination heading ID.
 | 
			
		||||
 * - pagination_heading_level: The heading level to use for the pager.
 | 
			
		||||
 * - items: List of pager items.
 | 
			
		||||
 *
 | 
			
		||||
 * @see template_preprocess_views_mini_pager()
 | 
			
		||||
 */
 | 
			
		||||
#}
 | 
			
		||||
{% if items.previous or items.next %}
 | 
			
		||||
  <nav class="pager" role="navigation" aria-labelledby="{{ heading_id }}">
 | 
			
		||||
    <{{ pagination_heading_level }} id="{{ heading_id }}" class="visually-hidden">{{ 'Pagination'|t }}</{{ pagination_heading_level }}>
 | 
			
		||||
    <ul class="pager__items js-pager__items">
 | 
			
		||||
      {# Print previous item if we are not on the first page. #}
 | 
			
		||||
      {% if items.previous %}
 | 
			
		||||
        <li class="pager__item pager__item--control pager__item--previous">
 | 
			
		||||
          <a href="{{ items.previous.href }}" class="pager__link" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel', 'class') }}>
 | 
			
		||||
            <span class="visually-hidden">{{ 'Previous page'|t }}</span>
 | 
			
		||||
            {%- include "@olivero/../images/pager-previous.svg" -%}
 | 
			
		||||
          </a>
 | 
			
		||||
        </li>
 | 
			
		||||
      {% endif %}
 | 
			
		||||
 | 
			
		||||
      {# Print current active page. #}
 | 
			
		||||
      {% if items.current %}
 | 
			
		||||
        <li class="pager__item pager__item--active">
 | 
			
		||||
          {{ items.current }}
 | 
			
		||||
        </li>
 | 
			
		||||
      {% endif %}
 | 
			
		||||
 | 
			
		||||
      {# Print next item if we are not on the last page. #}
 | 
			
		||||
      {% if items.next %}
 | 
			
		||||
        <li class="pager__item pager__item--control pager__item--next">
 | 
			
		||||
          <a href="{{ items.next.href }}" class="pager__link" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}>
 | 
			
		||||
            <span class="visually-hidden">{{ 'Next page'|t }}</span>
 | 
			
		||||
            {%- include "@olivero/../images/pager-previous.svg" -%}
 | 
			
		||||
          </a>
 | 
			
		||||
        </li>
 | 
			
		||||
      {% endif %}
 | 
			
		||||
    </ul>
 | 
			
		||||
  </nav>
 | 
			
		||||
{% endif %}
 | 
			
		||||
@ -0,0 +1,94 @@
 | 
			
		||||
{#
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Theme override for the frontpage view template.
 | 
			
		||||
 *
 | 
			
		||||
 * Available variables:
 | 
			
		||||
 * - attributes: Remaining HTML attributes for the element.
 | 
			
		||||
 * - css_name: A CSS-safe version of the view name.
 | 
			
		||||
 * - css_class: The user-specified classes names, if any.
 | 
			
		||||
 * - header: The optional header.
 | 
			
		||||
 * - footer: The optional footer.
 | 
			
		||||
 * - rows: The results of the view query, if any.
 | 
			
		||||
 * - empty: The content to display if there are no rows.
 | 
			
		||||
 * - pager: The optional pager next/prev links to display.
 | 
			
		||||
 * - exposed: Exposed widget form/info to display.
 | 
			
		||||
 * - feed_icons: Optional feed icons to display.
 | 
			
		||||
 * - more: An optional link to the next page of results.
 | 
			
		||||
 * - title: Title of the view, only used when displaying in the admin preview.
 | 
			
		||||
 * - title_prefix: Additional output populated by modules, intended to be
 | 
			
		||||
 *   displayed in front of the view title.
 | 
			
		||||
 * - title_suffix: Additional output populated by modules, intended to be
 | 
			
		||||
 *   displayed after the view title.
 | 
			
		||||
 * - attachment_before: An optional attachment view to be displayed before the
 | 
			
		||||
 *   view content.
 | 
			
		||||
 * - attachment_after: An optional attachment view to be displayed after the
 | 
			
		||||
 *   view content.
 | 
			
		||||
 * - dom_id: Unique id for every view being printed to give unique class for
 | 
			
		||||
 *   Javascript.
 | 
			
		||||
 *
 | 
			
		||||
 * @see template_preprocess_views_view()
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup themeable
 | 
			
		||||
 */
 | 
			
		||||
#}
 | 
			
		||||
 | 
			
		||||
{%
 | 
			
		||||
  set classes = [
 | 
			
		||||
    'view',
 | 
			
		||||
    'view-' ~ id|clean_class,
 | 
			
		||||
    'view-id-' ~ id,
 | 
			
		||||
    'view-display-id-' ~ display_id,
 | 
			
		||||
    'grid-full',
 | 
			
		||||
    'layout--pass--content-narrow',
 | 
			
		||||
    dom_id ? 'js-view-dom-id-' ~ dom_id,
 | 
			
		||||
  ]
 | 
			
		||||
%}
 | 
			
		||||
<div{{ attributes.addClass(classes) }}>
 | 
			
		||||
  {{ title_prefix }}
 | 
			
		||||
  {% if title %}
 | 
			
		||||
    {{ title }}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {{ title_suffix }}
 | 
			
		||||
  {% if header %}
 | 
			
		||||
    <div class="view-header">
 | 
			
		||||
      {{ header }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if exposed %}
 | 
			
		||||
    <div class="view-filters">
 | 
			
		||||
      {{ exposed }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if attachment_before %}
 | 
			
		||||
    <div class="attachment attachment-before">
 | 
			
		||||
      {{ attachment_before }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
 | 
			
		||||
  {% if rows %}
 | 
			
		||||
    <div class="view-content">
 | 
			
		||||
      {{ rows }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% elseif empty %}
 | 
			
		||||
    {% include '@olivero/includes/get-started.html.twig' %}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
 | 
			
		||||
  {% if pager %}
 | 
			
		||||
    {{ pager }}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if attachment_after %}
 | 
			
		||||
    <div class="attachment attachment-after">
 | 
			
		||||
      {{ attachment_after }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if more %}
 | 
			
		||||
    {{ more }}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if footer %}
 | 
			
		||||
    <div class="view-footer">
 | 
			
		||||
      {{ footer }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
@ -0,0 +1,49 @@
 | 
			
		||||
{#
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Theme override for views to display rows in a grid.
 | 
			
		||||
 *
 | 
			
		||||
 * Available variables:
 | 
			
		||||
 * - attributes: HTML attributes for the wrapping element.
 | 
			
		||||
 * - title: The title of this group of rows.
 | 
			
		||||
 * - view: The view object.
 | 
			
		||||
 * - rows: The rendered view results.
 | 
			
		||||
 * - options: The view plugin style options.
 | 
			
		||||
 *   - row_class_default: A flag indicating whether default classes should be
 | 
			
		||||
 *     used on rows.
 | 
			
		||||
 *   - col_class_default: A flag indicating whether default classes should be
 | 
			
		||||
 *     used on columns.
 | 
			
		||||
 * - items: A list of grid items. Each item contains a list of rows or columns.
 | 
			
		||||
 *   The order in what comes first (row or column) depends on which alignment
 | 
			
		||||
 *   type is chosen (horizontal or vertical).
 | 
			
		||||
 *   - attributes: HTML attributes for each row or column.
 | 
			
		||||
 *   - content: A list of columns or rows. Each row or column contains:
 | 
			
		||||
 *     - attributes: HTML attributes for each row or column.
 | 
			
		||||
 *     - content: The row or column contents.
 | 
			
		||||
 *
 | 
			
		||||
 * @see template_preprocess_views_view_grid()
 | 
			
		||||
 */
 | 
			
		||||
#}
 | 
			
		||||
{{ attach_library('olivero/layout-views-grid') }}
 | 
			
		||||
 | 
			
		||||
{%
 | 
			
		||||
  set classes = [
 | 
			
		||||
    'views-view-grid',
 | 
			
		||||
    'views-view-grid--' ~ options.alignment,
 | 
			
		||||
  ]
 | 
			
		||||
%}
 | 
			
		||||
 | 
			
		||||
{% if title %}
 | 
			
		||||
  <h3>{{ title }}</h3>
 | 
			
		||||
{% endif %}
 | 
			
		||||
<div{{ attributes.addClass(classes).setAttribute('style', '--views-grid--column-count: ' ~ options.columns) }}>
 | 
			
		||||
  {% for row in items %}
 | 
			
		||||
    {% for item in row.content %}
 | 
			
		||||
      <div class="views-view-grid__item">
 | 
			
		||||
        <div class="views-view-grid__item-inner">
 | 
			
		||||
          {{- item.content -}}
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
  {% endfor %}
 | 
			
		||||
</div>
 | 
			
		||||
@ -0,0 +1,121 @@
 | 
			
		||||
{#
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Theme override for implementation of displaying a view as a table.
 | 
			
		||||
 *
 | 
			
		||||
 * Available variables:
 | 
			
		||||
 * - attributes: Remaining HTML attributes for the element.
 | 
			
		||||
 *   - class: HTML classes that can be used to style contextually through CSS.
 | 
			
		||||
 * - title : The title of this group of rows.
 | 
			
		||||
 * - header: The table header columns.
 | 
			
		||||
 *   - attributes: Remaining HTML attributes for the element.
 | 
			
		||||
 *   - content: HTML classes to apply to each header cell, indexed by
 | 
			
		||||
 *   the header's key.
 | 
			
		||||
 *   - default_classes: A flag indicating whether default classes should be
 | 
			
		||||
 *     used.
 | 
			
		||||
 * - caption_needed: Is the caption tag needed.
 | 
			
		||||
 * - caption: The caption for this table.
 | 
			
		||||
 * - accessibility_description: Extended description for the table details.
 | 
			
		||||
 * - accessibility_summary: Summary for the table details.
 | 
			
		||||
 * - rows: Table row items. Rows are keyed by row number.
 | 
			
		||||
 *   - attributes: HTML classes to apply to each row.
 | 
			
		||||
 *   - columns: Row column items. Columns are keyed by column number.
 | 
			
		||||
 *     - attributes: HTML classes to apply to each column.
 | 
			
		||||
 *     - content: The column content.
 | 
			
		||||
 *   - default_classes: A flag indicating whether default classes should be
 | 
			
		||||
 *     used.
 | 
			
		||||
 * - responsive: A flag indicating whether table is responsive.
 | 
			
		||||
 * - sticky: A flag indicating whether table header is sticky.
 | 
			
		||||
 * - summary_element: A render array with table summary information (if any).
 | 
			
		||||
 *
 | 
			
		||||
 * @see template_preprocess_views_view_table()
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup themeable
 | 
			
		||||
 */
 | 
			
		||||
#}
 | 
			
		||||
{%
 | 
			
		||||
  set classes = [
 | 
			
		||||
    'views-table',
 | 
			
		||||
    'cols-' ~ header|length,
 | 
			
		||||
    responsive ? 'responsive-enabled',
 | 
			
		||||
    sticky ? 'sticky-header',
 | 
			
		||||
  ]
 | 
			
		||||
%}
 | 
			
		||||
<table{{ attributes.addClass(classes) }}>
 | 
			
		||||
  {% if caption_needed %}
 | 
			
		||||
    <caption>
 | 
			
		||||
    {% if caption %}
 | 
			
		||||
      {{ caption }}
 | 
			
		||||
    {% else %}
 | 
			
		||||
      {{ title }}
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if (summary_element is not empty) %}
 | 
			
		||||
      {{ summary_element }}
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    </caption>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if header %}
 | 
			
		||||
    <thead>
 | 
			
		||||
      <tr>
 | 
			
		||||
        {% for key, column in header %}
 | 
			
		||||
          {% if column.default_classes %}
 | 
			
		||||
            {%
 | 
			
		||||
              set column_classes = [
 | 
			
		||||
                'views-field',
 | 
			
		||||
                'views-field-' ~ fields[key],
 | 
			
		||||
              ]
 | 
			
		||||
            %}
 | 
			
		||||
          {% endif %}
 | 
			
		||||
          <th{{ column.attributes.addClass(column_classes).setAttribute('scope', 'col') }}>
 | 
			
		||||
            {%- if column.wrapper_element -%}
 | 
			
		||||
              <{{ column.wrapper_element }}>
 | 
			
		||||
                {%- if column.url -%}
 | 
			
		||||
                  <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a>
 | 
			
		||||
                {%- else -%}
 | 
			
		||||
                  {{ column.content }}{{ column.sort_indicator }}
 | 
			
		||||
                {%- endif -%}
 | 
			
		||||
              </{{ column.wrapper_element }}>
 | 
			
		||||
            {%- else -%}
 | 
			
		||||
              {%- if column.url -%}
 | 
			
		||||
                <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a>
 | 
			
		||||
              {%- else -%}
 | 
			
		||||
                {{- column.content }}{{ column.sort_indicator }}
 | 
			
		||||
              {%- endif -%}
 | 
			
		||||
            {%- endif -%}
 | 
			
		||||
          </th>
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
      </tr>
 | 
			
		||||
    </thead>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  <tbody>
 | 
			
		||||
    {% for row in rows %}
 | 
			
		||||
      <tr{{ row.attributes }}>
 | 
			
		||||
        {% for key, column in row.columns %}
 | 
			
		||||
          {% if column.default_classes %}
 | 
			
		||||
            {%
 | 
			
		||||
              set column_classes = [
 | 
			
		||||
                'views-field'
 | 
			
		||||
              ]
 | 
			
		||||
            %}
 | 
			
		||||
            {% for field in column.fields %}
 | 
			
		||||
              {% set column_classes = column_classes|merge(['views-field-' ~ field]) %}
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
          {% endif %}
 | 
			
		||||
          <td{{ column.attributes.addClass(column_classes) }}>
 | 
			
		||||
            {%- if column.wrapper_element -%}
 | 
			
		||||
              <{{ column.wrapper_element }}>
 | 
			
		||||
              {% for content in column.content %}
 | 
			
		||||
                {{ content.separator }}{{ content.field_output }}
 | 
			
		||||
              {% endfor %}
 | 
			
		||||
              </{{ column.wrapper_element }}>
 | 
			
		||||
            {%- else -%}
 | 
			
		||||
              {% for content in column.content %}
 | 
			
		||||
                {{- content.separator }}{{ content.field_output -}}
 | 
			
		||||
              {% endfor %}
 | 
			
		||||
            {%- endif %}
 | 
			
		||||
          </td>
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
      </tr>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
  </tbody>
 | 
			
		||||
</table>
 | 
			
		||||
							
								
								
									
										95
									
								
								web/core/themes/olivero/templates/views/views-view.html.twig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										95
									
								
								web/core/themes/olivero/templates/views/views-view.html.twig
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,95 @@
 | 
			
		||||
{#
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Theme override for a main view template.
 | 
			
		||||
 *
 | 
			
		||||
 * Available variables:
 | 
			
		||||
 * - attributes: Remaining HTML attributes for the element.
 | 
			
		||||
 * - css_name: A CSS-safe version of the view name.
 | 
			
		||||
 * - css_class: The user-specified classes names, if any.
 | 
			
		||||
 * - header: The optional header.
 | 
			
		||||
 * - footer: The optional footer.
 | 
			
		||||
 * - rows: The results of the view query, if any.
 | 
			
		||||
 * - empty: The content to display if there are no rows.
 | 
			
		||||
 * - pager: The optional pager next/prev links to display.
 | 
			
		||||
 * - exposed: Exposed widget form/info to display.
 | 
			
		||||
 * - feed_icons: Optional feed icons to display.
 | 
			
		||||
 * - more: An optional link to the next page of results.
 | 
			
		||||
 * - title: Title of the view, only used when displaying in the admin preview.
 | 
			
		||||
 * - title_prefix: Additional output populated by modules, intended to be
 | 
			
		||||
 *   displayed in front of the view title.
 | 
			
		||||
 * - title_suffix: Additional output populated by modules, intended to be
 | 
			
		||||
 *   displayed after the view title.
 | 
			
		||||
 * - attachment_before: An optional attachment view to be displayed before the
 | 
			
		||||
 *   view content.
 | 
			
		||||
 * - attachment_after: An optional attachment view to be displayed after the
 | 
			
		||||
 *   view content.
 | 
			
		||||
 * - dom_id: Unique id for every view being printed to give unique class for
 | 
			
		||||
 *   Javascript.
 | 
			
		||||
 *
 | 
			
		||||
 * @see template_preprocess_views_view()
 | 
			
		||||
 */
 | 
			
		||||
#}
 | 
			
		||||
{%
 | 
			
		||||
  set classes = [
 | 
			
		||||
    'view',
 | 
			
		||||
    'view-' ~ id|clean_class,
 | 
			
		||||
    'view-id-' ~ id,
 | 
			
		||||
    'view-display-id-' ~ display_id,
 | 
			
		||||
    dom_id ? 'js-view-dom-id-' ~ dom_id,
 | 
			
		||||
  ]
 | 
			
		||||
%}
 | 
			
		||||
<div{{ attributes.addClass(classes) }}>
 | 
			
		||||
  {{ title_prefix }}
 | 
			
		||||
  {% if title %}
 | 
			
		||||
    {{ title }}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {{ title_suffix }}
 | 
			
		||||
  {% if header %}
 | 
			
		||||
    <div class="view-header">
 | 
			
		||||
      {{ header }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if exposed %}
 | 
			
		||||
    <div class="view-filters">
 | 
			
		||||
      {{ exposed }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if attachment_before %}
 | 
			
		||||
    <div class="attachment attachment-before">
 | 
			
		||||
      {{ attachment_before }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
 | 
			
		||||
  {% if rows %}
 | 
			
		||||
    <div class="view-content">
 | 
			
		||||
      {{ rows }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% elseif empty %}
 | 
			
		||||
    <div class="view-empty">
 | 
			
		||||
      {{ empty }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
 | 
			
		||||
  {% if pager %}
 | 
			
		||||
    {{ pager }}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if attachment_after %}
 | 
			
		||||
    <div class="attachment attachment-after">
 | 
			
		||||
      {{ attachment_after }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if more %}
 | 
			
		||||
    {{ more }}
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if footer %}
 | 
			
		||||
    <div class="view-footer">
 | 
			
		||||
      {{ footer }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if feed_icons %}
 | 
			
		||||
    <div class="feed-icons">
 | 
			
		||||
      {{ feed_icons }}
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
</div>
 | 
			
		||||
		Reference in New Issue
	
	Block a user