Yii v2 snippet guide

Comparing #189 with #190

Revision #190 was created by rackycz rackycz on May 7, 2020, 10:23:46 AM.

Bootswatch

Content

[...]
**Simple Bootstrap themes**
---
There is this page [bootswatch.com](https://bootswatch.com) which provides simple bootstrap themes. It is enough to replace one CSS file - you can do it in file "views/layouts/main.php" just by adding following row before < /head > tag:

```html
<link href="https://bootswatch.com/3/
readableunited/bootstrap.min.css" rel="stylesheet"> </head> ``` Note that currently Yii2 is using Bootstrap3 so when searching for themes, dont forget to switch to section [Bootstrap 3](https://bootswatch.com/3/).
 
 
Important: Yii2 is using navbar with classes "navbar-inverse navbar-fixed-top". If you are using themes from Bootswatch, change the navbar class to "navbar navbar-default navbar-fixed-top". This is also done in file "views/layouts/main.php" like this:
 
 
```php
 
    NavBar::begin([
 
        // ...
 
        'options' => [
 
            'class' => 'navbar navbar-default navbar-fixed-top',
 
        ],
 
    ]);
 
```