官术网_书友最值得收藏!

Installing Twitter Bootstrap

Twitter Bootstrap is a frontend HTML5 framework that allows anyone to easily construct reliable interfaces. At the time of writing, the version of Bootstrap used is version 3.1.1.

We will use Twitter Bootstrap throughout this book to provide the framework for all view files and templates. We will look at how to download Twitter Bootstrap and how to install it in the CodeIgniter filesystem.

Firstly, we will need to download the Twitter Bootstrap files. To do that, perform the following steps:

  1. Open your web browser and go to the Bootstrap download link at http://getbootstrap.com/getting-started. You'll see something similar to what is shown in the following screenshot:
    Installing Twitter Bootstrap
  2. Find the Download Bootstrap link and click on it (as indicated in the preceding screenshot); the download will start automatically.

Once the download is finished, go to its location on your machine and unpack the archived file. Inside the unpacked file, you should see something similar to what is shown in the following structure:

bootstrap/
├── css/
│   ├── bootstrap-theme.css
│   ├── bootstrap-theme.css.map
│   ├── bootstrap-theme.min.css
│   └── bootstrap.css
│   └── bootstrap.css.map
│   └── bootstrap.min.css
├── js/
│   ├── bootstrap.js
│   └── bootstrap.min.js
└── fonts/
    ├── glyphicons-halflings-regular.eot
    ├── glyphicons-halflings-regular.svg
    ├── glyphicons-halflings-regular.ttf
    └── glyphicons-halflings-regular.woff

Move the bootstrap folder to your CodeIgniter installation so that the file hierarchy looks like the following:

/path/to/web/root/
├── application/
└── views/
    ├── common
        ├── header.php
        ├── footer.php
├── system/
├── bootstrap/
├── index.php
├── license.txt

In the preceding tree structure, the application and system directories are to do with CodeIgniter, as are the index.php and license.txt files; however, the bootstrap directory contains the contents of your Bootstrap download.

I have also indicated the location of the common header.php and footer.php files. These files are used throughout the book and act as a wrapper for every other view file.

主站蜘蛛池模板: 宁武县| 万载县| 澄城县| 清丰县| 鹿泉市| 神池县| 香河县| 开鲁县| 大邑县| 什邡市| 兖州市| 黄平县| 大荔县| 化州市| 长汀县| 淮阳县| 南靖县| 台北市| 舒城县| 清苑县| 溧阳市| 子长县| 吉首市| 淳安县| 罗山县| 易门县| 白城市| 忻城县| 伊金霍洛旗| 怀柔区| 岳普湖县| 南阳市| 浪卡子县| 永丰县| 崇左市| 青川县| 岳阳县| 蓬安县| 金堂县| 东阳市| 宜君县|