This repository contains the code examples from the book Unraveling Flexbox by Landon Schropp.
The examples are built using Middleman, a static site generator.
Running the Examples with Docker
Next, clone the application's repository and change into that directory.
git clone https://github.com/LandonSchropp/unraveling_flexbox cd unraveling_flexbox
Finally, start up the application.
That's it! The first time the server runs, it may take a little while for the project's Docker container to build. When it's done, you should be able to navigate to localhost:4567 to view the application.
To make a change to an existing file, simply edit the file, save it, and refresh your browser.
Running the Examples Locally
If you'd like, you can run the server outside of a virtual machine. I'd only recommend doing this if you're experienced with setting up a Ruby development environment.
- Install the version of Ruby listed in the .ruby-version file.
- Install Bundler.
bundle installinside this project's directory.
bundle exec middlemanto start up the project.
This project is organized into the following directories:
source: Contains all of the source code for the examples.
source/layouts: Contains the main layout file in which all of the examples are included.
source/pages: The pages that make the examples. This directory is further divided up into chapter directories.
source/stylesheets: The stylesheets for the examples. The organization of the directory is the same as
source/pages. The styles for each example contain two files. The first,
<page_name>.css, are the styles listed in the book. The second,
other_<page_name>_styles.csscontain the styles left out of the book.
source/images: The images for the examples, organized in the same way as
© 2017 Landon Schropp LLC All Rights Reserved