Browse Source

lots of headaches later

master
Josh Fabean 4 years ago
parent
commit
492b8473b4
21 changed files with 6 additions and 997 deletions
  1. +6
    -5
      docroot/modules/custom/koality_theme/src/Generator/KoalityThemeGenerator.php
  2. +0
    -0
      docroot/modules/custom/koality_theme/templates/theme/breakpoints.yml.twig
  3. +0
    -0
      docroot/modules/custom/koality_theme/templates/theme/info.yml.twig
  4. +0
    -0
      docroot/modules/custom/koality_theme/templates/theme/libraries.yml.twig
  5. +0
    -0
      docroot/modules/custom/koality_theme/templates/theme/theme.twig
  6. +0
    -13
      docroot/themes/custom/my_cool_test_theme/my_cool_test_theme.info.yml
  7. +0
    -145
      docroot/themes/custom/my_cool_test_theme/my_cool_test_theme.theme
  8. +0
    -9
      docroot/themes/custom/test1/test1.info.yml
  9. +0
    -145
      docroot/themes/custom/test1/test1.theme
  10. +0
    -10
      docroot/themes/custom/test2/test2.info.yml
  11. +0
    -7
      docroot/themes/custom/test2/test2.libraries.yml
  12. +0
    -145
      docroot/themes/custom/test2/test2.theme
  13. +0
    -14
      docroot/themes/custom/test4/test4.info.yml
  14. +0
    -14
      docroot/themes/custom/test4/test4.libraries.yml
  15. +0
    -145
      docroot/themes/custom/test4/test4.theme
  16. +0
    -14
      docroot/themes/custom/tests3/tests3.info.yml
  17. +0
    -14
      docroot/themes/custom/tests3/tests3.libraries.yml
  18. +0
    -145
      docroot/themes/custom/tests3/tests3.theme
  19. +0
    -13
      docroot/themes/custom/testv/testv.info.yml
  20. +0
    -14
      docroot/themes/custom/testv/testv.libraries.yml
  21. +0
    -145
      docroot/themes/custom/testv/testv.theme

+ 6
- 5
docroot/modules/custom/koality_theme/src/Generator/KoalityThemeGenerator.php View File

@ -4,14 +4,11 @@ namespace Drupal\koality_theme\Generator;
use Drupal\Console\Core\Generator\Generator;
use Drupal\Console\Extension\Manager;
use Drupal\Console\Generator\AuthenticationProviderGenerator;
use Drupal\Component\Serialization\Yaml;
use Drupalfinder\DrupalFinder;
/**
* Class KoalityThemeGenerator.
*
* @package Drupal\Console\Generator
*/
class KoalityThemeGenerator extends Generator {
@ -38,7 +35,6 @@ class KoalityThemeGenerator extends Generator {
public function generate(array $parameters) {
$dir = $parameters['dir'];
$breakpoints = $parameters['breakpoints'];
$libraries = $parameters['libraries'];
$machine_name = $parameters['machine_name'];
$parameters['type'] = 'theme';
@ -78,6 +74,11 @@ class KoalityThemeGenerator extends Generator {
}
$themePath = $dir . '/' . $machine_name;
$drupalFinder = new DrupalFinder();
$drupalFinder->locateRoot();
$module_template_dir = drupal_get_path('module', 'koality_theme') . '/templates/';
$this->addSkeletonDir('/var/www/docroot/' . $module_template_dir);
$test = '';
$this->renderFile(
'theme/info.yml.twig',


+ 0
- 0
docroot/modules/custom/koality_theme/templates/theme/breakpoints.yml.twig View File


+ 0
- 0
docroot/modules/custom/koality_theme/templates/theme/info.yml.twig View File


+ 0
- 0
docroot/modules/custom/koality_theme/templates/theme/libraries.yml.twig View File


+ 0
- 0
docroot/modules/custom/koality_theme/templates/theme/theme.twig View File


+ 0
- 13
docroot/themes/custom/my_cool_test_theme/my_cool_test_theme.info.yml View File

@ -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

+ 0
- 145
docroot/themes/custom/my_cool_test_theme/my_cool_test_theme.theme View File

@ -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']);
}

+ 0
- 9
docroot/themes/custom/test1/test1.info.yml View File

@ -1,9 +0,0 @@
name: test1
type: theme
description: 'My Awesome theme'
package: Other
core: 8.x
libraries:
- test1/global-styling
base theme: stable

+ 0
- 145
docroot/themes/custom/test1/test1.theme View File

@ -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']);
}

+ 0
- 10
docroot/themes/custom/test2/test2.info.yml View File

@ -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

+ 0
- 7
docroot/themes/custom/test2/test2.libraries.yml View File

@ -1,7 +0,0 @@
global:
version: 1.0
css:
theme:
#css/your_style_sheet.css : {}
js:
#js/your_js.js : {}

+ 0
- 145
docroot/themes/custom/test2/test2.theme View File

@ -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']);
}

+ 0
- 14
docroot/themes/custom/test4/test4.info.yml View File

@ -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

+ 0
- 14
docroot/themes/custom/test4/test4.libraries.yml View File

@ -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 : {}

+ 0
- 145
docroot/themes/custom/test4/test4.theme View File

@ -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']);
}

+ 0
- 14
docroot/themes/custom/tests3/tests3.info.yml View File

@ -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

+ 0
- 14
docroot/themes/custom/tests3/tests3.libraries.yml View File

@ -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 : {}

+ 0
- 145
docroot/themes/custom/tests3/tests3.theme View File

@ -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']);
}

+ 0
- 13
docroot/themes/custom/testv/testv.info.yml View File

@ -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

+ 0
- 14
docroot/themes/custom/testv/testv.libraries.yml View File

@ -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 : {}

+ 0
- 145
docroot/themes/custom/testv/testv.theme View File

@ -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']);
}

Loading…
Cancel
Save