summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alpha/css/alpha.css5
-rw-r--r--alpha/includes/alpha.inc17
-rw-r--r--alpha/includes/theme-settings-general.inc18
-rw-r--r--alpha/preprocess/preprocess-page.inc5
-rw-r--r--alpha/process/process-page.inc9
-rw-r--r--alpha/template.php1
-rw-r--r--omega/templates/region--content.tpl.php4
7 files changed, 50 insertions, 9 deletions
diff --git a/alpha/css/alpha.css b/alpha/css/alpha.css
index 9e4d3d5..d46dd23 100644
--- a/alpha/css/alpha.css
+++ b/alpha/css/alpha.css
@@ -1,10 +1,5 @@
/* Clearfix fix to prevent padding at bottom of page. FML */
.clearfix:after {
- content: "";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
font-size: 0;
}
diff --git a/alpha/includes/alpha.inc b/alpha/includes/alpha.inc
index fb99b88..7150e58 100644
--- a/alpha/includes/alpha.inc
+++ b/alpha/includes/alpha.inc
@@ -612,7 +612,7 @@ function alpha_zones($key) {
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();
@@ -746,6 +746,10 @@ function alpha_settings($key) {
),
);
+ 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();
}
@@ -952,4 +956,15 @@ function alpha_excludes($key) {
}
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
diff --git a/alpha/includes/theme-settings-general.inc b/alpha/includes/theme-settings-general.inc
index 55db156..f50d43e 100644
--- a/alpha/includes/theme-settings-general.inc
+++ b/alpha/includes/theme-settings-general.inc
@@ -10,6 +10,7 @@ function alpha_theme_settings_general(&$form, &$form_state) {
$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',
@@ -213,9 +214,22 @@ function alpha_theme_settings_general(&$form, &$form_state) {
'#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
diff --git a/alpha/preprocess/preprocess-page.inc b/alpha/preprocess/preprocess-page.inc
index 4801587..0f41ed0 100644
--- a/alpha/preprocess/preprocess-page.inc
+++ b/alpha/preprocess/preprocess-page.inc
@@ -11,6 +11,11 @@ function alpha_alpha_preprocess_page(&$vars) {
$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'])) {
diff --git a/alpha/process/process-page.inc b/alpha/process/process-page.inc
new file mode 100644
index 0000000..01b50bb
--- /dev/null
+++ b/alpha/process/process-page.inc
@@ -0,0 +1,9 @@
+<?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
diff --git a/alpha/template.php b/alpha/template.php
index 55e8246..8ac78af 100644
--- a/alpha/template.php
+++ b/alpha/template.php
@@ -134,6 +134,7 @@ function template_preprocess_zone(&$vars) {
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']));
diff --git a/omega/templates/region--content.tpl.php b/omega/templates/region--content.tpl.php
index 6d99aa5..bda7379 100644
--- a/omega/templates/region--content.tpl.php
+++ b/omega/templates/region--content.tpl.php
@@ -1,9 +1,11 @@
<?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; ?>