SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
Introduction to
Bootstrap
Ron Reiter
Agenda
1. Web development 101
2. Twitter Bootstrap
3. Resources
Web development 101
● HTML
○ Defines the data and structure of the page using elements
● CSS
○ Defines how the data and the elements actually look, and how they
behave when interacting with them
● JavaScript
○ The programming language of the web
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>
Basic HTML elements
● Titles - <h1>...</h1> from h1 to h6
● Paragraph - <p>...</p>
● Simple block element - <div></div>
● Simple inline element - <span></span>
● Images - <img src=”...”/>
How to use CSS
● Inline CSS
○ <div style=”color: red”>This text is red</div>
● Style CSS tag
○ <div class=”red-color”>This text is red</div>
○ <style>
.red-color { color: red; }
</style>
● External CSS file (put in <head>)
○ <link rel=”stylesheet” href=”style.css”/>
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
● CSS resetting for cross browser compatibility
● Grid scaffolding for design
● Multi-screen support (responsive design)
● “Mobile first”, like jQuery Mobile
● And a really good looking UI framework
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/
How to add Twitter Bootstrap
You should use a CDN (content delivery network) for
loading resources.
http://www.bootstrapcdn.com/
<!DOCTYPE html>
<html>
<head>
<title>Page title</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-
scalable=no">
</head>
<body>
<!-- page content goes here -->
</body>
</html>
What are those lines?
We use a shared CDN because chances are that common
files are most likely already cached in the user’s computer.
1. The <link> tag loads the CSS - the actual bootstrap
styling. This is obviously the most important
2. The <script> tag loads additional JavaScript capabilities
of the Bootstrap framework
3. The <meta> tag is for smaller devices which have a
viewport, and it disables zooming so that the responsive
features of Bootstrap will kick in
The grid layout
12 column row
col-md-12
col-md-6 col-md-6
col-md-4 col-md-4 col-md-4
col-md-2 col-md-2 col-md-2 col-md-2 col-md-2 col-md-2
col-md-4 col-md-8
The grid (cont.)
How to write pages using a grid:
<!-- every row must have 12 columns -->
<div class=”row”>
<div class=”col-md-4”>
<!-- content -->
</div>
<!-- need to complete 8 more columns -->
</div>
The grid (cont.)
Bootstrap 3 features an always-responsive grid with a
maximum size:
1. col-xs-[num] grids have no maximum size (fluid)
2. col-sm-[num] grids resize up to 750px
3. col-md-[num] grids resize up to 970px
4. col-lg-[num] grids resize up to 1170px
You should choose col-md or col-lg for desktop sites.
The grid (cont.)
You can also use two grid sizes for different
screen sizes:
<div class=”row”>
<div class=”col-md-4 col-xs-6”>
<!-- content -->
</div>
<div class=”col-md-8 col-xs-6”>
<!-- content -->
</div>
</div>
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 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”/>
Buttons
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>
For example, for a button with a star:
<button type="button" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-star"></span> Star
</button>
Icon resources
● Glyphicons - Comes with bootstrap
● Font Awesome - Recommended
○ http://fortawesome.github.io/Font-Awesome/
● Fontello - Customize your font package
○ http://fontello.com/
● Free icons - many of them over the internet
○ http://www.pixeden.com/media-icons/flat-design-
icons-set-vol1
● Commercial icons - Shutterstock,
istockphoto, etc.
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!

Weitere ähnliche Inhalte

Was ist angesagt? (20)

CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3
 
Bootstrap Part - 1
Bootstrap Part - 1Bootstrap Part - 1
Bootstrap Part - 1
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Css3
Css3Css3
Css3
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
 
CSS
CSSCSS
CSS
 
Html
HtmlHtml
Html
 
JavaScript - Chapter 3 - Introduction
 JavaScript - Chapter 3 - Introduction JavaScript - Chapter 3 - Introduction
JavaScript - Chapter 3 - Introduction
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
 
JQuery introduction
JQuery introductionJQuery introduction
JQuery introduction
 
Advanced Cascading Style Sheets
Advanced Cascading Style SheetsAdvanced Cascading Style Sheets
Advanced Cascading Style Sheets
 
Basic html structure
Basic html structureBasic html structure
Basic html structure
 

Andere mochten auch

Sitio web (bootstrap 3)
Sitio web (bootstrap 3)Sitio web (bootstrap 3)
Sitio web (bootstrap 3)Emerson Garay
 
Sitio web (boostrap carrusel de imagenes)
Sitio web (boostrap carrusel de imagenes)Sitio web (boostrap carrusel de imagenes)
Sitio web (boostrap carrusel de imagenes)Emerson Garay
 
Sentencia SQL INSERT
Sentencia SQL INSERTSentencia SQL INSERT
Sentencia SQL INSERTEmerson Garay
 
Consulta sql de tabla computador en mysql
Consulta sql de tabla computador en mysqlConsulta sql de tabla computador en mysql
Consulta sql de tabla computador en mysqlEmerson Garay
 
Guia BD conexión Mysql con Java usando Netbeans
Guia BD conexión Mysql con Java usando NetbeansGuia BD conexión Mysql con Java usando Netbeans
Guia BD conexión Mysql con Java usando NetbeansEmerson Garay
 
Sentencias SQL Update y Delete
Sentencias SQL Update y DeleteSentencias SQL Update y Delete
Sentencias SQL Update y DeleteEmerson Garay
 
GUI Salario en java con NetBeans
GUI Salario en java con NetBeansGUI Salario en java con NetBeans
GUI Salario en java con NetBeansEmerson Garay
 
An introduction to bootstrap
An introduction to bootstrapAn introduction to bootstrap
An introduction to bootstrapMind IT Systems
 
Introduction To Bootstrap
Introduction To Bootstrap Introduction To Bootstrap
Introduction To Bootstrap Rand Graham
 
Bootstrap responsive design
Bootstrap responsive designBootstrap responsive design
Bootstrap responsive designIshtdeep Hora
 
Web Development on Web Project Report
Web Development on Web Project ReportWeb Development on Web Project Report
Web Development on Web Project ReportMilind Gokhale
 

Andere mochten auch (13)

Sitio web (bootstrap 3)
Sitio web (bootstrap 3)Sitio web (bootstrap 3)
Sitio web (bootstrap 3)
 
Sitio web (boostrap carrusel de imagenes)
Sitio web (boostrap carrusel de imagenes)Sitio web (boostrap carrusel de imagenes)
Sitio web (boostrap carrusel de imagenes)
 
Sentencia SQL INSERT
Sentencia SQL INSERTSentencia SQL INSERT
Sentencia SQL INSERT
 
Consulta sql de tabla computador en mysql
Consulta sql de tabla computador en mysqlConsulta sql de tabla computador en mysql
Consulta sql de tabla computador en mysql
 
Guia BD conexión Mysql con Java usando Netbeans
Guia BD conexión Mysql con Java usando NetbeansGuia BD conexión Mysql con Java usando Netbeans
Guia BD conexión Mysql con Java usando Netbeans
 
Sentencias SQL Update y Delete
Sentencias SQL Update y DeleteSentencias SQL Update y Delete
Sentencias SQL Update y Delete
 
GUI Salario en java con NetBeans
GUI Salario en java con NetBeansGUI Salario en java con NetBeans
GUI Salario en java con NetBeans
 
An introduction to bootstrap
An introduction to bootstrapAn introduction to bootstrap
An introduction to bootstrap
 
Introduction To Bootstrap
Introduction To Bootstrap Introduction To Bootstrap
Introduction To Bootstrap
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Bootstrap responsive design
Bootstrap responsive designBootstrap responsive design
Bootstrap responsive design
 
Taller
TallerTaller
Taller
 
Web Development on Web Project Report
Web Development on Web Project ReportWeb Development on Web Project Report
Web Development on Web Project Report
 

Ähnlich wie Introduction to Twitter Bootstrap Framework

Ähnlich wie Introduction to Twitter Bootstrap Framework (20)

Dhtml chapter2
Dhtml chapter2Dhtml chapter2
Dhtml chapter2
 
Caracteristicas Basicas De Htlm
Caracteristicas Basicas De HtlmCaracteristicas Basicas De Htlm
Caracteristicas Basicas De Htlm
 
Twitter bootstrap training_session_ppt
Twitter bootstrap training_session_pptTwitter bootstrap training_session_ppt
Twitter bootstrap training_session_ppt
 
Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
 
Hypertext markup language(html)
Hypertext markup language(html)Hypertext markup language(html)
Hypertext markup language(html)
 
Lecture-11.pptx
Lecture-11.pptxLecture-11.pptx
Lecture-11.pptx
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web Development
 
Artdm171 Week4 Tags
Artdm171 Week4 TagsArtdm171 Week4 Tags
Artdm171 Week4 Tags
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Intodcution to Html
Intodcution to HtmlIntodcution to Html
Intodcution to Html
 
Bootstrap
Bootstrap Bootstrap
Bootstrap
 
Pemrograman Web 4 - Bootstrap 3
Pemrograman Web 4 - Bootstrap 3Pemrograman Web 4 - Bootstrap 3
Pemrograman Web 4 - Bootstrap 3
 
HTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al BasetHTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al Baset
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables forms
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
 
Html
HtmlHtml
Html
 
Ifi7174 lesson1
Ifi7174 lesson1Ifi7174 lesson1
Ifi7174 lesson1
 
Unit 1wt
Unit 1wtUnit 1wt
Unit 1wt
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 

Mehr von Ron Reiter

Securing your Bitcoin wallet
Securing your Bitcoin walletSecuring your Bitcoin wallet
Securing your Bitcoin walletRon Reiter
 
Brogramming - Python, Bash for Data Processing, and Git
Brogramming - Python, Bash for Data Processing, and GitBrogramming - Python, Bash for Data Processing, and Git
Brogramming - Python, Bash for Data Processing, and GitRon Reiter
 
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...Ron Reiter
 
jQuery Mobile Workshop
jQuery Mobile WorkshopjQuery Mobile Workshop
jQuery Mobile WorkshopRon Reiter
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5Ron Reiter
 
Building Chrome Extensions
Building Chrome ExtensionsBuilding Chrome Extensions
Building Chrome ExtensionsRon Reiter
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and ResourcesRon Reiter
 
Introduction to App Engine Development
Introduction to App Engine DevelopmentIntroduction to App Engine Development
Introduction to App Engine DevelopmentRon Reiter
 
Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)Ron Reiter
 
Writing HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAEWriting HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAERon Reiter
 

Mehr von Ron Reiter (11)

Securing your Bitcoin wallet
Securing your Bitcoin walletSecuring your Bitcoin wallet
Securing your Bitcoin wallet
 
Brogramming - Python, Bash for Data Processing, and Git
Brogramming - Python, Bash for Data Processing, and GitBrogramming - Python, Bash for Data Processing, and Git
Brogramming - Python, Bash for Data Processing, and Git
 
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
 
jQuery Mobile Workshop
jQuery Mobile WorkshopjQuery Mobile Workshop
jQuery Mobile Workshop
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
Mobile Spaces
Mobile SpacesMobile Spaces
Mobile Spaces
 
Building Chrome Extensions
Building Chrome ExtensionsBuilding Chrome Extensions
Building Chrome Extensions
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 
Introduction to App Engine Development
Introduction to App Engine DevelopmentIntroduction to App Engine Development
Introduction to App Engine Development
 
Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)
 
Writing HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAEWriting HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAE
 

Kürzlich hochgeladen

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Kürzlich hochgeladen (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

Introduction to Twitter Bootstrap Framework

  • 2. Agenda 1. Web development 101 2. Twitter Bootstrap 3. Resources
  • 3. Web development 101 ● HTML ○ Defines the data and structure of the page using elements ● CSS ○ Defines how the data and the elements actually look, and how they behave when interacting with them ● JavaScript ○ The programming language of the web
  • 4. 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>
  • 5. Basic HTML elements ● Titles - <h1>...</h1> from h1 to h6 ● Paragraph - <p>...</p> ● Simple block element - <div></div> ● Simple inline element - <span></span> ● Images - <img src=”...”/>
  • 6. How to use CSS ● Inline CSS ○ <div style=”color: red”>This text is red</div> ● Style CSS tag ○ <div class=”red-color”>This text is red</div> ○ <style> .red-color { color: red; } </style> ● External CSS file (put in <head>) ○ <link rel=”stylesheet” href=”style.css”/>
  • 7. 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
  • 8. Features ● CSS resetting for cross browser compatibility ● Grid scaffolding for design ● Multi-screen support (responsive design) ● “Mobile first”, like jQuery Mobile ● And a really good looking UI framework
  • 9. Features (cont.) ● JavaScript plugins ○ Dialogs ○ Tabs ○ Alerts ○ Carousel ○ Tooltips ○ … and more.
  • 10. 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/
  • 11. How to add Twitter Bootstrap You should use a CDN (content delivery network) for loading resources. http://www.bootstrapcdn.com/ <!DOCTYPE html> <html> <head> <title>Page title</title> <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user- scalable=no"> </head> <body> <!-- page content goes here --> </body> </html>
  • 12. What are those lines? We use a shared CDN because chances are that common files are most likely already cached in the user’s computer. 1. The <link> tag loads the CSS - the actual bootstrap styling. This is obviously the most important 2. The <script> tag loads additional JavaScript capabilities of the Bootstrap framework 3. The <meta> tag is for smaller devices which have a viewport, and it disables zooming so that the responsive features of Bootstrap will kick in
  • 13. The grid layout 12 column row col-md-12 col-md-6 col-md-6 col-md-4 col-md-4 col-md-4 col-md-2 col-md-2 col-md-2 col-md-2 col-md-2 col-md-2 col-md-4 col-md-8
  • 14. The grid (cont.) How to write pages using a grid: <!-- every row must have 12 columns --> <div class=”row”> <div class=”col-md-4”> <!-- content --> </div> <!-- need to complete 8 more columns --> </div>
  • 15. The grid (cont.) Bootstrap 3 features an always-responsive grid with a maximum size: 1. col-xs-[num] grids have no maximum size (fluid) 2. col-sm-[num] grids resize up to 750px 3. col-md-[num] grids resize up to 970px 4. col-lg-[num] grids resize up to 1170px You should choose col-md or col-lg for desktop sites.
  • 16. The grid (cont.) You can also use two grid sizes for different screen sizes: <div class=”row”> <div class=”col-md-4 col-xs-6”> <!-- content --> </div> <div class=”col-md-8 col-xs-6”> <!-- content --> </div> </div>
  • 18. 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>
  • 19. 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”/> Buttons
  • 20. Bootstrap elements ● Dropdowns ● Tabs ● Pills ● Navbars ● Alerts ● Lists Check out the Bootstrap reference for more: http://getbootstrap.com/components/
  • 21. Font icons To insert a user icon to a button, use the following syntax inline with any text: <span class="glyphicon glyphicon-user"></span> For example, for a button with a star: <button type="button" class="btn btn-default btn-lg"> <span class="glyphicon glyphicon-star"></span> Star </button>
  • 22. Icon resources ● Glyphicons - Comes with bootstrap ● Font Awesome - Recommended ○ http://fortawesome.github.io/Font-Awesome/ ● Fontello - Customize your font package ○ http://fontello.com/ ● Free icons - many of them over the internet ○ http://www.pixeden.com/media-icons/flat-design- icons-set-vol1 ● Commercial icons - Shutterstock, istockphoto, etc.
  • 31. 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