Mohammed
Mohammed

Reputation: 35

Admin-LTE theme integration in yii2 & changing its default theme

I have integrated the AdminLTE theme in my web app now I want to change the theme of the AdminLTE from its default blue black to red color, How can I do this? In which files I need to make the required changes..?

Upvotes: 0

Views: 4362

Answers (3)

Javier Quisbert
Javier Quisbert

Reputation: 11

link rel="stylesheet" href="/adminlte/dist/css/skins/<strike>skin-blue</strike>.min.css"

body class="hold-transition <strike>skin-blue</strike> sidebar-mini"

In the above, change this skin-blue with

options:

  • skin-purple
  • skin-yellow
  • skin-red
  • skin-green

Upvotes: 1

Prahlad
Prahlad

Reputation: 796

In My case I just change body class to

<body class="skin-red">

in layouts/main.php

Upvotes: 3

Bizley
Bizley

Reputation: 18021

Are you using dmstr extension for this? If so set this in configuration:

'components' => [
    'assetManager' => [
        'bundles' => [
            'dmstr\web\AdminLteAsset' => [
                'skin' => 'skin-red',
            ],
        ],
    ],
],

and then in layout add

<body class="<?= \dmstr\helpers\AdminLteHelper::skinClass() ?>">

If you are not using this extension or just don't want to play with config file add the proper class name in layout's body like:

<body class="skin-red">

Just make sure you have got proper css file in dist/css/skins folder.

Upvotes: 0

Related Questions