Revision #190 has been created by rackycz on May 7, 2020, 10:23:46 AM with the memo:
Bootswatch
« previous (#189) next (#191) »
Changes
Title
unchanged
Yii v2 snippet guide
Category
unchanged
Tutorials
Yii version
unchanged
2.0
Tags
unchanged
tutorial,beginner,yii2
Content
changed
[...]
**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',
],
]);
```