Commit d7f5a1ae authored by alexpott's avatar alexpott

Issue #1987426 by shanethehat, Cottser, intergalactic overlords, mr.baileys:...

Issue #1987426 by shanethehat, Cottser, intergalactic overlords, mr.baileys: Convert maintenance-page.tpl.php to Twig.
parent 5b2afa0e
...@@ -3069,18 +3069,19 @@ function theme_get_suggestions($args, $base, $delimiter = '__') { ...@@ -3069,18 +3069,19 @@ function theme_get_suggestions($args, $base, $delimiter = '__') {
} }
/** /**
* Process variables for maintenance-page.tpl.php. * Prepare variables for maintenance page templates.
*
* Default template: maintenance-page.html.twig.
* *
* The variables array generated here is a mirror of * The variables array generated here is a mirror of
* template_preprocess_page(). This preprocessor will run its course when * template_preprocess_page(). This preprocessor will run its course when
* theme_maintenance_page() is invoked. An alternate template file of * theme_maintenance_page() is invoked. An alternate template file of
* maintenance-page--offline.tpl.php can be used when the database is offline to * maintenance-page--offline.html.twig can be used when the database is offline
* hide errors and completely replace the content. * to hide errors and completely replace the content.
*
* The $variables array contains the following arguments:
* - $content
* *
* @see maintenance-page.tpl.php * @param array $variables
* An associative array containing:
* - content - An array of page content.
*/ */
function template_preprocess_maintenance_page(&$variables) { function template_preprocess_maintenance_page(&$variables) {
global $theme; global $theme;
...@@ -3178,7 +3179,7 @@ function template_preprocess_maintenance_page(&$variables) { ...@@ -3178,7 +3179,7 @@ function template_preprocess_maintenance_page(&$variables) {
* The variables array generated here is a mirror of template_process_html(). * The variables array generated here is a mirror of template_process_html().
* This processor will run its course when theme_maintenance_page() is invoked. * This processor will run its course when theme_maintenance_page() is invoked.
* *
* @see maintenance-page.tpl.php * @see maintenance-page.html.twig
* @see template_process_html() * @see template_process_html()
*/ */
function template_process_maintenance_page(&$variables) { function template_process_maintenance_page(&$variables) {
......
...@@ -497,7 +497,7 @@ function overlay_preprocess_html(&$variables) { ...@@ -497,7 +497,7 @@ function overlay_preprocess_html(&$variables) {
} }
/** /**
* Implements hook_preprocess_HOOK() for maintenance-page.tpl.php. * Implements hook_preprocess_HOOK() for maintenance-page.html.twig.
* *
* If the current page request is inside the overlay, add appropriate classes * If the current page request is inside the overlay, add appropriate classes
* to the <body> element, and simplify the page title. * to the <body> element, and simplify the page title.
......
<?php {#
/** /**
* @file * @file
* Default theme implementation to display a single Drupal page while offline. * 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. * All the available variables are mirrored in html.html.twig and
* page.html.twig.
* Some may be blank but they are provided for consistency. * Some may be blank but they are provided for consistency.
* *
* @see template_preprocess() * @see template_preprocess()
...@@ -12,80 +12,77 @@ ...@@ -12,80 +12,77 @@
* *
* @ingroup themeable * @ingroup themeable
*/ */
?> #}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->langcode ?>" lang="<?php print $language->langcode ?>" dir="<?php print $language->dir ?>"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{ language.langcode }}" lang="{{ language.langcode }}" dir="{{ language.dir }}">
<head> <head>
<title><?php print $head_title; ?></title> <title>{{ head_title }}</title>
<?php print $head; ?> {{ head }}
<?php print $styles; ?> {{ styles }}
<?php print $scripts; ?> {{ scripts }}
</head> </head>
<body class="<?php print $attributes['class']; ?>"> <body class="{{ attributes.class }}">
<div id="page"> <div id="page">
<div id="header"> <div id="header">
<div id="logo-title"> <div id="logo-title">
{% if logo %}
<?php if (!empty($logo)): ?> <a href="{{ base_path }}" title="{{ 'Home'|t }}" rel="home" id="logo">
<a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo"> <img src="{{ logo }}" alt="{{ 'Home'|t }}" />
<img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
</a> </a>
<?php endif; ?> {% endif %}
<div id="name-and-slogan"> <div id="name-and-slogan">
<?php if (!empty($site_name)): ?> {% if site_name %}
<h1 id="site-name"> <h1 id="site-name">
<a href="<?php print $base_path ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a> <a href="{{ base_path }}" title="{{ 'Home'|t }}" rel="home"><span>{{ site_name }}</span></a>
</h1> </h1>
<?php endif; ?> {% endif %}
{% if site_slogan %}
<?php if (!empty($site_slogan)): ?> <div id="site-slogan">{{ site_slogan }}</div>
<div id="site-slogan"><?php print $site_slogan; ?></div> {% endif %}
<?php endif; ?>
</div> <!-- /name-and-slogan --> </div> <!-- /name-and-slogan -->
</div> <!-- /logo-title --> </div> <!-- /logo-title -->
<?php if (!empty($header)): ?> {% if header %}
<div id="header-region"> <div id="header-region">
<?php print $header; ?> {{ header }}
</div> </div>
<?php endif; ?> {% endif %}
</div> <!-- /header --> </div> <!-- /header -->
<div id="container" class="clearfix"> <div id="container" class="clearfix">
<?php if (!empty($sidebar_first)): ?> {% if sidebar_first %}
<div id="sidebar-first" class="column sidebar"> <div id="sidebar-first" class="column sidebar">
<?php print $sidebar_first; ?> {{ sidebar_first }}
</div> <!-- /sidebar-first --> </div> <!-- /sidebar-first -->
<?php endif; ?> {% endif %}
<div id="main" class="column"><div id="main-squeeze"> <div id="main" class="column"><div id="main-squeeze">
<div id="content"> <div id="content">
<?php if (!empty($title)): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?> {% if title %}<h1 class="title" id="page-title">{{ title }}</h1>{% endif %}
<?php if (!empty($messages)): print $messages; endif; ?> {% if messages %}{{ messages }}{% endif %}
<div id="content-content" class="clearfix"> <div id="content-content" class="clearfix">
<?php print $content; ?> {{ content }}
</div> <!-- /content-content --> </div> <!-- /content-content -->
</div> <!-- /content --> </div> <!-- /content -->
</div></div> <!-- /main-squeeze /main --> </div></div> <!-- /main-squeeze /main -->
<?php if (!empty($sidebar_second)): ?> {% if sidebar_second %}
<div id="sidebar-second" class="column sidebar"> <div id="sidebar-second" class="column sidebar">
<?php print $sidebar_second; ?> {{ sidebar_second }}
</div> <!-- /sidebar-second --> </div> <!-- /sidebar-second -->
<?php endif; ?> {% endif %}
</div> <!-- /container --> </div> <!-- /container -->
<div id="footer-wrapper"> <div id="footer-wrapper">
<div id="footer"> <div id="footer">
<?php if (!empty($footer)): print $footer; endif; ?> {% if footer %}{{ footer }}{% endif %}
</div> <!-- /footer --> </div> <!-- /footer -->
</div> <!-- /footer-wrapper --> </div> <!-- /footer-wrapper -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment