Projet

Général

Profil

Paste
Télécharger (1,26 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / adaptivetheme / at_core / layouts / core / one_col_stack / one_col_stack.inc @ 74f6bef0

1
<?php
2

    
3
/**
4
 * @file
5
 * Implimentation of a Page Layout Plugin for Adaptivetheme.
6
 *
7
 * @see three_col_grail.inc for detailed documentation.
8
 */
9
function one_col_stack() {
10
  $page_layout['one_col_stack'] = array(
11
    'title'    => t('One Column Stacked'),
12
    'category' => t('AT Core layout'),
13
    'method'   => 'one_col_stack',
14
    'type'     => 'page_layout',
15
    'device_groups' => array(
16
      'tablet_portrait',
17
      'smalltouch_landscape',
18
     ),
19
  );
20

    
21
  return $page_layout;
22
}
23

    
24
/**
25
 * CSS Builder for the one_col_stack layout.
26
 * Note: this is the only layout for smalltouch portrait, and for mobile first.
27
 * All columns and regions are 100% width, stacked.
28
 *
29
 * @param $sidebar_first, an arbitary numeric value.
30
 * @param $sidebar_second, an arbitary numeric value.
31
 * @param $sidebar_unit, a value unit, one of px, em or %.
32
 */
33
function one_col_stack_layout($sidebar_first, $sidebar_second, $sidebar_unit) {
34
  $styles = <<<EOF
35
div#content-column,div.content-inner,.sidebar-first div.content-inner,.sidebar-second div.content-inner,.two-sidebars div.content-inner,div.sidebar,.sidebar-first div.sidebar,.sidebar-second div.sidebar,.two-sidebars div.sidebar,div.region .block {float:none;clear:both;display:block;width:100%;margin-left:0;margin-right:0}
36
EOF;
37

    
38
  return $styles;
39
}