diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 225def2..bc23e5a 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -907,7 +907,7 @@ function install_display_output($output, $install_state) { // Let the theming function know when every step of the installation has // been completed. $active_task = $install_state['installation_finished'] ? NULL : $install_state['active_task']; - drupal_add_region_content('sidebar_first', theme('task_list', array('items' => install_tasks_to_display($install_state), 'active' => $active_task))); + drupal_add_region_content('sidebar_first', theme('task_list', array('items' => install_tasks_to_display($install_state), 'active' => $active_task, 'variant' => 'install'))); } print theme('install_page', array('content' => $output)); exit; diff --git a/core/includes/install.inc b/core/includes/install.inc index f27df7e..ab251e0 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -95,7 +95,7 @@ function drupal_install_profile_distribution_name() { // installation state (it might not be saved anywhere yet). if (drupal_installation_attempted()) { global $install_state; - return $install_state['profile_info']['distribution_name']; + return isset($install_state['profile_info']['distribution_name']) ? $install_state['profile_info']['distribution_name'] : 'Drupal'; } // At all other times, we load the profile via standard methods. else { diff --git a/core/includes/theme.inc b/core/includes/theme.inc index a3f967a..5c7a085 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -387,6 +387,45 @@ function _theme_save_registry($theme, $registry) { } /** + * Adds mobile friendly meta tags to the head of the HTML page. + */ +function _theme_add_mobile_meta_tags() { + $elements = array( + 'MobileOptimized' => array( + '#tag' => 'meta', + '#attributes' => array( + 'name' => 'MobileOptimized', + 'content' => 'width', + ), + ), + 'HandheldFriendly' => array( + '#tag' => 'meta', + '#attributes' => array( + 'name' => 'HandheldFriendly', + 'content' => 'true', + ), + ), + 'viewport' => array( + '#tag' => 'meta', + '#attributes' => array( + 'name' => 'viewport', + 'content' => 'width=device-width', + ), + ), + 'cleartype' => array( + '#tag' => 'meta', + '#attributes' => array( + 'http-equiv' => 'cleartype', + 'content' => 'on', + ), + ), + ); + foreach ($elements as $name => $element) { + drupal_add_html_head($element, $name); + } +} + +/** * Forces the system to rebuild the theme registry. * * This function should be called when modules are added to the system, or when @@ -3129,14 +3168,44 @@ function template_process_maintenance_page(&$variables) { } /** - * Preprocess variables for region.tpl.php + * Prepare variables for install page templates. + * + * Default template: install-page.html.twig + * + * @param array $variables + * An associative array containing: + * - @todo + * + * @see template_preprocess_maintenance_page() + */ +function template_preprocess_install_page(&$variables) { + template_preprocess_maintenance_page($variables); + // Override the site name that is displayed on the page, since Drupal is + // still in the process of being installed. + $variables['site_name'] = drupal_install_profile_distribution_name(); +} + +/** + * Preprocess variables for install-page.tpl.php. + * + * @see install-page.html.twig + * @see template_process_html() + * @todo Remove this function. + */ +function template_process_install_page(&$variables) { + template_process_maintenance_page($variables); +} + +/** + * Prepare variables for region templates. * - * Prepares the values passed to the theme_region function to be passed into a - * pluggable template engine. Uses the region name to generate a template file - * suggestions. If none are found, the default region.tpl.php is used. + * Default template: region.html.twig + * + * @param array $variables + * An associative array containing: + * - elements: @todo * * @see drupal_region_class() - * @see region.tpl.php */ function template_preprocess_region(&$variables) { // Create the $content variable that templates expect. @@ -3239,10 +3308,11 @@ function drupal_common_theme() { 'template' => 'maintenance-page', ), 'install_page' => array( - 'variables' => array('content' => NULL), + 'variables' => array('content' => NULL, 'show_messages' => TRUE), + 'template' => 'install-page', ), 'task_list' => array( - 'variables' => array('items' => NULL, 'active' => NULL), + 'variables' => array('items' => NULL, 'active' => NULL, 'variant' => NULL), ), 'authorize_message' => array( 'variables' => array('message' => NULL, 'success' => TRUE), diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc index b9a513c..09b731d 100644 --- a/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -115,6 +115,7 @@ function _theme_load_offline_registry($theme, $base_theme = NULL, $theme_engine * An associative array containing: * - items: An associative array of maintenance tasks. * - active: The key for the currently active maintenance task. + * - variant: A variant name to be used for a CSS class * * @ingroup themeable */ @@ -122,10 +123,16 @@ function theme_task_list($variables) { $t = get_t(); $items = $variables['items']; $active = $variables['active']; + if(isset($variables['variant'])) { + $class = $variables['variant'] . '-task-list'; + } + else { + $class = 'task-list'; + } $done = isset($items[$active]) || $active == NULL; $output = '

Installation tasks

'; - $output .= '
    '; + $output .= '
      '; foreach ($items as $k => $item) { if ($active == $k) { @@ -148,20 +155,6 @@ function theme_task_list($variables) { } /** - * Returns HTML for the installation page. - * - * Note: this function is not themeable. - * - * @param $variables - * An associative array containing: - * - content: The page content to show. - */ -function theme_install_page($variables) { - drupal_add_http_header('Content-Type', 'text/html; charset=utf-8'); - return theme('maintenance_page', $variables); -} - -/** * Returns HTML for a results report of an operation run by authorize.php. * * @param $variables diff --git a/core/modules/system/css/system.maintenance.css b/core/modules/system/css/system.maintenance.css index ae3bc99..61f50ea 100644 --- a/core/modules/system/css/system.maintenance.css +++ b/core/modules/system/css/system.maintenance.css @@ -45,8 +45,27 @@ } /** - * Installation task list + * Installer styles */ .task-list li.active { font-weight: bold; } + +.maintenance-background { + background-color: #1275b2; + background-image: + url('images/noise-low.png'), + -webkit-radial-gradient( hsl(203, 80%, 45%), hsl(203, 80%, 32%) ); + background-image: + url('images/noise-low.png'), + -moz-radial-gradient( hsl(203, 80%, 45%), hsl(203, 80%, 32%) ); + background-image: + url('images/noise-low.png'), + -o-radial-gradient( hsl(203, 80%, 45%), hsl(203, 80%, 32%) ); + background-image: + url('images/noise-low.png'), + radial-gradient( hsl(203, 80%, 45%), hsl(203, 80%, 32%) ); + background-repeat: repeat, no-repeat; + background-position: left top, 50% 50%; + min-height: 100%; +} \ No newline at end of file diff --git a/core/modules/system/templates/install-page.html.twig b/core/modules/system/templates/install-page.html.twig new file mode 100644 index 0000000..28fb993 --- /dev/null +++ b/core/modules/system/templates/install-page.html.twig @@ -0,0 +1,84 @@ +{# +/** + * @file + * Default theme implementation to display a single Drupal page while offline. + * + * All the available variables are mirrored in html.tpl.php and page.tpl.php. + * Some may be blank but they are provided for consistency. + * + * @see template_preprocess() + * @see template_preprocess_maintenance_page() + * + * @ingroup themeable + */ +#} + + + + {{ head_title }} + {{ head }} + {{ styles }} + {{ scripts }} + + +
      + + +
      + + {% if sidebar_first %} + + {% endif %} + +
      + +
      + {% if title %}

      {{ title }}

      {% endif %} + {% if messages %}{{ messages }}{% endif %} +
      + {{ content }} +
      +
      + +
      + + {% if sidebar_second %} + + {% endif %} + +
      + + + +
      + + diff --git a/core/themes/seven/images/noise-low.png b/core/themes/seven/images/noise-low.png new file mode 100644 index 0000000..105bee1 --- /dev/null +++ b/core/themes/seven/images/noise-low.png @@ -0,0 +1,30 @@ +PNG + + IHDR1|PLTEQ tRNS   +LwIDATx^7WcSܥl0L)KRƄ)f"S ϔ~/h\z^Q+ZĀ +lPohKa-cR1Bk؊lCk$RKQ f9?Kc~%Mu]T`W &E yva=Ӥ,K¼2Jq;Gd, +uHjVufPpnfX‰4p:k$5[U@j,vpPʁR?钕 +-sS .Kt _q/+v2mZN!ʪ*F@הn:9J1 j%ɪ2؊y\UXBڹ%6{hJXJ-=lcH9;g7bUӌ2X 77 4@Z\C+z"U##ďiGǗ.hjDV\ ?6S QU"J +tG9kMZ1mHGwޡ;%%CԢqfV>6UC`C:læ`Ilrhu3F9raKIUfr`io5IW͒Bj3+^9뱄Ak:c6K瞥I"UEP֖\z()=C!s_|:ѐ'Us8 м\= &.ag0x mGGH +Ph(uK;R[!fnMJUbu)2nQVa4{n<6ɶ0f0 %UP55AO|be,kjU՟#Pкjj¹=Ξn{3e.J|R[ z2$˜E!6ęՉpXGt7օI\ߩTEjsm=k!R8Uċ@M# `ᱜ;gZrX܀ Po:px+\BJ8Z GK =f19I$h-}%LJ b~!4@C/l—͈WAfPmk"MZX +:YP׹By~?Z)yCZ-a GC=UO NÜ]?-Ffo!d湻#¶dž_,1ݼQ->9=!YEHQّ0e8MzEf'p5; 3 +8o SxO< e})x]T N`Ѱ + N@%f; "t@3bhqޤ+9ϴ?5d4O9$Pݡ$tQÈ&[bQ: 6Mʌ)t+\ _˔gJ&k~~^9L ] ~ڰTsZS$OGCnymhu}0ԥP$v(_=raa;.mHE7MZʗ{;o#fc'8$3ؤ{z=9vj +̣mB̺4`Mv 8)}TlS[2|3K|>5NBC2jƿ!j #1--4Fv]oi(&QـcceC9uL3⫯_8/C RbcG OYD~+'B1ly3⎦v=A G/@{{ڙE'Bk|蹢ThGK/ג/Nf*W랜-Mj6+6טxi,M er;טw.58NJﵲ5m9cQHpvytFW߱hL-Bሌ"G ӊ4I+C-.X-"@7NI!pZu} bC^8(LQwN q ,w\*gc^y@/ 2er(/bKh>;^qU\ PzW* U!얘O@ ǝ&$@ԋ)|$$:!D<N@*u)zy`m^eG?DYƣW3MZU6sn3^]L#9^{kgboOT\"\pXK?[OO_hv^8<)T +骒"Gz.Ui_+Wy l=a yf԰t;}V_㫶|"wLWtMvB={*&뱘BZ"L_a9bQ-8'[|lnGUXe}LT}ajZ\4SVS\=DYxY2y0P1ߺ/h{'1rm +U7?#NrZZ* +mM `sBXmAY.c`1mm.-P"{{71޹ r|EYMq+b=`^_!Pok GhX?'3Vy[esJ-d8@gf u=7d-K1Ml`< V.h΋ib(UtЮUos[v@slvq{DamP}v.<[DfF +J%+{^RvTh4`Μi +(@tzudR)ԗr\$kw7ĂFg-}xK!cы[kCBr0) 8{}b_M>t+ҁ+AVr h}$SV0=M^._-dI7*GfQzXX7Js2<ܧ!VQXX7dc%t䣚DZf +i8';P[(t14kw623 +@9N ?Mbxvz8"&؆nvyRg} ޲Z|V_5 0"`_+8Na+i˜1I 'TJ\DkLw@B CSS_AGGREGATE_THEME)); + $variables['attributes']['class'][] = 'install-page'; } /** diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css index 9611ad6..73d7502 100644 --- a/core/themes/seven/style.css +++ b/core/themes/seven/style.css @@ -920,7 +920,6 @@ body.in-maintenance #sidebar-first { } body.in-maintenance #content { float: right; /* LTR */ - max-width: 550px; clear: none; width: 72%; } @@ -959,41 +958,25 @@ body.in-maintenance #logo { width: auto; } } -ol.task-list { + +.task-list { margin-left: 0; /* LTR */ list-style-type: none; list-style-image: none; } -ol.task-list li { +.task-list li { padding: 0.5em 1em 0.5em 20px; /* LTR */ color: #adadad; } -ol.task-list li.active { +.task-list li.active { background: transparent url(images/task-item.png) no-repeat 3px 50%; /* LTR */ padding: 0.5em 1em 0.5em 20px; /* LTR */ color: #000; } -ol.task-list li.done { +.task-list li.done { background: transparent url(images/task-check.png) no-repeat 0 50%; color: green; } -body.in-maintenance #branding .step-indicator { - display: none; -} -@media all and (max-width: 768px) { - ol.task-list, - body.in-maintenance #logo { - display: none; - } - body.in-maintenance #branding h1 { - float: left; - width: auto; - } - body.in-maintenance #branding .step-indicator { - display: block; - float: right; - } -} /* Overlay theming */ .overlay #branding { @@ -1675,7 +1658,6 @@ details.fieldset-no-legend { } } - /** * Node form dropbuttons. */ diff --git a/core/themes/seven/templates/maintenance-page.html.twig b/core/themes/seven/templates/maintenance-page.html.twig index 02af912..25c22aa 100644 --- a/core/themes/seven/templates/maintenance-page.html.twig +++ b/core/themes/seven/templates/maintenance-page.html.twig @@ -13,7 +13,7 @@ */ #} - + {{ head_title }} {{ head }}