@ -1,13 +0,0 @@ | |||||
name: My Cool Test Theme | |||||
type: theme | |||||
description: 'Its a theme' | |||||
package: Other | |||||
core: 8.x | |||||
libraries: | |||||
- my_cool_test_theme/global-styling | |||||
base theme: classy | |||||
#Using Classy as a base theme https://www.drupal.org/theme-guide/8/classy | |||||
regions: | |||||
header: Header |
@ -1,145 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @file | |||||
* Functions to support theming in the my_cool_test_theme theme. | |||||
*/ | |||||
/** | |||||
* Implements hook_preprocess_HOOK() for html.html.twig. | |||||
*/ | |||||
function my_cool_test_theme_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 my_cool_test_theme_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 my_cool_test_theme_preprocess_page(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_page_alter(). | |||||
*/ | |||||
function my_cool_test_theme_theme_suggestions_page_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_node_alter(). | |||||
*/ | |||||
function my_cool_test_theme_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 my_cool_test_theme_preprocess_block(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_field_alter(). | |||||
*/ | |||||
function my_cool_test_theme_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 my_cool_test_theme_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 my_cool_test_theme_preprocess_node(array &$variables) { | |||||
// Default to turning off byline/submitted. | |||||
//$variables['display_submitted'] = FALSE; | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_views_view_alter(). | |||||
*/ | |||||
function my_cool_test_theme_theme_suggestions_views_view_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_form(). | |||||
*/ | |||||
function my_cool_test_theme_preprocess_form(array &$variables) { | |||||
//$variables['attributes']['novalidate'] = 'novalidate'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_select(). | |||||
*/ | |||||
function my_cool_test_theme_preprocess_select(array &$variables) { | |||||
//$variables['attributes']['class'][] = 'select-chosen'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_field(). | |||||
*/ | |||||
function my_cool_test_theme_preprocess_field(array &$variables, $hook) { | |||||
/*switch ($variables['element']['#field_name']) { | |||||
}*/ | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_details(). | |||||
*/ | |||||
function my_cool_test_theme_preprocess_details(array &$variables) { | |||||
/*$variables['attributes']['class'][] = 'details'; | |||||
$variables['summary_attributes']['class'] = 'summary';*/ | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_details_alter(). | |||||
*/ | |||||
function my_cool_test_theme_theme_suggestions_details_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_menu_local_task(). | |||||
*/ | |||||
function my_cool_test_theme_preprocess_menu_local_task(array &$variables) { | |||||
//$variables['element']['#link']['url']->setOption('attributes', ['class'=>'rounded']); | |||||
} |
@ -1,9 +0,0 @@ | |||||
name: test1 | |||||
type: theme | |||||
description: 'My Awesome theme' | |||||
package: Other | |||||
core: 8.x | |||||
libraries: | |||||
- test1/global-styling | |||||
base theme: stable |
@ -1,145 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @file | |||||
* Functions to support theming in the test1 theme. | |||||
*/ | |||||
/** | |||||
* Implements hook_preprocess_HOOK() for html.html.twig. | |||||
*/ | |||||
function test1_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 test1_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 test1_preprocess_page(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_page_alter(). | |||||
*/ | |||||
function test1_theme_suggestions_page_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_node_alter(). | |||||
*/ | |||||
function test1_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 test1_preprocess_block(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_field_alter(). | |||||
*/ | |||||
function test1_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 test1_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 test1_preprocess_node(array &$variables) { | |||||
// Default to turning off byline/submitted. | |||||
//$variables['display_submitted'] = FALSE; | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_views_view_alter(). | |||||
*/ | |||||
function test1_theme_suggestions_views_view_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_form(). | |||||
*/ | |||||
function test1_preprocess_form(array &$variables) { | |||||
//$variables['attributes']['novalidate'] = 'novalidate'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_select(). | |||||
*/ | |||||
function test1_preprocess_select(array &$variables) { | |||||
//$variables['attributes']['class'][] = 'select-chosen'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_field(). | |||||
*/ | |||||
function test1_preprocess_field(array &$variables, $hook) { | |||||
/*switch ($variables['element']['#field_name']) { | |||||
}*/ | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_details(). | |||||
*/ | |||||
function test1_preprocess_details(array &$variables) { | |||||
/*$variables['attributes']['class'][] = 'details'; | |||||
$variables['summary_attributes']['class'] = 'summary';*/ | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_details_alter(). | |||||
*/ | |||||
function test1_theme_suggestions_details_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_menu_local_task(). | |||||
*/ | |||||
function test1_preprocess_menu_local_task(array &$variables) { | |||||
//$variables['element']['#link']['url']->setOption('attributes', ['class'=>'rounded']); | |||||
} |
@ -1,10 +0,0 @@ | |||||
name: test2 | |||||
type: theme | |||||
description: 'My Awesome theme' | |||||
package: Other | |||||
core: 8.x | |||||
libraries: | |||||
- test2/global | |||||
base theme: classy | |||||
#Using Classy as a base theme https://www.drupal.org/theme-guide/8/classy |
@ -1,7 +0,0 @@ | |||||
global: | |||||
version: 1.0 | |||||
css: | |||||
theme: | |||||
#css/your_style_sheet.css : {} | |||||
js: | |||||
#js/your_js.js : {} |
@ -1,145 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @file | |||||
* Functions to support theming in the test2 theme. | |||||
*/ | |||||
/** | |||||
* Implements hook_preprocess_HOOK() for html.html.twig. | |||||
*/ | |||||
function test2_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 test2_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 test2_preprocess_page(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_page_alter(). | |||||
*/ | |||||
function test2_theme_suggestions_page_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_node_alter(). | |||||
*/ | |||||
function test2_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 test2_preprocess_block(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_field_alter(). | |||||
*/ | |||||
function test2_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 test2_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 test2_preprocess_node(array &$variables) { | |||||
// Default to turning off byline/submitted. | |||||
//$variables['display_submitted'] = FALSE; | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_views_view_alter(). | |||||
*/ | |||||
function test2_theme_suggestions_views_view_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_form(). | |||||
*/ | |||||
function test2_preprocess_form(array &$variables) { | |||||
//$variables['attributes']['novalidate'] = 'novalidate'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_select(). | |||||
*/ | |||||
function test2_preprocess_select(array &$variables) { | |||||
//$variables['attributes']['class'][] = 'select-chosen'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_field(). | |||||
*/ | |||||
function test2_preprocess_field(array &$variables, $hook) { | |||||
/*switch ($variables['element']['#field_name']) { | |||||
}*/ | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_details(). | |||||
*/ | |||||
function test2_preprocess_details(array &$variables) { | |||||
/*$variables['attributes']['class'][] = 'details'; | |||||
$variables['summary_attributes']['class'] = 'summary';*/ | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_details_alter(). | |||||
*/ | |||||
function test2_theme_suggestions_details_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_menu_local_task(). | |||||
*/ | |||||
function test2_preprocess_menu_local_task(array &$variables) { | |||||
//$variables['element']['#link']['url']->setOption('attributes', ['class'=>'rounded']); | |||||
} |
@ -1,14 +0,0 @@ | |||||
name: test4 | |||||
type: theme | |||||
description: 'My Awesome theme' | |||||
package: Other | |||||
core: 8.x | |||||
libraries: | |||||
- test4/global | |||||
- test4/another | |||||
base theme: classy | |||||
#Using Classy as a base theme https://www.drupal.org/theme-guide/8/classy | |||||
regions: | |||||
content: Content |
@ -1,14 +0,0 @@ | |||||
global: | |||||
version: 1.0 | |||||
css: | |||||
theme: | |||||
#css/your_style_sheet.css : {} | |||||
js: | |||||
#js/your_js.js : {} | |||||
another: | |||||
version: 1.0 | |||||
css: | |||||
theme: | |||||
#js/your_js.js : {} | |||||
js: | |||||
#js/your_js.js : {} |
@ -1,145 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @file | |||||
* Functions to support theming in the test4 theme. | |||||
*/ | |||||
/** | |||||
* Implements hook_preprocess_HOOK() for html.html.twig. | |||||
*/ | |||||
function test4_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 test4_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 test4_preprocess_page(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_page_alter(). | |||||
*/ | |||||
function test4_theme_suggestions_page_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_node_alter(). | |||||
*/ | |||||
function test4_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 test4_preprocess_block(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_field_alter(). | |||||
*/ | |||||
function test4_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 test4_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 test4_preprocess_node(array &$variables) { | |||||
// Default to turning off byline/submitted. | |||||
//$variables['display_submitted'] = FALSE; | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_views_view_alter(). | |||||
*/ | |||||
function test4_theme_suggestions_views_view_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_form(). | |||||
*/ | |||||
function test4_preprocess_form(array &$variables) { | |||||
//$variables['attributes']['novalidate'] = 'novalidate'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_select(). | |||||
*/ | |||||
function test4_preprocess_select(array &$variables) { | |||||
//$variables['attributes']['class'][] = 'select-chosen'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_field(). | |||||
*/ | |||||
function test4_preprocess_field(array &$variables, $hook) { | |||||
/*switch ($variables['element']['#field_name']) { | |||||
}*/ | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_details(). | |||||
*/ | |||||
function test4_preprocess_details(array &$variables) { | |||||
/*$variables['attributes']['class'][] = 'details'; | |||||
$variables['summary_attributes']['class'] = 'summary';*/ | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_details_alter(). | |||||
*/ | |||||
function test4_theme_suggestions_details_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_menu_local_task(). | |||||
*/ | |||||
function test4_preprocess_menu_local_task(array &$variables) { | |||||
//$variables['element']['#link']['url']->setOption('attributes', ['class'=>'rounded']); | |||||
} |
@ -1,14 +0,0 @@ | |||||
name: tests3 | |||||
type: theme | |||||
description: 'My Awesome theme' | |||||
package: Other | |||||
core: 8.x | |||||
libraries: | |||||
- tests3/global | |||||
- tests3/another | |||||
base theme: classy | |||||
#Using Classy as a base theme https://www.drupal.org/theme-guide/8/classy | |||||
regions: | |||||
content: Content |
@ -1,14 +0,0 @@ | |||||
global: | |||||
version: 1.0 | |||||
css: | |||||
theme: | |||||
#css/your_style_sheet.css : {} | |||||
js: | |||||
#js/your_js.js : {} | |||||
another: | |||||
version: 1.0 | |||||
css: | |||||
theme: | |||||
#js/your_js.js : {} | |||||
js: | |||||
#js/your_js.js : {} |
@ -1,145 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @file | |||||
* Functions to support theming in the tests3 theme. | |||||
*/ | |||||
/** | |||||
* Implements hook_preprocess_HOOK() for html.html.twig. | |||||
*/ | |||||
function tests3_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 tests3_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 tests3_preprocess_page(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_page_alter(). | |||||
*/ | |||||
function tests3_theme_suggestions_page_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_node_alter(). | |||||
*/ | |||||
function tests3_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 tests3_preprocess_block(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_field_alter(). | |||||
*/ | |||||
function tests3_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 tests3_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 tests3_preprocess_node(array &$variables) { | |||||
// Default to turning off byline/submitted. | |||||
//$variables['display_submitted'] = FALSE; | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_views_view_alter(). | |||||
*/ | |||||
function tests3_theme_suggestions_views_view_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_form(). | |||||
*/ | |||||
function tests3_preprocess_form(array &$variables) { | |||||
//$variables['attributes']['novalidate'] = 'novalidate'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_select(). | |||||
*/ | |||||
function tests3_preprocess_select(array &$variables) { | |||||
//$variables['attributes']['class'][] = 'select-chosen'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_field(). | |||||
*/ | |||||
function tests3_preprocess_field(array &$variables, $hook) { | |||||
/*switch ($variables['element']['#field_name']) { | |||||
}*/ | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_details(). | |||||
*/ | |||||
function tests3_preprocess_details(array &$variables) { | |||||
/*$variables['attributes']['class'][] = 'details'; | |||||
$variables['summary_attributes']['class'] = 'summary';*/ | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_details_alter(). | |||||
*/ | |||||
function tests3_theme_suggestions_details_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_menu_local_task(). | |||||
*/ | |||||
function tests3_preprocess_menu_local_task(array &$variables) { | |||||
//$variables['element']['#link']['url']->setOption('attributes', ['class'=>'rounded']); | |||||
} |
@ -1,13 +0,0 @@ | |||||
name: testv | |||||
type: theme | |||||
description: 'My Awesome theme' | |||||
package: Other | |||||
core: 8.x | |||||
libraries: | |||||
- testv/global | |||||
- testv/blog | |||||
base theme: stable | |||||
regions: | |||||
content: Content |
@ -1,14 +0,0 @@ | |||||
global: | |||||
version: 1.0 | |||||
css: | |||||
theme: | |||||
#css/your_style_sheet.css : {} | |||||
js: | |||||
#js/your_js.js : {} | |||||
blog: | |||||
version: 1.0 | |||||
css: | |||||
theme: | |||||
#js/your_js.js : {} | |||||
js: | |||||
#js/your_js.js : {} |
@ -1,145 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @file | |||||
* Functions to support theming in the testv theme. | |||||
*/ | |||||
/** | |||||
* Implements hook_preprocess_HOOK() for html.html.twig. | |||||
*/ | |||||
function testv_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 testv_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 testv_preprocess_page(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_page_alter(). | |||||
*/ | |||||
function testv_theme_suggestions_page_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_node_alter(). | |||||
*/ | |||||
function testv_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 testv_preprocess_block(array &$variables) { | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_field_alter(). | |||||
*/ | |||||
function testv_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 testv_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 testv_preprocess_node(array &$variables) { | |||||
// Default to turning off byline/submitted. | |||||
//$variables['display_submitted'] = FALSE; | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_views_view_alter(). | |||||
*/ | |||||
function testv_theme_suggestions_views_view_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_form(). | |||||
*/ | |||||
function testv_preprocess_form(array &$variables) { | |||||
//$variables['attributes']['novalidate'] = 'novalidate'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_select(). | |||||
*/ | |||||
function testv_preprocess_select(array &$variables) { | |||||
//$variables['attributes']['class'][] = 'select-chosen'; | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_field(). | |||||
*/ | |||||
function testv_preprocess_field(array &$variables, $hook) { | |||||
/*switch ($variables['element']['#field_name']) { | |||||
}*/ | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_details(). | |||||
*/ | |||||
function testv_preprocess_details(array &$variables) { | |||||
/*$variables['attributes']['class'][] = 'details'; | |||||
$variables['summary_attributes']['class'] = 'summary';*/ | |||||
} | |||||
/** | |||||
* Implements hook_theme_suggestions_details_alter(). | |||||
*/ | |||||
function testv_theme_suggestions_details_alter(array &$suggestions, array $variables) { | |||||
} | |||||
/** | |||||
* Implements hook_preprocess_menu_local_task(). | |||||
*/ | |||||
function testv_preprocess_menu_local_task(array &$variables) { | |||||
//$variables['element']['#link']['url']->setOption('attributes', ['class'=>'rounded']); | |||||
} |