/* Clearfix fix to prevent padding at bottom of page. FML */
.clearfix:after {
- content: "";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
font-size: 0;
}
function alpha_regions($key) {
$output = &drupal_static(__FUNCTION__);
- if (!isset($output[$key])) {
+ if (!isset($output[$key])) {
$regions = system_region_list($key);
$zones = alpha_zones($key);
$exclude = alpha_regions_exclude();
),
);
+ foreach (alpha_toggle() as $item => $title) {
+ $settings[$key]['toggle'][$item] = alpha_theme_get_setting('alpha_toggle_' . $item, $key, TRUE);
+ }
+
foreach (array('narrow', 'normal', 'wide') as $type) {
$settings[$key]['responsive'][$type]['css'] = is_array($settings[$key]['responsive'][$type]['css']) ? $settings[$key]['responsive'][$type]['css'] : array();
}
}
return $styles;
+}
+
+function alpha_toggle() {
+ return array(
+ 'messages' => t('Messages'),
+ 'action_links' => t('Action links'),
+ 'tabs' => t('Tabs'),
+ 'breadcrumb' => t('Breadcrumb'),
+ 'page_title' => t('Page title'),
+ 'feed_icons' => t('Feed icons'),
+ );
}
\ No newline at end of file
$optional = alpha_css_options($theme);
$responsive = alpha_css_options($theme, TRUE);
$exclude = alpha_exclude_options($theme);
+ $toggle = alpha_toggle();
$form['alpha_settings'] = array(
'#type' => 'vertical_tabs',
'#default_value' => $settings['debug']['roles'],
'#options' => array_map('check_plain', user_roles()),
);
-
+
foreach (array('theme_settings', 'logo', 'favicon') as $element) {
$form['alpha_settings'][$element] = $form[$element];
unset($form[$element], $form['alpha_settings'][$element]['#description'], $form['alpha_settings'][$element]['#attributes']);
- }
+ }
+
+ $form['alpha_settings']['theme_settings']['alpha_toggle'] = array(
+ '#type' => 'item',
+ '#title' => t('Additional toggleable elements provided by Alpha'),
+ );
+
+ foreach ($toggle as $item => $title) {
+ $form['alpha_settings']['theme_settings']['alpha_toggle']['alpha_toggle_' . $item] = array(
+ '#type' => 'checkbox',
+ '#title' => $title,
+ '#default_value' => $settings['toggle'][$item],
+ );
+ }
}
\ No newline at end of file
$settings = $vars['#alpha'] = alpha_settings($theme_key);
$regions = alpha_regions($theme_key);
+ $vars['feed_icons'] = $settings['toggle']['feed_icons'] ? $vars['feed_icons'] : NULL;
+ $vars['tabs'] = $settings['toggle']['tabs'] ? $vars['tabs'] : NULL;
+ $vars['action_links'] = $settings['toggle']['action_links'] ? $vars['action_links'] : NULL;
+ $vars['show_messages'] = $settings['toggle']['messages'] ? $vars['show_messages'] : FALSE;
+
$zone_regions = array();
foreach ($regions as $region => $item) {
if ($item['enabled'] && $zones[$item['zone']]['enabled'] && ($item['force'] || !empty($vars['page'][$region]) || $settings['debug']['block'])) {
--- /dev/null
+<?php
+
+/*
+ * @todo
+ */
+function alpha_alpha_process_page(&$vars) {
+ $vars['title'] = $vars['#alpha']['toggle']['feed_icons'] ? $vars['title'] : NULL;
+ $vars['breadcrumb'] = $vars['#alpha']['toggle']['tabs'] ? $vars['breadcrumb'] : NULL;
+}
\ No newline at end of file
if ($vars['wrapper']) {
$vars['wrapper_attributes_array']['id'] = $vars['attributes_array']['id'] . '-wrapper';
+ $vars['wrapper_attributes_array']['class'] = array('zone-wrapper', 'zone-' . $data['type'] . '-wrapper', $vars['wrapper_attributes_array']['id']);
if (!empty($data['wrapper_css'])) {
$extra = array_map('drupal_html_class', explode(' ', $data['wrapper_css']));
<?php if (!empty($content)): ?>
<div<?php print $attributes; ?>>
<a id="main-content"></a>
+ <?php if ($title): ?>
<?php print render($title_prefix); ?>
- <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
+ <h1 class="title" id="page-title"><?php print $title; ?></h1>
<?php print render($title_suffix); ?>
+ <?php endif; ?>
<?php if ($tabs): ?><div class="tabs"><?php print render($tabs); ?></div><?php endif; ?>
<?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
<?php print $content; ?>