From c3792f04c44026553b63a518de8a558ac139cfce Mon Sep 17 00:00:00 2001 From: hatuhay <alberto@siles.pe> Date: Mon, 27 May 2013 13:28:52 -0500 Subject: [PATCH] Issue #0005 by @hatuhay: Syntax corrections. --- README.txt | 15 ++++++++++----- css/style.css | 8 ++++---- skins/barrio_default/barrio_default.inc | 3 +-- template.php | 25 ++++++++++++++++++------- theme-settings.php | 2 ++ 5 files changed, 35 insertions(+), 18 deletions(-) diff --git a/README.txt b/README.txt index 9c86cc7..ac60be2 100644 --- a/README.txt +++ b/README.txt @@ -1,8 +1,10 @@ Bootstrap sub-theme for Drupal -Bootstrap Barrio is a sub-theme of the Bootstrap Theme, theme based on Twitter Bootstrap, -a sleek, intuitive, and powerful front-end framework for faster and easier web development. -While Bootstrap Theme add Twitter Bootstrap functionallity, Bootstrap Barrio focus on layout flexibility +Bootstrap Barrio is a sub-theme of the Bootstrap Theme, theme based on +Twitter Bootstrap, a sleek, intuitive, and powerful front-end framework +for faster and easier web development. +While Bootstrap Theme add Twitter Bootstrap functionallity, +Bootstrap Barrio focus on layout flexibility and customization using theme parameters and the Skinr module. - Layout is handle by Bootstrap. @@ -27,6 +29,9 @@ Unpack and upload Bootstrap Theme as usual within your site's themes folder (usually sites/all/themes). Unpack and upload Bootstrap Barrio within your default's themes folder (usually sites/default/themes). -Dowload latest version of Twitter Bootstrap, copy bootstrap files into Bootstrap Theme directory, -css files should be usually under sites/all/themes/bootstrap/bootstrap/css. js under sites/all/themes/bootstrap/bootstrap/js and img under sites/all/themes/bootstrap/bootstrap/img. +Dowload latest version of Twitter Bootstrap, copy bootstrap files into +Bootstrap Theme directory, +css files should be usually under sites/all/themes/bootstrap/bootstrap/css. +js under sites/all/themes/bootstrap/bootstrap/js and +img under sites/all/themes/bootstrap/bootstrap/img. Download and enable the Skinr module, set permissions if you're not uid 1 diff --git a/css/style.css b/css/style.css index 9a35640..9df666a 100644 --- a/css/style.css +++ b/css/style.css @@ -118,15 +118,15 @@ body.admin-menu .navbar-fixed-top { } /* System base fix */ -.container-inline div, +.container-inline div, .container-inline label { display: block; } /* Default form fields to auto */ -input, -textarea, -select, +input, +textarea, +select, .uneditable-input { width: auto; } diff --git a/skins/barrio_default/barrio_default.inc b/skins/barrio_default/barrio_default.inc index 6dfc7b3..ff76d29 100644 --- a/skins/barrio_default/barrio_default.inc +++ b/skins/barrio_default/barrio_default.inc @@ -1,6 +1,6 @@ <?php /** - * @file barrio_default.inc + * @file * Implementation of a Skinr plugin. */ @@ -120,7 +120,6 @@ function bootstrap_barrio_skinr_group_info() { * implementing it, followed by the plugin name, e.g. * THEMENAME_PLUGINNAME_skinr_skin_info(), or * MODULENAME_PLUGINNAME_skinr_skin_info(). - * */ function bootstrap_barrio_skinr_skin_barrio_default_info() { $skins = array(); diff --git a/template.php b/template.php index 6f34f6e..30ac851 100644 --- a/template.php +++ b/template.php @@ -1,4 +1,8 @@ <?php +/** + * @file +*/ + /** * Override or insert variables into the page template for HTML output. * For taxonomy page, insert vocabulary id class. @@ -12,7 +16,7 @@ function bootstrap_barrio_preprocess_html(&$variables) { } if (theme_get_setting('toggle_responsive')) { $variables['mobile_friendly'] = TRUE; - } + } else { $variables['mobile_friendly'] = FALSE; } @@ -20,6 +24,7 @@ function bootstrap_barrio_preprocess_html(&$variables) { /** * Override or insert variables into the page template for page output. + * * Sets the widths of the main columns of the page. */ function bootstrap_barrio_preprocess_page(&$variables) { @@ -29,7 +34,7 @@ function bootstrap_barrio_preprocess_page(&$variables) { $variables['nav_style'] = _bootstrap_barrio_nav_style(theme_get_setting('nav_style')); if (!theme_get_setting('print_content') && drupal_is_front_page()) { $variables['print_content'] = FALSE; - } + } else { $variables['print_content'] = TRUE; } @@ -41,7 +46,7 @@ function bootstrap_barrio_preprocess_page(&$variables) { if (theme_get_setting('fluid') || (arg(0) == 'admin')) { $variables['container'] = 'container-fluid'; $variables['row'] = 'row-fluid'; - } + } else { $variables['container'] = 'container'; $variables['row'] = 'row'; @@ -50,6 +55,7 @@ function bootstrap_barrio_preprocess_page(&$variables) { /** * Returns with of content region. + * * Calculates content width based on first and second column width parameters. */ function _bootstrap_barrio_content_width() { @@ -61,7 +67,9 @@ function _bootstrap_barrio_content_width() { /** * Returns a list of blocks. - * Uses Drupal block interface and appends any blocks assigned by the Context module. + * + * Uses Drupal block interface and appends any blocks + * assigned by the Context module. * Taken from Fusion Core. */ function _bootstrap_barrio_block_list($region) { @@ -83,13 +91,16 @@ function _bootstrap_barrio_nav_style($theme_nav_style) { switch ($theme_nav_style) { case 0: $nav_style = 'navbar navbar-static-top'; - break; + break; + case 1: $nav_style = 'navbar navbar-fixed-top'; - break; + break; + case 2: $nav_style = 'nav-collapse collapse'; - break; + break; + default: $nav_style = 'navbar navbar-static-top'; break; diff --git a/theme-settings.php b/theme-settings.php index c25731e..0d839d7 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -1,5 +1,7 @@ <?php /** + * @file + * * Prameter definitions for Bootstrap Barrio. */ function bootstrap_barrio_form_system_theme_settings_alter(&$form, $form_state, $form_id = NULL) { -- GitLab