Commit 99e6cef6 authored by webchick's avatar webchick

Issue #1814520 by seutje, DesignDolphin, Stalski, JohnAlbin, jenlampton,...

Issue #1814520 by seutje, DesignDolphin, Stalski, JohnAlbin, jenlampton, swentel: Create 2 basic sample layouts: 1-col and 2-col.
parent 2a7bf62f
<?php
/**
* @file
* Template for a 1 column layout.
*
* This template provides a simple one column display layout.
*
* Variables:
* - $content: An array of content, each item in the array is keyed to one
* region of the layout. This layout supports only one section:
* - $content['content']: Content in the content column.
*/
?>
<div class="layout-display layout-one-col <?php print $attributes['class']; ?>"<?php print $attributes; ?>>
<div class="layout-region">
<?php print $content['content']; ?>
</div>
</div>
title: One column
category: Columns: 1
template: one-col
regions:
content: 'Content'
/* Large resolutions (desktop, tablets in landscape, ...) */
@media only screen and (min-width: 59em) {
.layout-two-col .layout-region {
float: right;
}
}
/* Large resolutions (desktop, tablets in landscape, ...) */
@media only screen and (min-width: 59em) {
.layout-two-col .layout-region {
float: left; /* LTR */
width: 50%;
}
}
<?php
/**
* @file
* Template for a 2 column layout.
*
* This template provides a two column display layout, with each column equal in
* width.
*
* Variables:
* - $content: An array of content, each item in the array is keyed to one
* region of the layout. This layout supports the following sections:
* - $content['first']: Content in the first column.
* - $content['second']: Content in the second column.
*/
?>
<div class="layout-display layout-two-col clearfix <?php print $attributes['class']; ?>"<?php print $attributes; ?>>
<div class="layout-region layout-col-first">
<?php print $content['first']; ?>
</div>
<div class="layout-region layout-col-second">
<?php print $content['second']; ?>
</div>
</div>
title: Two column
category: Columns: 2
template: two-col
stylesheets:
- two-col.css
- two-col-rtl.css
regions:
first: 'First column'
second: 'Second column'
......@@ -37,7 +37,7 @@ function testDerivatives() {
$definitions = $manager->getDefinitions();
$this->assertTrue(is_array($definitions), 'Definitions found.');
$this->assertTrue(count($definitions) == 2, 'Two definitions available.');
$this->assertTrue(count($definitions) == 4, 'Four definitions available.');
$this->assertTrue(isset($definitions['static_layout:layout_test__one-col']), 'One column layout found.');
$this->assertTrue(isset($definitions['static_layout:layout_test_theme__two-col']), 'Two column layout found.');
......
......@@ -9,6 +9,7 @@
* Implementation of hook_menu().
*/
function layout_test_menu() {
$items = array();
$items['layout-test'] = array(
'title' => 'Layout test',
'page callback' => 'layout_test_page',
......
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