default services conflit ?

This commit is contained in:
armansansd
2022-04-27 11:30:43 +02:00
parent 28190a5749
commit 8bb1064a3b
8132 changed files with 900138 additions and 426 deletions

View File

@@ -0,0 +1,8 @@
{% for breakpoint in breakpoints %}
{{ machine_name }}.{{ breakpoint.breakpoint_name }}:
label: {{ breakpoint.breakpoint_label }}
mediaQuery: '{{ breakpoint.breakpoint_media_query }}'
weight: '{{ breakpoint.breakpoint_weight }}'
multipliers:
- '{{ breakpoint.breakpoint_multipliers }}'
{% endfor %}

View File

@@ -0,0 +1,35 @@
name: {{ theme }}
type: {{ type }}
description: '{{ description }}'
package: {{ package }}
core: {{ core }}
libraries:
- {{ machine_name }}/{{ global_library }}
{% if libraries %}
{% for library in libraries %}
- {{ machine_name }}/{{ library.library_name }}
{% endfor %}
{% endif %}
base theme: {{ base_theme }}
{% if base_theme == 'classy' %}
#Using Classy as a base theme https://www.drupal.org/theme-guide/8/classy
{% endif %}
{% if regions or base_theme_regions is iterable %}
regions:
{% if base_theme_regions is iterable %}
{% for key, default_regions in base_theme_regions %}
{{ key }}: {{ default_regions }}
{% endfor %}
{% endif %}
{% for region in regions %}
{{ region.region_machine_name }}: {{ region.region_name }}
{% endfor %}
{% endif %}
{% if base_theme_regions_hidden is defined and base_theme_regions_hidden is not null %}
regions_hidden:
{% for default_regions_hidden in base_theme_regions_hidden %}
- {{ default_regions_hidden }}
{% endfor %}
{% endif %}

View File

@@ -0,0 +1,16 @@
{{ global_library }}:
version: 1.0
css:
theme:
#css/your_style_sheet.css : {}
js:
#js/your_js.js : {}
{% for library in libraries %}
{{ library.library_name }}:
version: {{ library.library_version }}
css:
theme:
#js/your_js.js : {}
js:
#js/your_js.js : {}
{% endfor %}

View File

@@ -0,0 +1,145 @@
<?php
/**
* @file
* Functions to support theming in the {{ machine_name }} theme.
*/
/**
* Implements hook_preprocess_HOOK() for html.html.twig.
*/
function {{ machine_name }}_preprocess_html(array &$variables) {
/* Add class to html tag */
//$variables['html_attributes']->addClass('no-js');
// Don't display the site name twice on the front page (and potentially others)
/*if (isset($variables['head_title_array']['title']) && isset($variables['head_title_array']['name']) && ($variables['head_title_array']['title'] == $variables['head_title_array']['name'])) {
$variables['head_title'] = $variables['head_title_array']['name'];
}*/
}
/**
* Implements hook_page_attachments_alter().
*/
function {{ machine_name }}_page_attachments_alter(array &$page) {
// Tell IE to use latest rendering engine (not to use compatibility mode).
/*$ie_edge = [
'#type' => 'html_tag',
'#tag' => 'meta',
'#attributes' => [
'http-equiv' => 'X-UA-Compatible',
'content' => 'IE=edge',
],
];
$page['#attached']['html_head'][] = [$ie_edge, 'ie_edge'];*/
}
/**
* Implements hook_preprocess_page() for page.html.twig.
*/
function {{ machine_name }}_preprocess_page(array &$variables) {
}
/**
* Implements hook_theme_suggestions_page_alter().
*/
function {{ machine_name }}_theme_suggestions_page_alter(array &$suggestions, array $variables) {
}
/**
* Implements hook_theme_suggestions_node_alter().
*/
function {{ machine_name }}_theme_suggestions_node_alter(array &$suggestions, array $variables) {
/*$node = $variables['elements']['#node'];
if ($variables['elements']['#view_mode'] == "full") {
}*/
}
/**
* Implements hook_preprocess_HOOK() for Block document templates.
*/
function {{ machine_name }}_preprocess_block(array &$variables) {
}
/**
* Implements hook_theme_suggestions_field_alter().
*/
function {{ machine_name }}_theme_suggestions_field_alter(array &$suggestions, array $variables) {
/*$element = $variables['element'];
$suggestions[] = 'field__' . $element['#view_mode'];
$suggestions[] = 'field__' . $element['#view_mode'] . '__' . $element['#field_name'];*/
}
/**
* Implements hook_theme_suggestions_field_alter().
*/
function {{ machine_name }}_theme_suggestions_fieldset_alter(array &$suggestions, array $variables) {
/*$element = $variables['element'];
if (isset($element['#attributes']['class']) && in_array('form-composite', $element['#attributes']['class'])) {
$suggestions[] = 'fieldset__form_composite';
}*/
}
/**
* Implements hook_preprocess_node().
*/
function {{ machine_name }}_preprocess_node(array &$variables) {
// Default to turning off byline/submitted.
//$variables['display_submitted'] = FALSE;
}
/**
* Implements hook_theme_suggestions_views_view_alter().
*/
function {{ machine_name }}_theme_suggestions_views_view_alter(array &$suggestions, array $variables) {
}
/**
* Implements hook_preprocess_form().
*/
function {{ machine_name }}_preprocess_form(array &$variables) {
//$variables['attributes']['novalidate'] = 'novalidate';
}
/**
* Implements hook_preprocess_select().
*/
function {{ machine_name }}_preprocess_select(array &$variables) {
//$variables['attributes']['class'][] = 'select-chosen';
}
/**
* Implements hook_preprocess_field().
*/
function {{ machine_name }}_preprocess_field(array &$variables, $hook) {
/*switch ($variables['element']['#field_name']) {
}*/
}
/**
* Implements hook_preprocess_details().
*/
function {{ machine_name }}_preprocess_details(array &$variables) {
/*$variables['attributes']['class'][] = 'details';
$variables['summary_attributes']['class'] = 'summary';*/
}
/**
* Implements hook_theme_suggestions_details_alter().
*/
function {{ machine_name }}_theme_suggestions_details_alter(array &$suggestions, array $variables) {
}
/**
* Implements hook_preprocess_menu_local_task().
*/
function {{ machine_name }}_preprocess_menu_local_task(array &$variables) {
//$variables['element']['#link']['url']->setOption('attributes', ['class'=>'rounded']);
}