Bootstrap-Php Applications
Bootstrap-Php Applications
Bootstrap
Ron Reiter
Agenda
1. Web development 101
2. Twitter Bootstrap
3. Resources
CSS
Defines how the data and the elements actually look, and how they
behave when interacting with them
JavaScript
How to start
You should remember this boilerplate code:
<!DOCTYPE html>
<html>
<head>
<title>Page title</title>
</head>
<body>
<!-- page content goes here -->
</body>
</html>
Twitter Bootstrap
Twitter Bootstrap is a popular UI framework
http://getbootstrap.com/getting-started/
As of June 28, 2013, 1% of all websites are powered by
Twitter Bootstrap
Features
Features (cont.)
JavaScript plugins
Dialogs
Tabs
Alerts
Carousel
Tooltips
and more.
Customization
1. You can customize the CSS yourself (not
recommended)
2. You can use LESS to compile a Bootstrap
CSS version on your own
3. You can just download a customized version
http://bootswatch.com/
col-md-4
col-md-2
col-md-2
col-md-4
col-md-6
col-md-4
col-md-2
col-md-4
col-md-2
col-md-2
col-md-8
col-md-2
Tables
<table class=table>
<thead>
<th><td>Name</td><td>Age</td></th>
</thead>
<tbody>
<tr><td>Alice</td><td>20</td></tr>
<tr><td>Bob</td><td>25</td></tr>
</tbody>
</table>
Forms
<form role="form">
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="
exampleInputEmail1" placeholder="Enter email">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="
exampleInputPassword1" placeholder="Password">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
Buttons
Buttons can either be button elements, links or
input elements. They will all look like buttons.
For simple links, use the <a> element and
add button styling if needed.
For forms or dynamic buttons, use the button
element.
<button class="btn btn-primary">Primary</button>
<a href=btn btn-primary>Primary</a>
<input type=submit class=btn btn-primary/>
Bootstrap elements
Dropdowns
Tabs
Pills
Navbars
Alerts
Lists
Check out the Bootstrap reference for more:
http://getbootstrap.com/components/
Font icons
To insert a user icon to a button, use the
following syntax inline with any text:
<span class="glyphicon glyphicon-user"></span>
Icon resources
Glyphicons - Comes with bootstrap
Font Awesome - Recommended
http://fortawesome.github.io/Font-Awesome/
Resources
Wrap Bootstrap
http://wrapbootstrap.com
Bootswatch
http://bootswatch.com/
Start Bootstrap
http://startbootstrap.com/
LESS
http://lesscss.org/
Font Awesome
http://fortawesome.github.io/Font-Awesome/
Fontello
http://fontello.com/
PlaceIt by Breezi
http://placeit.breezi.com/
Exercise
Design a page with the following layout
Navigation bar
Big heading
Feature Icon
Feature Icon
Feature Icon
Feature text
Feature text
Feature text
Footer
Thank You!