A responsive Yii theme utilising all the goodness of H5BP and Twitter Bootstrap.
After trying various Yii Bootstrap extensions, I decided to create a simple theme that uses Yii's standard components and widgets.
The theme takes advantage of the fantastic HTML5 Boilerplate (H5BP) with a modified .htaccess to enable pretty urls in Yii.
H5BP's best practices and .htaccess can dramatically increase the performance of your website. Try it in YSlow!
So you want to use it with CGridView?
Download the pager extension here:
Tested on Yii 1.1.10
Create a new webapp in Yii.
Copy all files from archive, overwriting config/main.php
Open .htaccess in your root folder and set 'RewriteBase /base/' to your application's root folder or '/' if the app is in your webroot (typical in production).
By default I make the assumption that you are using Apache and the .htaccess enables URL Rewriting. The theme can be used without pretty urls by deleting/renaming the .htaccess file and modifying the urlManager properties in the main config file.
Currently there is no Gii generator for the view files. I may look into adding this when I have more time, or you're welcome to get involved yourself. Instead, you should create the views as usual and copy them over to the theme folder for modification. This has the benefit of having a fallback to Yii's standard theme.
You will see how I have modified the standard contact and login pages which should help you on your way. Compare them side by side and see how I have added the necessary css classes to the standard widgets. I have also removed the divs that wrap the input fields since they're not needed and the css class 'row' conflicts with Bootstrap's own.
EDIT: This generator may work: http://www.yiiframework.com/extension/giiplus/ but I haven't tried it. A brief look at the source from the demo shows some remnants of the old Blueprint classes.
Don't modify the Bootstrap files. Use the included styles.css and script.js so that you can easily update Bootstrap when necessary. However, I have combined bootstrap.min.css and bootstrap-responsive.css as bootstrap-and-responsive.min.css. Why make 2 trips to the server? You will need to be aware of this if you update the Bootstrap files.
Free to use under the terms of any respective Yii, H5BP or Twitter Bootstrap Licenses.
The logo license details can be found here: http://www.yiiframework.com/logo/