rdrew
2 years ago
7 changed files with 30 additions and 78 deletions
File diff suppressed because one or more lines are too long
@ -1,23 +0,0 @@
|
||||
<?php |
||||
/** |
||||
* @file |
||||
* Template for a 1 column panel layout. |
||||
* |
||||
* This template provides a very simple "one column" panel display layout. |
||||
* |
||||
* Variables: |
||||
* - $css_id: An optional CSS ID. |
||||
* - $id_attribute: The whole id="$css_id" string. |
||||
* - $content: An array of content, each item in the array is keyed to one |
||||
* panel of the layout. This layout supports the following sections: |
||||
* $content['middle']: The only panel in the layout. |
||||
*/ |
||||
?> |
||||
<section class="grid-x <?php print $panel_classes; ?>"<?php print $panel_id; ?>>
|
||||
<div class="cell medium-4 diy_side"> |
||||
<?php print $content['side']; ?> |
||||
</div> |
||||
<div class="cell medium-8 diy_content"> |
||||
<?php print $content['content']; ?> |
||||
</div> |
||||
</section> |
@ -1,39 +0,0 @@
|
||||
<?php |
||||
/** |
||||
* @file |
||||
* Define the a single-column style plugin. |
||||
*/ |
||||
|
||||
// Plugin definition. |
||||
$plugin = array( |
||||
'title' => t('DIY layout'), |
||||
'category' => t('Rob Custom'), |
||||
'icon' => 'onecol_clean.png', |
||||
'theme' => 'diy_layout', |
||||
'regions' => array( |
||||
'side' => t('Side'), |
||||
'content' => t('Content') |
||||
|
||||
)); |
||||
|
||||
/** |
||||
* Prepares variables for panels_onecol_clean templates. |
||||
* |
||||
* Default template: panels-onecol-clean.tpl.php. |
||||
* |
||||
* @param array $variables |
||||
* An associative array containing: |
||||
* - $content: An array of content, each item in the array is keyed to one |
||||
* panel of the layout. |
||||
*/ |
||||
function template_preprocess_diy_layout(&$variables) { |
||||
// Construct an ID/Class attributes. |
||||
$variables['panel_classes'] = 'panel-display diy-layout clearfix'; |
||||
if ($variables['css_id']) { |
||||
$variables['panel_id'] = ' id="' . $variables['css_id'] . '"'; |
||||
$variables['panel_classes'] .= ' ' . $variables['css_id']; |
||||
} |
||||
else { |
||||
$variables['panel_id'] = ''; |
||||
} |
||||
} |
Before Width: | Height: | Size: 122 B |
After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in new issue