Book Image

Learning Bootstrap 4 - Second Edition

By : Matt Lambert
Book Image

Learning Bootstrap 4 - Second Edition

By: Matt Lambert

Overview of this book

Bootstrap, the most popular front-end framework built to design elegant, powerful, and responsive interfaces for professional-level web pages has undergone a major overhaul. Bootstrap 4 introduces a wide range of new features that make front-end web design even simpler and exciting. In this gentle and comprehensive book, we'll teach you everything that you need to know to start building websites with Bootstrap 4 in a practical way. You'll learn about build tools such as Node, Grunt, and many others. You'll also discover the principles of mobile-first design in order to ensure your pages can fit any screen size and meet the responsive requirements. Learn to play with Bootstrap's grid system and base CSS to ensure your designs are robust and that your development process is speedy and efficient. Then, you'll find out how you can extend your current build with some cool JavaScript Plugins, and throw in some Sass to spice things up and customize your themes. This book will make sure you're geared up and ready to build amazingly beautiful and responsive websites in a jiffy.
Table of Contents (15 chapters)
Learning Bootstrap 4 - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Free Chapter
1
Introducing Bootstrap 4

Coding the blog home page


Now that you have a good grasp of how to use the Bootstrap 4 grid, we're going to code up our blog home page. This page will include a feed of posts, a sidebar, and a newsletter sign-up form section at the bottom of the page. Let's start by taking the code we wrote in Chapter 2 , Using Bootstrap Build Tools for our hello world! template and duplicating the entire directory. Rename the folder Chapter 4: Working with Layouts or Bootstrap Layout.

Note

Remember, we are using the regular grid moving forward, not the Flexbox grid. Make sure you are using the default build of bootstrap.min.css. If you carry out a simple duplication of the second chapter's code then you'll have the right file configuration.

Writing the index.ejs template

Good news! Since we set up our Harp project in Chapter 2 , Using Bootstrap Build Tools, we can reuse a bunch of that code now for our blog home page. There's no need to make any updates to the JSON files and header or footer partials. The...