annotate core/themes/stable/templates/admin/system-themes-page.html.twig @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 {#
Chris@0 2 /**
Chris@0 3 * @file
Chris@0 4 * Theme override for the Appearance page.
Chris@0 5 *
Chris@0 6 * Available variables:
Chris@0 7 * - attributes: HTML attributes for the main container.
Chris@0 8 * - theme_groups: A list of theme groups. Each theme group contains:
Chris@0 9 * - attributes: HTML attributes specific to this theme group.
Chris@0 10 * - title: Title for the theme group.
Chris@0 11 * - state: State of the theme group, e.g. installed or uninstalled.
Chris@0 12 * - themes: A list of themes within the theme group. Each theme contains:
Chris@0 13 * - attributes: HTML attributes specific to this theme.
Chris@0 14 * - screenshot: A screenshot representing the theme.
Chris@0 15 * - description: Description of the theme.
Chris@0 16 * - name: Theme name.
Chris@0 17 * - version: The theme's version number.
Chris@0 18 * - is_default: Boolean indicating whether the theme is the default theme
Chris@0 19 * or not.
Chris@0 20 * - is_admin: Boolean indicating whether the theme is the admin theme or
Chris@0 21 * not.
Chris@0 22 * - notes: Identifies what context this theme is being used in, e.g.,
Chris@0 23 * default theme, admin theme.
Chris@0 24 * - incompatible: Text describing any compatibility issues.
Chris@0 25 * - operations: A list of operation links, e.g., Settings, Enable, Disable,
Chris@0 26 * etc. these links should only be displayed if the theme is compatible.
Chris@0 27 *
Chris@0 28 * @see template_preprocess_system_themes_page()
Chris@0 29 */
Chris@0 30 #}
Chris@0 31 <div{{ attributes }}>
Chris@0 32 {% for theme_group in theme_groups %}
Chris@0 33 {%
Chris@0 34 set theme_group_classes = [
Chris@0 35 'system-themes-list',
Chris@0 36 'system-themes-list-' ~ theme_group.state,
Chris@0 37 'clearfix',
Chris@0 38 ]
Chris@0 39 %}
Chris@0 40 <div{{ theme_group.attributes.addClass(theme_group_classes) }}>
Chris@0 41 <h2 class="system-themes-list__header">{{ theme_group.title }}</h2>
Chris@0 42 {% for theme in theme_group.themes %}
Chris@0 43 {%
Chris@0 44 set theme_classes = [
Chris@0 45 theme.is_default ? 'theme-default',
Chris@0 46 theme.is_admin ? 'theme-admin',
Chris@0 47 'theme-selector',
Chris@0 48 'clearfix',
Chris@0 49 ]
Chris@0 50 %}
Chris@0 51 <div{{ theme.attributes.addClass(theme_classes) }}>
Chris@0 52 {% if theme.screenshot %}
Chris@0 53 {{ theme.screenshot }}
Chris@0 54 {% endif %}
Chris@0 55 <div class="theme-info">
Chris@0 56 <h3 class="theme-info__header">
Chris@0 57 {{- theme.name }} {{ theme.version -}}
Chris@0 58 {% if theme.notes %}
Chris@0 59 ({{ theme.notes|safe_join(', ') }})
Chris@0 60 {%- endif -%}
Chris@0 61 </h3>
Chris@0 62 <div class="theme-info__description">{{ theme.description }}</div>
Chris@0 63 {# Display operation links if the theme is compatible. #}
Chris@0 64 {% if theme.incompatible %}
Chris@0 65 <div class="incompatible">{{ theme.incompatible }}</div>
Chris@0 66 {% else %}
Chris@0 67 {{ theme.operations }}
Chris@0 68 {% endif %}
Chris@0 69 </div>
Chris@0 70 </div>
Chris@0 71 {% endfor %}
Chris@0 72 </div>
Chris@0 73 {% endfor %}
Chris@0 74 </div>