Commit 3d24449a authored by alexpott's avatar alexpott

Issue #1938848 by Jaesin, Cottser, jenlampton, hefox, Shawn DeArmond, frob,...

Issue #1938848 by Jaesin, Cottser, jenlampton, hefox, Shawn DeArmond, frob, boze, joelpittet, mrf, dcrocks: seven.theme - Convert PHPTemplate templates to Twig.
parent 8f7dc88d
......@@ -6,12 +6,12 @@
*/
/**
* Implements hook_preprocess_HOOK() for maintenance-page.tpl.php.
* Implements hook_preprocess_HOOK() for maintenance-page.html.twig.
*/
function seven_preprocess_maintenance_page(&$vars) {
// While markup for normal pages is split into page.tpl.php and html.tpl.php,
// the markup for the maintenance page is all in the single
// maintenance-page.tpl.php template. So, to have what's done in
// maintenance-page.html.twig template. So, to have what's done in
// seven_preprocess_html() also happen on the maintenance page, it has to be
// called here.
seven_preprocess_html($vars);
......
<?php
{#
/**
* @file
* Seven's theme implementation to display a single Drupal page while offline.
*
* All of the available variables are mirrored in page.tpl.php.
* All of the available variables are mirrored in page.html.twig.
*
* @see template_preprocess()
* @see template_preprocess_maintenance_page()
......@@ -12,50 +11,46 @@
*
* @ingroup themeable
*/
?>
#}
<!DOCTYPE html>
<html lang="<?php print $language->langcode ?>" dir="<?php print $language->dir ?>">
<html 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{{ attributes }}>
<?php print $page_top; ?>
{{ page_top }}
<header id="branding">
<?php if ($title): ?><h1 class="page-title"><?php print $title; ?></h1><?php endif; ?>
{% if title %}<h1 class="page-title">{{ title }}</h1>{% endif %}
</header>
<div id="page">
<div id="sidebar-first" class="sidebar">
<?php if ($logo): ?>
<img id="logo" src="<?php print $logo ?>" alt="<?php print $site_name ?>" />
<?php endif; ?>
<?php if ($sidebar_first): ?>
<?php print $sidebar_first ?>
<?php endif; ?>
{% if logo %}
<img id="logo" src="{{ logo }}" alt="{{ site_name }}" />
{% endif %}
{{ sidebar_first }}
</div>
<main id="content" class="clearfix">
<?php if ($messages): ?>
<div id="console"><?php print $messages; ?></div>
<?php endif; ?>
<?php if ($help): ?>
{% if messages %}
<div id="console">{{ messages }}</div>
{% endif %}
{% if help %}
<div id="help">
<?php print $help; ?>
{{ help }}
</div>
<?php endif; ?>
<?php print $content; ?>
{% endif %}
{{ content }}
</main>
</div>
<footer role="contentinfo">
<?php print $page_bottom; ?>
{{ page_bottom }}
</footer>
</body>
......
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