Center Views footer and feed icon.

This commit is contained in:
Michael Stenta 2018-04-13 13:49:02 -04:00
parent c9b508d484
commit f1aa2570aa
2 changed files with 25 additions and 0 deletions

View File

@ -45,6 +45,13 @@ form#user-login-form ul li {
list-style: none;
}
/**
* Override Views feed-icon img-responsive block display.
*/
.view .feed-icon .img-responsive {
display: inline;
}
/**
* Add up/down arrow to collapsible fieldset and accordion headings.
*/

View File

@ -89,6 +89,24 @@ function farm_theme_preprocess_menu_tree(&$variables) {
}
}
/**
* Implements hook_preprocess_views_view().
*/
function farm_theme_preprocess_views_view(&$vars) {
// If the View has a 'footer' or 'feed_icon', wrap it in a div with the
// 'text-center' class.
$center_elements = array(
'footer',
'feed_icon',
);
foreach ($center_elements as $element) {
if (!empty($vars[$element])) {
$vars[$element] = '<div class="text-center">' . $vars[$element] . '</div>';
}
}
}
/**
* Implements hook_form_FORM_ID_alter().
*/