| Hašek’s Voice Preserved |
|
|
| What the Apparatus Reveals |
|
|
| Why Švejk Matters |
|
|
|
The Video Scripts
|
/** * @file * Functions to support theming in the Bartik theme. */ use Drupal\Component\Utility\Html; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\StringTranslation\ByteSizeMarkup; use Drupal\Core\Template\Attribute; use Drupal\views\Form\ViewsForm; /** * Implements hook_preprocess_HOOK() for HTML document templates. * * Adds body classes if certain regions have content. */ function bartik_preprocess_html(&$variables) { // Add information about the number of sidebars. if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) { $variables['attributes']['class'][] = 'layout-two-sidebars'; } elseif (!empty($variables['page']['sidebar_first'])) { $variables['attributes']['class'][] = 'layout-one-sidebar'; $variables['attributes']['class'][] = 'layout-sidebar-first'; } elseif (!empty($variables['page']['sidebar_second'])) { $variables['attributes']['class'][] = 'layout-one-sidebar'; $variables['attributes']['class'][] = 'layout-sidebar-second'; } else { $variables['attributes']['class'][] = 'layout-no-sidebars'; } if (!empty($variables['page']['featured_top'])) { $variables['attributes']['class'][] = 'has-featured-top'; } } /** * Implements hook_preprocess_HOOK() for page title templates. */ function bartik_preprocess_page_title(&$variables) { // Since the title and the shortcut link are both block level elements, // positioning them next to each other is much simpler with a wrapper div. if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) { // Add a wrapper div using the title_prefix and title_suffix render // elements. $variables['title_prefix']['shortcut_wrapper'] = [ '#markup' => '
| Hašek’s Voice Preserved |
|
|
| What the Apparatus Reveals |
|
|
| Why Švejk Matters |
|
|
|
The Video Scripts
|