SlideShare uma empresa Scribd logo
1 de 71
Baixar para ler offline
BOOTSTRAP
FRAMEWORK
AND DRUPAL
Created by Jim Birch
jimbir.ch/presentations/bootstrap
@thejimbirch
Xeno Media, Inc.
WHAT IS BOOTSTRAP?
Bootstrap is an open source project
that can be used by front end
developers and site builders in a
wide variety of ways, from beginner
to advanced.
Bootstrap is the most popular HTML, CSS, and JS framework
for developing responsive, mobile first projects on the web.
SIMILAR PROJECTS
Foundation
Pure CSS
PREDECESSORS
960 Grids
YUI Grids
Originally developed at Twitter by and to
document and share common design patterns and assets
within the company.
@mdo @fat
WHO USES
BOOTSTRAP?
Apple FIFA HBO Ing
Instacart Ly Microso NASA
New Relic Newsweek Spotify Vogue
And about 10 million more! BuiltWith.com
The Bootstrap contributed Drupal theme is the second most
popular theme on Drupal.org with over 110,000 installs
almost 700,000 downloads!
Joomla uses Bootstrap in core.
WordPress has 221 Bootstrap-based themes, 11% of all
their themes.
Themeforest lists 19,645 designs and an incredible 34% of
those refer to using Bootstrap
Love it or Hate it, Bootstrap is Winning the Web - August 12, 2015
WHAT MAKES
UP THE
BOOTSTRAP
FRAMEWORK?
THE BOOTSTRAP FRAMEWORK
INCLUDES:
a responsive grid system
a large amount of theme-able HTML and CSS content
elements
a very readable Typography base
a number of Javascript components that add additional
functionality
and documentation about all of it!
RESPONSIVE GRID SYSTEM
Container Fluid (full width), or Container (fixed width)
Row
Columns (12)
RESPONSIVE GRID SYSTEM
<div class="container-fluid">
<div class="row">
<div class="col-md-8">Lorem ipsum...</div>
<div class="col-md-4">Sed ut perspiciatis...</div>
</div>
</div>
RESPONSIVE GRID SYSTEM
RESPONSIVE GRID SYSTEM
Columns will wrap if more that 12
Columns can be set per responsive screen size
Columns can be offset
Columns can be ordered
CONTENT ELEMENTS
Over a dozen reusable components built to provide
iconography, dropdowns, input groups, navigation, alerts,
and much more.
Dropdowns Buttons
Inputs
Navs
Navbars
Breadcrumbs
Pagination
Jumbotron
Thumbnails
Alerts
Progress Bars
List Groups
Panels
Wells
CARDS, COMING IN BOOTSTRAP 4
Replaces wells, thumbnails, and panels
TYPOGRAPHY BASE
HEADERS
TYPOGRAPHY BASE
BLOCKQUOTES
TABLES
TYPOGRAPHY BASE
FORMS
JAVASCRIPTS
Bring Bootstrap's components to life with jQuery plugins.
Easily include them all, or one by one.
Modal
Dropdown
Scrollspy
Tabs
Tooltip
Popover
Collapsible Alerts
Button states
Collapsible/Accordions
Carousel
Affix
DOCUMENTATION
Every feature of Bootstrap is documented. This
documentation is always available online, and can be easily
set up in local, development, and staging environments.
PROS & CONS
OF USING THE
BOOTSTRAP
FRAMEWORK
ADVANTAGES:
Documentation
Standardization helps teams become more productive
Onboarding new developers is quicker
Customizable
Completely customizable for large projects
Mixins for adding existing styles to semantic html
Best practices for small/low budget projects
Open Source - MIT License
DISADVANTAGES:
Bootstrap is large/bloated/heavy
Bootstrap sites all look the same
Decisions are made for you
Javascript not robust enough
Upgrading is very difficult
Can lead to non-semantic HTML
USING THE
BOOTSTRAP
DRUPAL THEME
BOOTSTRAP DRUPAL THEME
Very mature for Drupal 7
Release candidate for Drupal 8
Comes with Subtheme right out of the box.
Great documentation at drupal-bootstrap.org
TWO OPTIONS TO CREATING A SUBTHEME
Loading Bootstrap Framework from a Content Delivery
Network (CDN)
Compiling your own using a local LESS preprocessor
CREATING A SUBTHEME - CDN (D7)
Download the Bootstrap theme as you normally would.
In the theme, copy the /starterkits/cdn/folder to
/sites/all/themes/
Rename the folder to your new theme name
Rename starterkit.cdnto
YOURNEWTHEMENAME.info
Edit the .info file.
Activate and Set Default your new theme!
CREATING A SUBTHEME - CDN (D7)
CREATING A SUBTHEME - CDN (D8)
Download the Bootstrap theme as you normally would.
In the theme, copy the starterkits/cdn/folder to
/themes/custom/
Rename the folder to your new theme name
Rename 5 files >>>
CREATING A SUBTHEME - CDN (D8)
Rename THEMENAME.themeto
YOURNEWTHEMENAME.theme
Rename THEMENAME.starterkit.ymlto
YOURNEWTHEMENAME.info.yml
Rename THEMENAME.libraries.ymlto
YOURNEWTHEMENAME.libraries.yml
Rename config/install/THEMENAME.settings.yml
to
config/install/YOURNEWTHEMENAME.settings.ym
Rename config/schema/THEMENAME.schema.ymlto
config/schema/YOURNEWTHEMENAME.schema.yml
CREATING A SUBTHEME - CDN (D8)
CREATING A SUBTHEME - CDN (D8)
Edit YOURNEWTHEMENAME.info.yml
Edit
config/schema/YOURNEWTHEMENAME.schema.yml
and rename - THEMENAME.settings:and
"THEMETITLE settings"
Activate and Set Default your new theme!
CREATING A SUBTHEME - CDN VERSIONS
/css/style.cssto add your custom style overrides
Grab what you need to override from the parent
theme/modules/coreand add to your new theme.
Don't forget to add your own logo.png, screenshot.png,
and favicon.ico
CREATING A SUBTHEME - LESS VERSIONS
Set up is the same, but with these additional steps:
Download the into the
root of your new theme. /THEMENAME/bootstrap/
You will need a - Grunt/Gulp
A er you make changes to the less files, you have to
compile them into the
/THEMENAME/css/styles.css
Bootstrap Framework Source Files
LESS compiler
CREATING A SUBTHEME - LESS VERSIONS
/THEMENAME/less/variable-overrides.less-
Allows you to override the variables provided by the
Bootstrap Framework
/THEMENAME/less/bootstrap.less- A copy of the
Bootstrap Framework's file, with the addition of including
variable-overrides.less
/THEMENAME/less/overrides.less- Contains
overrides to properly integrate Drupal with the Bootstrap
Framework
/THEMENAME/less/style.less- The glue that
combines the bootstrap.less and overrides.less files
together. Generally, you will not need to modify this file.
CREATING A SUBTHEME - LESS VERSIONS
Once you have compiled, all of the mixing will be run, and
the less files will be concatenated into one css file.
/THEMENAME/css/styles.css
SEE ALSO:
RADIX THEME
Radix is another base theme for Drupal. It has Bootstrap,
Sass, Gulp, BrowserSync and Font Awesome built-in.
Used in a lot of distributions
Has various Panels/Views/etc contrib modules
Alpha release for Drupal 8
There are also currently with the word Bootstrap
in them on Drupal.org
171 themes
COMPILING
YOUR OWN
THEME USING
BOOTSTRAP
WHY BUILD YOUR OWN THEME?
For complete control of markup
If your designer is "designing in the browser" and
providing html/css
If you are using a prototyping tool like which
exports html/css
If you are making your own html/css prototypes before
moving to Drupal.
Sketch
THEMEABLE DRUPAL ELEMENTS
Fields
Entities/Blocks/Panes
Regions
Layouts
Pages
DRUPAL 7
BADcamp 2015 session Optimizing Drupal 7 HTML Markup
The origin blog post: Using Fences and Page Manager to
optimize HTML markup in Drupal 7
DRUPAL 7
Fences module to reset field markup
Node/Page/Region/Block/etc templates to reset that
markup
Panels layouts to add semantic HTML
Page Manager (ctools) to place content
DRUPAL 8
has an Alpha release
Twig templates give us ultra specificity
works and will eventually be
moved to core.
is a stand alone module now, or
allows you to set defaults, and override on
individual nodes.
Fences
Layout plugin module
Page Manager
Panelizer
CREATING YOUR OWN THEME
Create an empty theme
Download the Bootstrap Framework source files
Update Gruntfile.jsto output your css file to
css/THEMENAME.cssand your js file to
js/THEMENAME.css
Add your own less files
Include them in your bootstrap.less
GRUNTFILE.JS
BOOTSTRAP.LESS
COMPILING BOOTSTRAP
Grunt or Gulp
cd sites/all/themes/THEMENAME/bootstrap/
grunt dist- Compiles all the files
grunt watch- Watches the folder, and automatically
updates a er file changes.
THE WONDERFUL WORLD OF MIXINS
USE MIXINS ON YOUR OWN SEMANTIC HTML
#main-content {
.container();
}
#main-content > section {
.make-row();
}
#main-content > section > article {
.make-md-column(9);
.make-sm-column(8);
}
#main-content > section > aside {
.make-md-column(3);
.make-sm-column(4);
USE MIXINS ON YOUR OWN SEMANTIC HTML
.live-chat-button {
.btn-primary();
padding: 10px 30px;
border-radius: 4px;
background: @live-chat-button-background;
&:hover {
text-decoration: none;
color: @btn-primary-color;
background: darken(@live-chat-button-background, 5%);
}
}
BOOTSTRAP
NAVBAR IN
DRUPAL 8
PAGE.HTML.TWIG
1
2
3
4
5
hosted with ❤ by
{% if page.header %}
<nav class="navbar">
<div class="container-fluid">{{ page.header }}</div>
</nav>
{% endif %}
view rawBootstrap Navbar in Drupal 8 - page.html.twig GitHub
BLOCK--SYSTEM-BRANDING-
BLOCK.HTML.TWIG
Upload your logo in the UI at
/admin/appearance/settings/theme_name
1
2
3
4
5
6
7
8
9
10
11
12
13
hosted with ❤ by
{% block content %}
{% if site_logo %}
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-cont
<span class="sr-only">Toggle navigation</span>
Menu
</button>
<a class="navbar-brand" href="{{ path('<front>') }}" title="{{ site_name }}" rel="home">
<img src="{{ site_logo }}" alt="{{ site_name }}" />
</a>
</div>
{% endif %}
{% endblock %}
view rawBootstrap Navbar in Drupal 8 - block--system-branding-block.html.twig GitHub
BLOCK--THEME_NAME-MAIN-
MENU.HTML.TWIG
1
2
3
hosted with ❤ by
<div id="navbar" class="collapse navbar-collapse">
{{ content }}
</div>
view rawBootstrap Navbar in Drupal 8 - block--THEME_NAME-main-menu.html.twig GitHub
MENU--MAIN.HTML.TWIG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
hosted with ❤ by
{{ menus.menu_links(items, attributes, 0) }}
{% macro menu_links(items, attributes, menu_level) %}
{% import _self as menus %}
{% if items %}
{% if menu_level == 0 %}
<ul class="nav navbar-nav">
{% else %}
<ul class="nav navbar-nav">
{% endif %}
{% for item in items %}
<li{{ item.attributes }}>
{{ link(item.title, item.url) }}
{% if item.below %}
{{ menus.menu_links(item.below, attributes, menu_level + 1) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}
view rawBootstrap Navbar in Drupal 8 - menu--main.html.twig GitHub
BOOTSTRAP
DRUPAL
MODULES
JQUERY UPDATE
Required for Drupal 7 to bring jQuery up to modern times.
Not needed for Drupal 8
DRUPAL MODULES
As of the writing of this presentation, there were 332
modules that contain "Bootstrap" in their name.
Drupal.org Bootstrap Modules
DRUPAL MODULES
VIEWS BOOTSTRAP
No release yet for D8
DRUPAL MODULES
BOOTSTRAP LAYOUTS
This project is a combination of
and for Drupal 8.
Display Suite Bootstrap
Layouts Panels Bootstrap Layouts
THE END
CONTINUING THE CONVERSATION:
Created by Jim Birch
jimbir.ch/presentations/bootstrap
@thejimbirch
Xeno Media, Inc.

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Building a Moodle theme with bootstrap
Building a Moodle theme with bootstrapBuilding a Moodle theme with bootstrap
Building a Moodle theme with bootstrap
 
Bootstrap ppt
Bootstrap pptBootstrap ppt
Bootstrap ppt
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
 
Bootstrap 3 Basic - Bangkok WordPress Meetup
Bootstrap 3 Basic - Bangkok WordPress MeetupBootstrap 3 Basic - Bangkok WordPress Meetup
Bootstrap 3 Basic - Bangkok WordPress Meetup
 
Bootstrap 3 vs. bootstrap 4
Bootstrap 3 vs. bootstrap 4Bootstrap 3 vs. bootstrap 4
Bootstrap 3 vs. bootstrap 4
 
Bootstrap 5 whats new
Bootstrap 5   whats newBootstrap 5   whats new
Bootstrap 5 whats new
 
Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...
Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...
Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...
 
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by StepBootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
Bootstrap 4 Tutorial PDF for Beginners - Learn Step by Step
 
Bootstrap 4 n00bz
Bootstrap 4 n00bzBootstrap 4 n00bz
Bootstrap 4 n00bz
 
Bootstrap 4 alpha 6
Bootstrap 4 alpha 6Bootstrap 4 alpha 6
Bootstrap 4 alpha 6
 
Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3
 
Intro To Twitter Bootstrap
Intro To Twitter BootstrapIntro To Twitter Bootstrap
Intro To Twitter Bootstrap
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
 
Introduction to Twitter's Bootstrap 2
Introduction to Twitter's Bootstrap 2Introduction to Twitter's Bootstrap 2
Introduction to Twitter's Bootstrap 2
 
Introduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersIntroduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for Developers
 
Learn How to Use Atomic Design to Make Your Site Manageable and Adaptable
Learn How to Use Atomic Design to Make Your Site Manageable and AdaptableLearn How to Use Atomic Design to Make Your Site Manageable and Adaptable
Learn How to Use Atomic Design to Make Your Site Manageable and Adaptable
 
Bootstrap Introduction
Bootstrap IntroductionBootstrap Introduction
Bootstrap Introduction
 
Bootstrap Part - 1
Bootstrap Part - 1Bootstrap Part - 1
Bootstrap Part - 1
 
Bootstrap - Web Development Framework
Bootstrap - Web Development FrameworkBootstrap - Web Development Framework
Bootstrap - Web Development Framework
 
Bootstrap 3.1.1
Bootstrap 3.1.1Bootstrap 3.1.1
Bootstrap 3.1.1
 

Destaque

Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)
jhamiltoorion
 
Breaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with DrupalBreaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with Drupal
Acquia
 

Destaque (20)

Sherlock Markup and Sammy Semantic - drupal theming forensic analysis
Sherlock Markup and Sammy Semantic - drupal theming forensic analysisSherlock Markup and Sammy Semantic - drupal theming forensic analysis
Sherlock Markup and Sammy Semantic - drupal theming forensic analysis
 
Marky Markup and the Funky Bunch
Marky Markup and the Funky BunchMarky Markup and the Funky Bunch
Marky Markup and the Funky Bunch
 
Drupal Presentation @ the Higher Education Web Symposium
Drupal Presentation @ the Higher Education Web SymposiumDrupal Presentation @ the Higher Education Web Symposium
Drupal Presentation @ the Higher Education Web Symposium
 
Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)
 
Twitter Bootstrap
Twitter BootstrapTwitter Bootstrap
Twitter Bootstrap
 
Breaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with DrupalBreaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with Drupal
 
What Is Force
What Is ForceWhat Is Force
What Is Force
 
Bootstrap framework and drupal paragraphs
Bootstrap framework and drupal paragraphsBootstrap framework and drupal paragraphs
Bootstrap framework and drupal paragraphs
 
BEM it!
BEM it!BEM it!
BEM it!
 
Grpc go-in-php
Grpc go-in-phpGrpc go-in-php
Grpc go-in-php
 
教學課程Pdf備份
教學課程Pdf備份教學課程Pdf備份
教學課程Pdf備份
 
Opensource 是人生的好朋友 2016-07-21
Opensource 是人生的好朋友 2016-07-21Opensource 是人生的好朋友 2016-07-21
Opensource 是人生的好朋友 2016-07-21
 
PHP WEB 应用组织与结构
PHP WEB 应用组织与结构PHP WEB 应用组织与结构
PHP WEB 应用组织与结构
 
APP Development Learning Experience Share - AppCoda
APP Development Learning Experience Share - AppCodaAPP Development Learning Experience Share - AppCoda
APP Development Learning Experience Share - AppCoda
 
TrainingProgramAtMobileDevTW
TrainingProgramAtMobileDevTWTrainingProgramAtMobileDevTW
TrainingProgramAtMobileDevTW
 
從 Php unit 到 ci 持續整合
從 Php unit 到 ci 持續整合從 Php unit 到 ci 持續整合
從 Php unit 到 ci 持續整合
 
Flexbox版面配置
Flexbox版面配置Flexbox版面配置
Flexbox版面配置
 
UI guide Example
UI guide ExampleUI guide Example
UI guide Example
 
寫出高性能的服務與應用 那些你沒想過的事
寫出高性能的服務與應用 那些你沒想過的事寫出高性能的服務與應用 那些你沒想過的事
寫出高性能的服務與應用 那些你沒想過的事
 
Why Your eCommerce Store Needs Responsive Design
Why Your eCommerce Store Needs Responsive DesignWhy Your eCommerce Store Needs Responsive Design
Why Your eCommerce Store Needs Responsive Design
 

Semelhante a Bootstrap Framework and Drupal

Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and Scalability
Ashok Modi
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
Lauren Roth
 

Semelhante a Bootstrap Framework and Drupal (20)

Bootstrap4XPages webinar
Bootstrap4XPages webinarBootstrap4XPages webinar
Bootstrap4XPages webinar
 
Drupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenDrupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with Zen
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and Scalability
 
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
 
Know the reason behind choosing bootstrap as css framework
Know the reason behind choosing bootstrap as css frameworkKnow the reason behind choosing bootstrap as css framework
Know the reason behind choosing bootstrap as css framework
 
Introducing WordPress Multitenancy (Wordcamp Vegas/Orlando 2015/WPCampus)
Introducing WordPress Multitenancy (Wordcamp Vegas/Orlando 2015/WPCampus)Introducing WordPress Multitenancy (Wordcamp Vegas/Orlando 2015/WPCampus)
Introducing WordPress Multitenancy (Wordcamp Vegas/Orlando 2015/WPCampus)
 
Introducing Wordpress Multitenancy
Introducing Wordpress MultitenancyIntroducing Wordpress Multitenancy
Introducing Wordpress Multitenancy
 
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAdvanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
 
Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014
Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014
Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014
 
Converting (X)HTML/CSS template to Drupal 7 Theme
Converting (X)HTML/CSS template to Drupal 7 ThemeConverting (X)HTML/CSS template to Drupal 7 Theme
Converting (X)HTML/CSS template to Drupal 7 Theme
 
Mastering Drupal Theming
Mastering Drupal ThemingMastering Drupal Theming
Mastering Drupal Theming
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
 
Workflow automation for Front-end web applications
Workflow automation for Front-end web applicationsWorkflow automation for Front-end web applications
Workflow automation for Front-end web applications
 
Html5 & less css
Html5 & less cssHtml5 & less css
Html5 & less css
 
Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8
 
Fewd week1 slides
Fewd week1 slidesFewd week1 slides
Fewd week1 slides
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEM
 
I Heart Drupal
I Heart DrupalI Heart Drupal
I Heart Drupal
 
Bootstrap
BootstrapBootstrap
Bootstrap
 

Último

一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Monica Sydney
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
Asmae Rabhi
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 

Último (20)

20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Power point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria IuzzolinoPower point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria Iuzzolino
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 

Bootstrap Framework and Drupal

  • 1. BOOTSTRAP FRAMEWORK AND DRUPAL Created by Jim Birch jimbir.ch/presentations/bootstrap @thejimbirch Xeno Media, Inc.
  • 2. WHAT IS BOOTSTRAP? Bootstrap is an open source project that can be used by front end developers and site builders in a wide variety of ways, from beginner to advanced.
  • 3. Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.
  • 5. Originally developed at Twitter by and to document and share common design patterns and assets within the company. @mdo @fat
  • 7. Apple FIFA HBO Ing Instacart Ly Microso NASA New Relic Newsweek Spotify Vogue
  • 8. And about 10 million more! BuiltWith.com
  • 9. The Bootstrap contributed Drupal theme is the second most popular theme on Drupal.org with over 110,000 installs almost 700,000 downloads!
  • 10. Joomla uses Bootstrap in core. WordPress has 221 Bootstrap-based themes, 11% of all their themes. Themeforest lists 19,645 designs and an incredible 34% of those refer to using Bootstrap Love it or Hate it, Bootstrap is Winning the Web - August 12, 2015
  • 12. THE BOOTSTRAP FRAMEWORK INCLUDES: a responsive grid system a large amount of theme-able HTML and CSS content elements a very readable Typography base a number of Javascript components that add additional functionality and documentation about all of it!
  • 13. RESPONSIVE GRID SYSTEM Container Fluid (full width), or Container (fixed width) Row Columns (12)
  • 14. RESPONSIVE GRID SYSTEM <div class="container-fluid"> <div class="row"> <div class="col-md-8">Lorem ipsum...</div> <div class="col-md-4">Sed ut perspiciatis...</div> </div> </div>
  • 16. RESPONSIVE GRID SYSTEM Columns will wrap if more that 12 Columns can be set per responsive screen size Columns can be offset Columns can be ordered
  • 17. CONTENT ELEMENTS Over a dozen reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more.
  • 19. CARDS, COMING IN BOOTSTRAP 4 Replaces wells, thumbnails, and panels
  • 20.
  • 24. JAVASCRIPTS Bring Bootstrap's components to life with jQuery plugins. Easily include them all, or one by one.
  • 26. DOCUMENTATION Every feature of Bootstrap is documented. This documentation is always available online, and can be easily set up in local, development, and staging environments.
  • 27. PROS & CONS OF USING THE BOOTSTRAP FRAMEWORK
  • 28. ADVANTAGES: Documentation Standardization helps teams become more productive Onboarding new developers is quicker Customizable Completely customizable for large projects Mixins for adding existing styles to semantic html Best practices for small/low budget projects Open Source - MIT License
  • 29. DISADVANTAGES: Bootstrap is large/bloated/heavy Bootstrap sites all look the same Decisions are made for you Javascript not robust enough Upgrading is very difficult Can lead to non-semantic HTML
  • 31. BOOTSTRAP DRUPAL THEME Very mature for Drupal 7 Release candidate for Drupal 8 Comes with Subtheme right out of the box. Great documentation at drupal-bootstrap.org
  • 32. TWO OPTIONS TO CREATING A SUBTHEME Loading Bootstrap Framework from a Content Delivery Network (CDN) Compiling your own using a local LESS preprocessor
  • 33. CREATING A SUBTHEME - CDN (D7) Download the Bootstrap theme as you normally would. In the theme, copy the /starterkits/cdn/folder to /sites/all/themes/ Rename the folder to your new theme name Rename starterkit.cdnto YOURNEWTHEMENAME.info Edit the .info file. Activate and Set Default your new theme!
  • 34. CREATING A SUBTHEME - CDN (D7)
  • 35.
  • 36. CREATING A SUBTHEME - CDN (D8) Download the Bootstrap theme as you normally would. In the theme, copy the starterkits/cdn/folder to /themes/custom/ Rename the folder to your new theme name Rename 5 files >>>
  • 37. CREATING A SUBTHEME - CDN (D8) Rename THEMENAME.themeto YOURNEWTHEMENAME.theme Rename THEMENAME.starterkit.ymlto YOURNEWTHEMENAME.info.yml Rename THEMENAME.libraries.ymlto YOURNEWTHEMENAME.libraries.yml Rename config/install/THEMENAME.settings.yml to config/install/YOURNEWTHEMENAME.settings.ym Rename config/schema/THEMENAME.schema.ymlto config/schema/YOURNEWTHEMENAME.schema.yml
  • 38. CREATING A SUBTHEME - CDN (D8)
  • 39. CREATING A SUBTHEME - CDN (D8) Edit YOURNEWTHEMENAME.info.yml Edit config/schema/YOURNEWTHEMENAME.schema.yml and rename - THEMENAME.settings:and "THEMETITLE settings" Activate and Set Default your new theme!
  • 40. CREATING A SUBTHEME - CDN VERSIONS /css/style.cssto add your custom style overrides Grab what you need to override from the parent theme/modules/coreand add to your new theme. Don't forget to add your own logo.png, screenshot.png, and favicon.ico
  • 41. CREATING A SUBTHEME - LESS VERSIONS Set up is the same, but with these additional steps: Download the into the root of your new theme. /THEMENAME/bootstrap/ You will need a - Grunt/Gulp A er you make changes to the less files, you have to compile them into the /THEMENAME/css/styles.css Bootstrap Framework Source Files LESS compiler
  • 42. CREATING A SUBTHEME - LESS VERSIONS /THEMENAME/less/variable-overrides.less- Allows you to override the variables provided by the Bootstrap Framework /THEMENAME/less/bootstrap.less- A copy of the Bootstrap Framework's file, with the addition of including variable-overrides.less /THEMENAME/less/overrides.less- Contains overrides to properly integrate Drupal with the Bootstrap Framework /THEMENAME/less/style.less- The glue that combines the bootstrap.less and overrides.less files together. Generally, you will not need to modify this file.
  • 43. CREATING A SUBTHEME - LESS VERSIONS Once you have compiled, all of the mixing will be run, and the less files will be concatenated into one css file. /THEMENAME/css/styles.css
  • 44. SEE ALSO: RADIX THEME Radix is another base theme for Drupal. It has Bootstrap, Sass, Gulp, BrowserSync and Font Awesome built-in. Used in a lot of distributions Has various Panels/Views/etc contrib modules Alpha release for Drupal 8 There are also currently with the word Bootstrap in them on Drupal.org 171 themes
  • 46. WHY BUILD YOUR OWN THEME? For complete control of markup If your designer is "designing in the browser" and providing html/css If you are using a prototyping tool like which exports html/css If you are making your own html/css prototypes before moving to Drupal. Sketch
  • 48. DRUPAL 7 BADcamp 2015 session Optimizing Drupal 7 HTML Markup The origin blog post: Using Fences and Page Manager to optimize HTML markup in Drupal 7
  • 49. DRUPAL 7 Fences module to reset field markup Node/Page/Region/Block/etc templates to reset that markup Panels layouts to add semantic HTML Page Manager (ctools) to place content
  • 50. DRUPAL 8 has an Alpha release Twig templates give us ultra specificity works and will eventually be moved to core. is a stand alone module now, or allows you to set defaults, and override on individual nodes. Fences Layout plugin module Page Manager Panelizer
  • 51. CREATING YOUR OWN THEME Create an empty theme Download the Bootstrap Framework source files Update Gruntfile.jsto output your css file to css/THEMENAME.cssand your js file to js/THEMENAME.css Add your own less files Include them in your bootstrap.less
  • 54. COMPILING BOOTSTRAP Grunt or Gulp cd sites/all/themes/THEMENAME/bootstrap/ grunt dist- Compiles all the files grunt watch- Watches the folder, and automatically updates a er file changes.
  • 55. THE WONDERFUL WORLD OF MIXINS
  • 56.
  • 57. USE MIXINS ON YOUR OWN SEMANTIC HTML #main-content { .container(); } #main-content > section { .make-row(); } #main-content > section > article { .make-md-column(9); .make-sm-column(8); } #main-content > section > aside { .make-md-column(3); .make-sm-column(4);
  • 58. USE MIXINS ON YOUR OWN SEMANTIC HTML .live-chat-button { .btn-primary(); padding: 10px 30px; border-radius: 4px; background: @live-chat-button-background; &:hover { text-decoration: none; color: @btn-primary-color; background: darken(@live-chat-button-background, 5%); } }
  • 60. PAGE.HTML.TWIG 1 2 3 4 5 hosted with ❤ by {% if page.header %} <nav class="navbar"> <div class="container-fluid">{{ page.header }}</div> </nav> {% endif %} view rawBootstrap Navbar in Drupal 8 - page.html.twig GitHub
  • 61. BLOCK--SYSTEM-BRANDING- BLOCK.HTML.TWIG Upload your logo in the UI at /admin/appearance/settings/theme_name 1 2 3 4 5 6 7 8 9 10 11 12 13 hosted with ❤ by {% block content %} {% if site_logo %} <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-cont <span class="sr-only">Toggle navigation</span> Menu </button> <a class="navbar-brand" href="{{ path('<front>') }}" title="{{ site_name }}" rel="home"> <img src="{{ site_logo }}" alt="{{ site_name }}" /> </a> </div> {% endif %} {% endblock %} view rawBootstrap Navbar in Drupal 8 - block--system-branding-block.html.twig GitHub
  • 62. BLOCK--THEME_NAME-MAIN- MENU.HTML.TWIG 1 2 3 hosted with ❤ by <div id="navbar" class="collapse navbar-collapse"> {{ content }} </div> view rawBootstrap Navbar in Drupal 8 - block--THEME_NAME-main-menu.html.twig GitHub
  • 63. MENU--MAIN.HTML.TWIG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 hosted with ❤ by {{ menus.menu_links(items, attributes, 0) }} {% macro menu_links(items, attributes, menu_level) %} {% import _self as menus %} {% if items %} {% if menu_level == 0 %} <ul class="nav navbar-nav"> {% else %} <ul class="nav navbar-nav"> {% endif %} {% for item in items %} <li{{ item.attributes }}> {{ link(item.title, item.url) }} {% if item.below %} {{ menus.menu_links(item.below, attributes, menu_level + 1) }} {% endif %} </li> {% endfor %} </ul> {% endif %} {% endmacro %} view rawBootstrap Navbar in Drupal 8 - menu--main.html.twig GitHub
  • 64.
  • 65.
  • 67. JQUERY UPDATE Required for Drupal 7 to bring jQuery up to modern times. Not needed for Drupal 8
  • 68. DRUPAL MODULES As of the writing of this presentation, there were 332 modules that contain "Bootstrap" in their name. Drupal.org Bootstrap Modules
  • 69. DRUPAL MODULES VIEWS BOOTSTRAP No release yet for D8
  • 70. DRUPAL MODULES BOOTSTRAP LAYOUTS This project is a combination of and for Drupal 8. Display Suite Bootstrap Layouts Panels Bootstrap Layouts
  • 71. THE END CONTINUING THE CONVERSATION: Created by Jim Birch jimbir.ch/presentations/bootstrap @thejimbirch Xeno Media, Inc.