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 = '__') {
}
/**
* 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
* template_preprocess_page(). This preprocessor will run its course when
* theme_maintenance_page() is invoked. An alternate template file of
* maintenance-page--offline.tpl.php can be used when the database is offline to
* hide errors and completely replace the content.
*
* The $variables array contains the following arguments:
* - $content
* maintenance-page--offline.html.twig can be used when the database is offline
* to hide errors and completely replace the 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) {
global $theme;
......@@ -3178,7 +3179,7 @@ function template_preprocess_maintenance_page(&$variables) {
* The variables array generated here is a mirror of template_process_html().
* 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()
*/
function template_process_maintenance_page(&$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
* to the <body> element, and simplify the page title.
......
<?php
{#
/**
* @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.
* All the available variables are mirrored in html.html.twig and
* page.html.twig.
* Some may be blank but they are provided for consistency.
*
* @see template_preprocess()
......@@ -12,80 +12,77 @@
*
* @ingroup themeable
*/
?>
#}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"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>
<title><?php print $head_title; ?></title>
<?php print $head; ?>
<?php print $styles; ?>
<?php print $scripts; ?>
<title>{{ head_title }}</title>
{{ head }}
{{ styles }}
{{ scripts }}
</head>
<body class="<?php print $attributes['class']; ?>">
<body class="{{ attributes.class }}">
<div id="page">
<div id="header">
<div id="logo-title">
<?php if (!empty($logo)): ?>
<a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
<img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
{% if logo %}
<a href="{{ base_path }}" title="{{ 'Home'|t }}" rel="home" id="logo">
<img src="{{ logo }}" alt="{{ 'Home'|t }}" />
</a>
<?php endif; ?>
{% endif %}
<div id="name-and-slogan">
<?php if (!empty($site_name)): ?>
{% if 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>
<?php endif; ?>
<?php if (!empty($site_slogan)): ?>
<div id="site-slogan"><?php print $site_slogan; ?></div>
<?php endif; ?>
{% endif %}
{% if site_slogan %}
<div id="site-slogan">{{ site_slogan }}</div>
{% endif %}
</div> <!-- /name-and-slogan -->
</div> <!-- /logo-title -->
<?php if (!empty($header)): ?>
{% if header %}
<div id="header-region">
<?php print $header; ?>
{{ header }}
</div>
<?php endif; ?>
{% endif %}
</div> <!-- /header -->
<div id="container" class="clearfix">
<?php if (!empty($sidebar_first)): ?>
{% if sidebar_first %}
<div id="sidebar-first" class="column sidebar">
<?php print $sidebar_first; ?>
{{ sidebar_first }}
</div> <!-- /sidebar-first -->
<?php endif; ?>
{% endif %}
<div id="main" class="column"><div id="main-squeeze">
<div id="content">
<?php if (!empty($title)): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
<?php if (!empty($messages)): print $messages; endif; ?>
{% if title %}<h1 class="title" id="page-title">{{ title }}</h1>{% endif %}
{% if messages %}{{ messages }}{% endif %}
<div id="content-content" class="clearfix">
<?php print $content; ?>
{{ content }}
</div> <!-- /content-content -->
</div> <!-- /content -->
</div></div> <!-- /main-squeeze /main -->
<?php if (!empty($sidebar_second)): ?>
{% if sidebar_second %}
<div id="sidebar-second" class="column sidebar">
<?php print $sidebar_second; ?>
{{ sidebar_second }}
</div> <!-- /sidebar-second -->
<?php endif; ?>
{% endif %}
</div> <!-- /container -->
<div id="footer-wrapper">
<div id="footer">
<?php if (!empty($footer)): print $footer; endif; ?>
{% if footer %}{{ footer }}{% endif %}
</div> <!-- /footer -->
</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