How to add Bootstrap to Blogger

How to add bootstrap 3.0 to blogger
How to add Framework Twitter Bootstrap to Blogger – yesterday i already share How to add a progess in blog, today i will share how to add framework twitter bootstrap 3 in blogspot.

Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first web sites.

My template also now using bootstrap 3.0 to create a responsive and full-featured blog provided from bootstrap like jumbotron, wells, progress, alerts, pager, pagination, etc.

What is Bootstrap?

  1. Bootstrap is a free front-end framework for faster and easier web development
  2. Bootstrap includes HTML and CSS based design templates for typography, forms, buttons, tables, navigation, modals, image carousels and many other, as well as optional JavaScript plugins
  3. Bootstrap also gives you the ability to easily create responsive designs

How to add Bootstrap in blog?We will use the CDN (Content Delivery Network) of MaxCDN which provide support for Bootstrap.
Note : If you use a template that I design, then you do not need to follow this tutorial, Because my template already use bootstraps

Add a Bootstrap CSS in Blog

  1. Go to Blogger > Yourblog > Template > Edit HTML > Find <head> (CTRL + F in editor)
  2. Put the code below before <head>
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
    <!-- If the viewport meta tag already exists in your blog, then you should replace it with below -->
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
  3. Save Template

Add a Bootstrap Javascript in Blog
If you want to make javascript drop down menus, tabs, scrollspy, collapse button (button spoiler), carousel, pop up alerts, button effect. then you should add this javascript. but if just want to create a responsive blog you do not need to add this javascript.

  1. Go to Blogger > Yourblog > Template > Edit HTML > Find </head> (CTRL + F in editor)
  2. Put the code below before </head>
    <!-- jQuery library (Optional - if your blog have jquery dont copy this) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
    <!-- Latest compiled JavaScript -->
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  3. Save Template

Now your blog have a bootstrap 3, for component, css, javascript you can visit the blog Bootstrap

Add a Bootstrap Container in Blog

  1. Go to Blogger > Yourblog > Template > Edit HTML > Find <div id=’outer-wrapper’> (CTRL + F in editor)
  2. Then add class=’container’ in <div id=’outer-wrapper’>
    <div class='container' id='outer-wrapper'>
  3. Save Template

Add a Bootstrap Grid in Blog
Bootstrap’s grid system allows up to 12 columns across the page.
If you do not want to use all 12 column individually, you can group the columns together to create wider columns:

  1. Go to Blogger > Yourblog > Template > Edit HTML > Find <div id=’main-wrapper’>
    (CTRL + F in editor)
    If it does not find HTML <div id='main-wrapper'>
    Please find this
    <div id='main-wrapper' itemscope='itemscope' itemtype='http://schema.org/Blog' role='main'>
  2. then replace with this html
    <div class='col-xs-12 col-sm-8 col-md-8 clearfix' id='main-wrapper' itemscope='itemscope' itemtype='http://schema.org/Blog' role='main'>
  3. Find <div id=’sidebar-wrapper’> (CTRL + F in editor)
    If it does not find HTML <div id='sidebar-wrapper'>
    Please find this
    <div id='sidebar-wrapper' itemprop='mainEntity' itemscope='itemscope' itemtype='http://schema.org/WPSideBar' role='complementary'>
    or
    <div id='sidebar-wrapper' itemscope='itemscope' itemtype='http://schema.org/WPSideBar'>
  4. Then replace with this
    <div class='col-xs-12 col-sm-4 col-md-4 clearfix' id='sidebar-wrapper' itemprop='mainEntity' itemscope='itemscope' itemtype='http://schema.org/WPSideBar' role='complementary'> 
  5. Find <div id=’content-wrapper’> (CTRL + F in editor)
  6. Then replace with this <div class=’row’ id=’content-wrapper’>
  7. Save Template

How to Make Post Gridsometimes i wonder why people liked the Style Post Grid.
If you want make post like grid you can follow this step

  1. Find HTML <div class=’blog-posts hfeed’> CTRL + F in editor)
  2. Replace with this <div class=’blog-posts hfeed row‘>
  3. Find HTML <b:include data=’post’ name=’post’/> (CTRL + F in editor)
  4. Replace with this
    <b:if cond='data:blog.pageType != "static_page"'><b:if cond='data:blog.pageType != "item"'>
    <div class='_grid col-xs-6 col-sm-4 col-md-4'><b:include data='post' name='post'/><div/>
    <b:else/>
    <b:include data='post' name='post'/>
    </b:if></b:if>
  5. Then Save Template

Now your blog is installed bootstrap, but your blog is not yet fully responsive. You have to manage the rest with CSS media queries for selectors who have not been responsive. if you are still confused with the tutorial above, please comment.
thank you

Cara Menambahkan Bootstrap di blogger – kemarin saya sudah share Cara menambahkan progress bar di blog, hari ini saya akan share cara menambahkan bootstrap di blogger.

Bootstrap yaitu kumpulan rangka HTML, CSS, dan Javascript yang paling popular sering digunakan developer untuk membuat blog responsive, dan mobile friendly.

Templateku juga menggunakan bootstrap versi 3 untuk membuat blog responsive dan full fitur yang disediakan bootstrap seperti jumbotron, well, progress, alert, pagination, button, dropdown, navigasi, dan lupa lagi.

Apa itu Bootstrap?

  1. Bootstrap adalah kerangka front-end gratis untuk pengembangan web lebih cepat dan lebih mudah
  2. Bootstrap menyediakan desain HTML dan CSS untuk typography, form, button, tabel, navigasi, pop up, slider dan lainnya
  3. Bootstrap juga memudahkan adnda untuk membuat blog responsif

Bagai mana cara menambahkan Bootstrap di blog?kita akan menggunakan CDN (Content Delivery Network) dari MaxCDN yang sudah disediakan di situs bootstrapnya.
Catatan : Jika kamu menggunakan template yang saya desain, maka kamu tidak perlu ikuti tutorial ini karena template saya sudah menggunakan bootstrap

Menambahkan CSS Bootstrap di blog

  1. Pergi ke Blogger > Blogmu > Template > Edit HTML > Cari kode <head> (CTRL + F di editor)
  2. Taruh kode dibawah ini sesudah kode <head>
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
    <!-- jika meta tag viewport sudah ada di blogmu maka ganti sama kode dibawah ini -->
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
  3. Save Template

Menambahkan Javascript Bootstrap di blog
jika kamu mau membuat navigasi dropdown, tab, scrollspy, tombol spoiler, slider, kotak pop up, kotak info atau kotak peringatanda, dan tombol efek maka kamu harus menambahkan javascript bootstrap di blogmu, namun jika kamu hanya ingin membuat blogmu responsive maka kamu tidak perlu menambahkan javascript ini.

  1. Pergi ke blogger > Blogmu > Template > Edit HTML > Cari kode </head> (CTRL + F in editor)
  2. Put the code below before </head>
    <!-- jQuery library (Opsional - jika blogmu udah ada jquery jangan kocy js script dibawah ini) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
    <!-- Latest compiled JavaScript -->
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  3. Save Template

sekarang blogmu sudah terpasang bootstrap, untuk komponen, css, javascript kamu bisa cek disitus officialnya Bootstrap

Cara Menambahkan Kontainer Bootstrap di blog

  1. Pergi ke Blogger > Blogmu > Template > Edit HTML > Cari kode <div id=’outer-wrapper’> (CTRL + F di editor)
  2. lalu tambahkan kode class=’container’ di <div id=’outer-wrapper’> maka hasilnya seperti dibawah ini
    <div class='container' id='outer-wrapper'>
  3. Lalu save template

Membuat Main Wrapper dan Sidebar-Wrapper Responsive
dalam Sistem Grid Bootstrap yaitu hanya memperbolehkan 12 kolom. contohnya

<div class='container' id='content'>
<div class='col-xs-12 col-sm-8 col-md-8' id='main'>
</div>
<div class='col-xs-12 col-sm-4 col-md-4' id='side'>
</div>
</div>

element id=’main’ dan elemen id=’side’ harus totalnya berjumlah 12 tidak boleh lewat. 8 + 4 = 12
semoga paham, untuk col-xs-12 yaitu kolom akan 100% pada saat di mobile. silahkan cek di situsnya untuk info lebih lanjut

  1. Pergi ke Blogger > Blogmu > Template > Edit HTML > Cari kode <div id=’main-wrapper’>
    (CTRL + F di editor)
    Jika tidak ketemu kode <div id='main-wrapper'>
    Silahkan cari kode ini
    <div id='main-wrapper' itemscope='itemscope' itemtype='http://schema.org/Blog' role='main'>
  2. Jika sudah ketemu lalu ganti dengan html dibawah ini
    <div class='col-xs-12 col-sm-8 col-md-8 clearfix' id='main-wrapper' itemscope='itemscope' itemtype='http://schema.org/Blog' role='main'>
  3. Cari <div id=’sidebar-wrapper’> (CTRL + F di editor)
    Jika tidak ketemu kode <div id='sidebar-wrapper'>
    Silahkan cari kode ini
    <div id='sidebar-wrapper' itemprop='mainEntity' itemscope='itemscope' itemtype='http://schema.org/WPSideBar' role='complementary'>
    atau
    <div id='sidebar-wrapper' itemscope='itemscope' itemtype='http://schema.org/WPSideBar'>
  4. Jika sudah ketemu lalu ganti dengan html dibawah ini
    <div class='col-xs-12 col-sm-4 col-md-4 clearfix' id='sidebar-wrapper' itemprop='mainEntity' itemscope='itemscope' itemtype='http://schema.org/WPSideBar' role='complementary'> 
  5. Cari kode <div id=’content-wrapper’> (CTRL + F di editor)
  6. jika ketmeu kode diatas lalu ganti denga kode dibawah ini <div class=’row’ id=’content-wrapper’>
  7. Save Template

Membuat Post Bergaya Grid dengan Bantuan Bootstrapterkadang saya sering bingung mengapa orang lebih suka template bergaya “Grid”.
bagi yang ingin membuat post bergaya grid silahkan ikut tutorial dibawah ini

  1. Cari kode HTML <div class=’blog-posts hfeed’> CTRL + F in editor)
  2. Lalu ganti dengan kode ini <div class=’blog-posts hfeed row‘>
  3. Cari kode HTML <b:include data=’post’ name=’post’/> (CTRL + F in editor)
  4. Lalu ganti dengan kode ini
    <b:if cond='data:blog.pageType != "static_page"'><b:if cond='data:blog.pageType != "item"'>
    <div class='_grid col-xs-6 col-sm-4 col-md-4'><b:include data='post' name='post'/><div/>
    <b:else/>
    <b:include data='post' name='post'/>
    </b:if></b:if>
  5. Terus Save Template

Blogmu sudah terpasang bootstrap berserta cincongnya, namun blogmu belum sepenuhnya responsif, kamu harus mengatur css untuk seletor yang kamu buat/tidak ada dibootstrap dengan menggunakan CSS Media Queries bisa cari digugel tuh infonya, jika masih bingung cincong diatas silahkan fatok the snake di komentar.
terima kasih

Add a Comment

Your email address will not be published. Required fields are marked *