Book Image

Bootstrap Site Blueprints Volume II

By : Matt Lambert
Book Image

Bootstrap Site Blueprints Volume II

By: Matt Lambert

Overview of this book

Bootstrap is the most popular open source project on GitHub today. With a little bit of know-how, this massively popular CSS framework can leveraged for any type of complex web application or website. Bootstrap Site Blueprints Volume II will teach you to build these types of projects in an easy-to-understand fashion. The key to any complex Bootstrap project is a strong development foundation for your project. The book will first teach you how to build a Bootstrap development environment using Harp.js, Node, and Less. In the next chapters, we’ll build on this foundation by creating restaurant and mobile-first aggregator projects. Once you’re warmed up, we’ll move on to more complex projects such as a wiki, a new magazine, a dashboard, and finally a social networking website. Whether you are brand new to Bootstrap or a seasoned expert, this book will provide you with the skills you need to successfully create a number of popular web applications and websites.
Table of Contents (14 chapters)
Bootstrap Site Blueprints Volume II
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Coding the home page


The first of two templates for this project is the home page. This page is made up of a flexbox grid that is wrapped into the Bootstrap grid code. Following the grid, we'll add a pagination section. The entire body of the page is wrapped in the following HTML:

<div class="page-body">
  ..
</div>

This section has top and bottom margins attached to it. This is the same spacing that we'll use on the article page, so you'll see .article class in there as well:

.page-body,
.article {
  margin: (@margin * 2) 0;
}

Creating a post grid with flexbox

Before we jump fully into the flexbox code, let's outline the basic structure of a row of posts. Each row of our grid will have four posts in it. As with the footer, we want rows to stretch across the width of the layout, so we'll be omitting the .container <div>. Here's the basic structure of a row:

<div class="row">
  <div class="col-lg-12">
    <div class="flex-parent">
      <div class="flex-child...