diff --git a/themes/vartheme_admin/templates/install/install-page.html.twig b/themes/vartheme_admin/templates/install/install-page.html.twig index 7591dbd33ad66e582a079fab821a74161fbbd8ec..e3ca6b98bdb54127995d3eacdaef758ad2f9edf5 100644 --- a/themes/vartheme_admin/templates/install/install-page.html.twig +++ b/themes/vartheme_admin/templates/install/install-page.html.twig @@ -13,8 +13,13 @@ <header role="banner"> {% if site_name %} - <h1 class="page-title"> + {% if profile_logo %} + <img src="{{ profile_logo }}" class="installer-logo"> + {% else %} <img src="../{{ active_theme_path() }}/images/varbase-medium-logo.png" class="installer-logo"> + {% endif %} + + <h1 class="page-title"> {% if site_version %} <span class="site-version">{{ site_version }}</span> {% endif %} diff --git a/themes/vartheme_admin/vartheme.theme b/themes/vartheme_admin/vartheme.theme deleted file mode 100644 index 6d1cb3339e26a0c2ff4477692e2d2676ac63d4b7..0000000000000000000000000000000000000000 --- a/themes/vartheme_admin/vartheme.theme +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/** - * @file - * Varbase Vartheme admin. - * - * Have custom alteration over the theme layer. - */ - -/** - * Implements hook_theme_suggestions_HOOK_alter(). - */ -function vartheme_admin_theme_suggestions_page_alter(array &$suggestions, array $variables) { - if ($node = \Drupal::routeMatch()->getParameter('node')) { - $content_type = $node->bundle(); - $suggestions[] = 'page__' . $content_type; - } -} diff --git a/themes/vartheme_admin/vartheme_admin.theme b/themes/vartheme_admin/vartheme_admin.theme new file mode 100644 index 0000000000000000000000000000000000000000..fff241d4d0f6ff740187bb2acd58e805b5df7091 --- /dev/null +++ b/themes/vartheme_admin/vartheme_admin.theme @@ -0,0 +1,31 @@ +<?php + +/** + * @file + * Varbase Vartheme admin. + * + * Have custom alteration over the theme layer. + */ + +/** + * Implements hook_theme_suggestions_HOOK_alter(). + */ +function vartheme_admin_theme_suggestions_page_alter(array &$suggestions, array $variables) { + if ($node = \Drupal::routeMatch()->getParameter('node')) { + $content_type = $node->bundle(); + $suggestions[] = 'page__' . $content_type; + } +} + +/** + * Implements hook_preprocess_install_page(). + */ +function vartheme_admin_preprocess_install_page(&$variables) { + $current_profile_path = drupal_get_path('profile', drupal_get_profile()); + // Profile logo. + if (file_exists($current_profile_path . '/images/' . drupal_get_profile() . '-logo.png')){ + $variables['profile_logo'] = base_path() . $current_profile_path . '/images/' . drupal_get_profile() . '-logo.png'; + } + // Attach install page library. + $variables['#attached']['library'][] = drupal_get_profile() . '/install_page'; +}