Loading...
 

History: Updating a theme for Bootstrap

Preview of version: 9

Module boxes

Tiki is using the Bootstrap "panels" component (see http://getbootstrap.com/components/#panels for module boxes (and for the "box" plugin). This means, by default, modules will have a border and a title and body background color.

The HTML for the simple panel looks like this:

<div class="panel panel-default">
  <div class="panel-heading">Panel heading without title</div>
  <div class="panel-body">
    Panel content
  </div>
</div>


And the HTML for the panel with title:

<div class="panel panel-default">
  <div class="panel-heading">
    <h3 class="panel-title">Panel title</h3>
  </div>
  <div class="panel-body">
    Panel content
  </div>
</div>


To prevent the border and the background color and adjust the white space accordingly, add these CSS rules to your stylesheet:

.panel { 
	background-color: transparent;
	border: none;
	box-shadow: none;
	margin-bottom: 20px;
}

.panel-default { 
	border-color: transparent;
}

.panel-default > .panel-heading { 
	background-color: transparent;
	border: none;
	color: #333333;
}

.panel-heading { 
	border-bottom: none;
	border-radius: 0;
	padding: 10px 15px;
}

.panel-body { 
	padding: 15px;
}


gezza: how about adding bootstrap class called "panel-body" to templates/module.tpl to line 87, than the above extras are not needed

: Since modules have a title and body, it seems to me that the HTML best matches the Bootstrap panel with title and body. So they'll have to be overridden by the theme stylesheet. But maybe there should be a parameter in the module to switch off the borders and background colors. What do you think?

History

Advanced
Information Version
Wed 27 of Nov, 2013 10:02 GMT luci 13
Mon 25 of Nov, 2013 13:47 GMT gezza 12
Sun 24 of Nov, 2013 15:51 GMT chibaguy Sign moved to after quote. 11
Thu 21 of Nov, 2013 06:00 GMT chibaguy Limiting to modules the scope of the rules. 10
Thu 21 of Nov, 2013 00:39 GMT chibaguy HTML shown for box with title 9
Thu 21 of Nov, 2013 00:38 GMT chibaguy HTML shown for box with title 8
Wed 20 of Nov, 2013 13:50 GMT chibaguy 7
Wed 20 of Nov, 2013 10:46 GMT gezza suggesting to use panel-body class 6
Wed 20 of Nov, 2013 06:35 GMT luci 5
Wed 20 of Nov, 2013 04:15 GMT chibaguy 4
Wed 20 of Nov, 2013 04:14 GMT chibaguy 3
Wed 20 of Nov, 2013 04:13 GMT chibaguy 2
Wed 20 of Nov, 2013 04:12 GMT chibaguy 1

Switch Theme

Layout

Latest Changes

No records to display ...more

Subscribe to Tiki Newsletters!

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other big news!
Contribute to Tiki

Site Config