Skip to content
Snippets Groups Projects
Commit 96c05756 authored by Alberto Siles's avatar Alberto Siles
Browse files

Added ds layouts and improve bootstrap layout.

parent 09a58006
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ regions[postcript_top] = 'Postcript Top'
regions[postcript_bottom] = 'Postcript Bottom'
regions[footer] = 'Footer'
stylesheets[all][] = css/custom.css
stylesheets[all][] = css/style.css
stylesheets[all][] = css/yamm.css
scripts[] = js/script.js
......@@ -48,3 +49,10 @@ core = "7.x"
project = "bootstrap_barrio"
datestamp = "1397690362"
; Information added by Drupal.org packaging script on 2014-05-23
version = "7.x-3.7"
core = "7.x"
project = "bootstrap_barrio"
datestamp = "1400882031"
@media(min-width: 980px) {
body {
padding-top: 0px;
}
}
.navbar-fixed-top .logo img{
height:40px;
}
.navbar .logo {
margin-top: 5px;
margin-right: 10px;
}
#site-name {
line-height: 1;
margin: 0;
}
.submitted {
margin-bottom: 1em;
font-style: italic;
font-weight: normal;
color: #777;
}
.footer {
margin-top: 45px;
padding: 35px 0 36px;
border-top: 1px solid #e5e5e5;
}
ul.action-links {
margin-bottom: 2em;
}
ul.action-links li {
display: inline;
padding-right: 1.5em;
}
ul.action-links [class^="icon-"],
ul.action-links [class*=" icon-"] {
padding-right: .5em;
}
/**
* Admin Styling
*/
/* Fix Toolbar for .navbar-fixed-top */
body.toolbar .navbar-fixed-top {
top: 30px;
}
body.toolbar-drawer .navbar-fixed-top {
top: 65px;
}
@media(min-width: 980px) {
body.toolbar {
padding-top: 94px !important;
}
body.toolbar-drawer {
padding-top: 129px !important;
}
}
html.overlay-open .navbar-fixed-top {
z-index: 400;
}
/**
* Search form stylings.
*/
.region-navigation form#search-block-form {
margin-bottom: 5px;
margin-top: 5px;
}
body.navbar-is-fixed-top,
body.admin-menu.navbar-is-fixed-top { padding-top: 52px !important; }
.region-sidebar-first form#search-block-form input {
width: 100%;
}
body { padding: 0; overflow-x: hidden; }
.navbar .btn {
background: none repeat scroll 0 0 #e1e1e1; border: 0 none; border-radius: 0; float: right; height: 52px; line-height: 52px; padding: 0 15px; }
@media(max-width: 979px) {
.region-navigation form#search-block-form {
float: none;
}
}
.logo { display: block; line-height: 52px; position: relative; z-index: 3; }
.logo img { height: 49px; }
fieldset.search-advanced {
padding-bottom: 1.5em;
margin-top: 1em;
}
.header { position: relative; }
#block-system-user-menu { background: none repeat scroll 0 0 rgba(0, 0, 0, 0.25); position: absolute; right: 0; top: 52px; }
#block-system-user-menu .menu a { color: white; }
#block-system-user-menu .menu a { background: transparent; text-decoration: underline; }
/* Admin toolbar fix */
body.admin-expanded.admin-vertical.admin-nw .navbar,
body.admin-expanded.admin-vertical.admin-sw .navbar {
margin-left: 260px;
}
.views-row h2 a { color: black; }
div#admin-toolbar {
z-index: 500;
}
@media(max-width: 769px) {
/* Admin_menu fix */
#admin-menu {
z-index: 1100;
position: fixed;
}
#block-system-user-menu { top: 0; }
body.admin-menu .navbar-fixed-top {
top: 30px;
}
#admin-menu .dropdown li {
line-height: normal;
}
.navbar #main-nav li a { line-height: 52px; height: 52px; padding: 0 15px; }
.navbar #main-nav li a a { display: none; }
.navbar #main-nav li a:hover,
.navbar #main-nav li:hover a { background: #ccc; }
.navbar #main-nav li:hover li a { background: #fff; }
.navbar #main-nav li:hover li a:hover { background: #999; }
/* System base fix */
.container-inline div,
.container-inline label {
display: block;
}
.navbar #main-nav .dropdown-menu { display: none; }
.navbar #main-nav .open .dropdown-menu { display: block; }
/* Default form fields to auto */
input,
textarea,
select,
.uneditable-input {
width: auto;
}
.block-commerce-cart .dropdown-menu { left: auto; right: 0px; top: 52px; padding: 10px; }
/* Default textfield styles inside vertical tabs */
.vertical-tabs .form-type-textfield input {
-moz-box-sizing: inherit;
-webkit-box-sizing: inherit;
box-sizing: inherit;
width: auto;
}
.front .main-container { padding: 60px 0; }
.not-front .main-container { padding: 60px 0 100px; }
/* Vertical tabs form elements alighment */
.vertical-tabs .form-item {
margin: 1em 0;
}
.more-link { text-align: center; }
/* Collapsible field groups fix */
html.js fieldset.collapsed {
height: auto;
}
#luxe-login { float: left; width: 45%; }
#luxe-login-register { float: right; width: 45%; }
/* throbber fix */
html.js input.form-autocomplete {
background-position: 100% 8px; /* LTR */
background-repeat: no-repeat;
}
footer.footer { background: black; margin: 0; }
html.js input.throbbing {
background-position: 100% -13px; /* LTR */
}
@media(max-width: 769px) {
.navbar-search .control-group {
margin-bottom: 0px;
}
.block-commerce-cart .btn { position: absolute; right: 0px; bottom: auto; top: -52px; }
.navbar-default .navbar-toggle { position: absolute; right: 100px; }
input.error {
color: #b94a48;
border-color: #b94a48;
}
#main-nav { padding: 0; }
#main-nav ul { margin: 0; }
/**
* Password strength indicator.
*/
.password-strength {
width: 17em;
float: right; /* LTR */
margin-top: 1.4em;
}
.block-commerce-cart .dropdown-menu { top: 0; }
.password-strength-title {
display: inline;
}
#luxe-login { float: left; width: 100%; }
#luxe-login-register { float: left; width: 100%; }
.password-strength-text {
float: right; /* LTR */
font-weight: bold;
}
.password-indicator {
background-color: #c4c4c4;
height: 0.3em;
width: 100%;
}
.page-articulos .view-vista-de-articulos .views-row { margin: 0 0 15px; padding: 0 0 15px; border-bottom: 1px solid #ccc; }
.password-indicator div {
height: 100%;
width: 0%;
background-color: #47c965;
}
#block-menu-menu-menu-footer { margin: 0 0 25px; }
#block-menu-menu-menu-footer .menu { text-align: center; }
#block-menu-menu-menu-footer .menu li { display: inline; }
#block-menu-menu-menu-footer .menu li a { color: white; display: inline-block; }
#block-menu-menu-menu-footer .menu li a:hover { background: transparent; text-decoration: underline; }
input.password-confirm,
input.password-field {
width: 16em;
margin-bottom: 0.4em;
}
#block-block-1 { text-align: center; color: white; }
#block-block-1 a { color: white; }
div.password-confirm {
float: right; /* LTR */
margin-top: 1.5em;
visibility: hidden;
width: 17em;
}
#block-devel-execute-php { clear: both; }
div.form-item div.password-suggestions {
padding: 0.2em 0.5em;
margin: 0.7em 0;
width: 38.5em;
border: 1px solid #b4b4b4;
}
.block-facetapi input[type=checkbox] { margin-right: 5px; }
div.password-suggestions ul {
margin-bottom: 0;
}
/* SLIDER */
#layerslider h2{
background: rgba(0,0,0,.5);
border-radius: 0;
font-size: 24px; }
#layerslider div.ls-l {
color: white;
font-size: 24px;
left: 120px;
top: 200px;
white-space: nowrap; }
#layerslider a.ls-l {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.25);
color: white;
display: inline-block;
left: 120px;
padding: 5px;
top: 254px;
white-space: nowrap; }
.confirm-parent,
.password-parent {
clear: left; /* LTR */
margin: 0;
width: 36.3em;
}
/* added an extra clear both in the situation the form actions is preceded by an badly wrapped float element and they overlap
e.g. multipage*/
#commerce-addressbook-billing-default .views-row { background: rgba(0,0,0,.15); padding: 15px; }
.form-actions {
clear: both;
}
/* Override Dropdown Menu to allow on-hover behaviour */
.dropdown-menu {
margin:0;
}
.page-user-addressbook .addressfield-container-inline .name-block { font-weight: 700;
font-size: 20px;
border-bottom: 1px solid #ccc;
margin-bottom: 10px;
overflow: hidden; }
.navbar-is-fixed-top .logo pull-left img {
max-height:40px;
}
.page-user-addressbook #commerce-addressbook-billing-list td .views-field address { border: 1px solid #ccc; padding: 10px; }
<div class="<?php print $classes;?> media">
<?php if (isset($title_suffix['contextual_links'])): ?>
<?php print render($title_suffix['contextual_links']); ?>
<?php endif; ?>
<div class="pull-left<?php print $ds_media_object_classes; ?>">
<?php print $ds_media_object; ?>
</div>
<?php if ($ds_media_body): ?>
<div class="media-body<?php print $ds_media_body_classes; ?>">
<?php print $ds_media_body; ?>
</div>
<?php endif; ?>
</div>
<?php if (!empty($drupal_render_children)): ?>
<?php print $drupal_render_children ?>
<?php endif; ?>
\ No newline at end of file
<?php
function ds_ds_media() {
return array(
'label' => t('Bootstrap Media'),
'regions' => array(
'ds_media_object' => t('Media Object'),
'ds_media_body' => t('Media Body'),
),
);
}
<div class="<?php print $classes;?> panel panel-default">
<?php if (isset($title_suffix['contextual_links'])): ?>
<?php print render($title_suffix['contextual_links']); ?>
<?php endif; ?>
<?php if ($ds_panel_heading): ?>
<div class="panel-heading<?php print $ds_panel_heading_classes; ?>">
<?php print $ds_panel_heading; ?>
</div>
<?php endif; ?>
<?php if ($ds_panel_body): ?>
<div class="panel-body<?php print $ds_panel_body_classes; ?>">
<?php print $ds_panel_body; ?>
</div>
<?php endif; ?>
<?php if ($ds_panel_footer): ?>
<div class="panel-footer<?php print $ds_panel_footer_classes; ?>">
<?php print $ds_panel_footer; ?>
</div>
<?php endif; ?>
</div>
<?php if (!empty($drupal_render_children)): ?>
<?php print $drupal_render_children ?>
<?php endif; ?>
\ No newline at end of file
<?php
function ds_ds_panel() {
return array(
'label' => t('Bootstrap Panel'),
'regions' => array(
'ds_panel_heading' => t('Header'),
'ds_panel_body' => t('Body'),
'ds_panel_footer' => t('Footer'),
),
);
}
<div class="<?php print $classes;?> thumbnail">
<?php if (isset($title_suffix['contextual_links'])): ?>
<?php print render($title_suffix['contextual_links']); ?>
<?php endif; ?>
<?php print $ds_thumbnail; ?>
<?php if ($ds_caption): ?>
<div class="caption<?php print $ds_caption_classes; ?>">
<?php print $ds_caption; ?>
</div>
<?php endif; ?>
</div>
<?php if (!empty($drupal_render_children)): ?>
<?php print $drupal_render_children ?>
<?php endif; ?>
\ No newline at end of file
<?php
function ds_ds_thumbnail() {
return array(
'label' => t('Bootstrap Thumbnail'),
'regions' => array(
'ds_thumbnail' => t('Thumbnail'),
'ds_caption' => t('Caption'),
),
);
}
......@@ -10,42 +10,50 @@ Drupal.behaviors.bootstrap_barrio = {
attach: function (context, settings) {
// Capture barrio-modal class generated by Skinr.
// This triggers block as modal.
jQuery('.barrio-modal').once(function () {
var title = jQuery(this).children('h2').text();
jQuery(this).after('<section id="btn-' + jQuery(this).attr('id') + '" class="sideral-corner after"><a class="btn btn-primary btn-lg" data-target="#' + jQuery(this).attr('id') + '" data-toggle="modal">' + title + '</a></section>');
$('.barrio-modal').once(function () {
var title = $(this).children('h2').text();
$(this).after('<section id="btn-' + $(this).attr('id') + '" class="sideral-corner after"><a class="btn btn-primary btn-lg" data-target="#' + $(this).attr('id') + '" data-toggle="modal">' + title + '</a></section>');
});
jQuery('.barrio-modal').attr("tabindex", "-1");
jQuery('.barrio-modal').attr("role", "dialog");
jQuery('.barrio-modal').attr("aria-hidden", "true");
jQuery('.barrio-modal h2').wrap('<div class="modal-header" />');
jQuery('.barrio-modal .modal-header').prepend('<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>');
jQuery('.barrio-modal .block-content').addClass('modal-body');
jQuery('.barrio-modal').append('<div class="modal-footer"><button class="btn" data-dismiss="modal" aria-hidden="true">' + Drupal.t('Close') + '</button></div>');
jQuery('.barrio-modal div').wrapAll('<div class="modal-dialog" />');
jQuery('.barrio-modal .modal-dialog div').wrapAll('<div class="modal-content" />');
jQuery('.barrio-modal').appendTo('body');
$('.barrio-modal').attr("tabindex", "-1");
$('.barrio-modal').attr("role", "dialog");
$('.barrio-modal').attr("aria-hidden", "true");
$('.barrio-modal h2').wrap('<div class="modal-header" />');
$('.barrio-modal .modal-header').prepend('<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>');
$('.barrio-modal .block-content').addClass('modal-body');
$('.barrio-modal').append('<div class="modal-footer"><button class="btn" data-dismiss="modal" aria-hidden="true">' + Drupal.t('Close') + '</button></div>');
$('.barrio-modal div').wrapAll('<div class="modal-dialog" />');
$('.barrio-modal .modal-dialog div').wrapAll('<div class="modal-content" />');
$('.barrio-modal').appendTo('body');
// End of modal block definition
// Capture barrio-dopdown class generated by Skinr.
// This triggers block as dropdown.
jQuery('.barrio-dropdown').each(function () {
var title = jQuery(this).children('h2').text();
jQuery(this).children('h2').remove();
jQuery(this).prepend('<button class="btn dropdown-toggle sr-only" type="button" id="dropdown_' + jQuery(this).attr('id') + '" data-toggle="dropdown">'+ title + '<span class="caret"></span></button>');
jQuery(this).children('.block-content').wrap('<ul class="dropdown-menu" role="menu" aria-labelledby="dropdown_' + jQuery(this).attr('id') + '"><li role="presentation" /li></ul>');
$('.barrio-dropdown').each(function () {
var title = $(this).children('h2').text();
$(this).children('h2').remove();
$(this).prepend('<button class="btn dropdown-toggle" type="button" id="dropdown_' + $(this).attr('id') + '" data-toggle="dropdown">'+ title + '<span class="caret"></span></button>');
$(this).children('.block-content').wrap('<ul class="dropdown-menu" role="menu" aria-labelledby="dropdown_' + $(this).attr('id') + '"><li role="presentation" /li></ul>');
});
// End of modal block definition
// Prevent dropdown from closing when form inside
$('.dropdown-menu').find('form').click(function (e) {
e.stopPropagation();
});
$('.dropdown-menu').find('form').click(function (e) {
e.stopPropagation();
});
$('.view-content').addClass('clearfix');
$('.more-link a').addClass('btn btn-success');
$('.not-front.page-user .main-container .btn').removeClass('btn-default');
$('.not-front.page-user .main-container .btn').addClass('btn-info');
$('.page-user-addressbook #commerce-addressbook-billing-default .views-row, .page-user-addressbook #commerce-addressbook-billing-list td .views-field').wrapInner('<address></address>');
// Yamm code
jQuery(document).on('click', '.yamm .dropdown-menu', function(e) {
$(document).on('click', '.yamm .dropdown-menu', function(e) {
e.stopPropagation()
})
}
}
}(jQuery));
......@@ -15,7 +15,8 @@
<?php endif; ?>
<header id="navbar" class="<?php print $navbar_classes; ?>" role="banner">
<div class="navbar-inner">
<div id="main-nav">
<div id="main-navs">
<div class="container">
<div class="navbar-header">
<?php if (!empty($logo)): ?>
<a class="logo pull-left" href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>">
......@@ -37,7 +38,7 @@
</button>
</div>
<div id="header" class="row">
<div id="header" class="header">
<div>
<?php print render($page['header']); ?>
<?php if (!empty($page['yamm'])): ?>
......@@ -62,7 +63,7 @@
</div>
<?php endif; ?>
</div>
</div>
</div></div>
</div>
</div>
</header>
......@@ -79,8 +80,6 @@
<?php if (!empty($site_slogan)): ?>
<p class="lead"><?php print $site_slogan; ?></p>
<?php endif; ?>
<?php print render($page['header']); ?>
</header> <!-- /#header -->
<?php if (!empty($page['preface'])): ?>
......@@ -143,9 +142,9 @@
</div>
<?php endif; ?>
<footer class="footer">
</div>
<footer class="footer">
<div id="footer-inner" class="container">
<?php print render($page['footer']); ?>
</div>
</footer>
</div>
......@@ -15,7 +15,8 @@
<?php endif; ?>
<header id="navbar" class="<?php print $navbar_classes; ?>" role="banner">
<div class="navbar-inner">
<div id="main-nav-wrap">
<div id="main-navs">
<div class="container">
<div class="navbar-header">
<?php if (!empty($logo)): ?>
<a class="logo pull-left" href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>">
......@@ -37,7 +38,7 @@
</button>
</div>
<div id="header" class="row">
<div id="header" class="header">
<div>
<?php print render($page['header']); ?>
<?php if (!empty($page['yamm'])): ?>
......@@ -63,7 +64,7 @@
<?php endif; ?>
</div>
</div>
</div>
</div></div>
</div>
</header>
......@@ -145,21 +146,28 @@
<?php print render($page['sidebar_second']); ?>
</aside> <!-- /#sidebar-second -->
<?php endif; ?>
</div>
<?php if (!empty($page['postcript_top'])): ?>
<div id="postcript_top">
<div id="postcript_top" class="clearfix row">
<div class="content">
<?php print render($page['postcript_top']); ?>
</div>
</div> <!-- /#preface -->
<?php endif; ?>
<?php if (!empty($page['postcript_bottom'])): ?>
<div id="postcript_bottom">
<div id="postcript_bottom" class="clearfix row">
<div class="content">
<?php print render($page['postcript_bottom']); ?>
</div>
</div> <!-- /#preface -->
<?php endif; ?>
</div>
<footer class="footer row">
</div>
<footer class="footer">
<div id="footer-inner" class="container">
<?php print render($page['footer']); ?>
</div>
</footer>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment