All Projects → ricar2ce → yii2-material-theme

ricar2ce / yii2-material-theme

Licence: MIT License
Material Theme for Yii2

Programming Languages

CSS
56736 projects
javascript
184084 projects - #8 most used programming language
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to yii2-material-theme

Vuetify Material Dashboard
Vuetify Material Dashboard - Open Source Material Design Admin
Stars: ✭ 1,023 (+6720%)
Mutual labels:  material, material-theme
Jekyll Material Theme
A Jekyll Theme based on Material Design using Materialize.
Stars: ✭ 165 (+1000%)
Mutual labels:  material, material-theme
Ibackdrop
A library to simply use Backdrop in your project (make it easy). Read more ->
Stars: ✭ 137 (+813.33%)
Mutual labels:  material, material-theme
Svelte Materialify
A Material UI Design Component library for Svelte heavily inspired by vuetify.
Stars: ✭ 351 (+2240%)
Mutual labels:  material, material-theme
yii2-rest-api
Yii 2 REST API Project Template
Stars: ✭ 36 (+140%)
Mutual labels:  yii2, yii2-template
Material Awesome
Material and Mouse driven config for AwesomeWM 4.3
Stars: ✭ 588 (+3820%)
Mutual labels:  material, material-theme
Material
New Material —— A Material Design Theme for Typecho
Stars: ✭ 144 (+860%)
Mutual labels:  material, material-theme
Chromaterial
ChroMATERIAL is an IntelliJ Platform coloring scheme that expresses the chromatic nature of Material Design within IntelliJ and Android Studio. It is intended to highlight the most import aspects of your code.
Stars: ✭ 143 (+853.33%)
Mutual labels:  material, material-theme
Yii2
Yii 2: The Fast, Secure and Professional PHP Framework
Stars: ✭ 13,852 (+92246.67%)
Mutual labels:  yii2, php-framework
Yii2 Enhanced Gii
Enhanced Yii2 Gii (generator) that generates related Models & CRUD
Stars: ✭ 183 (+1120%)
Mutual labels:  yii2, php-framework
Quasar
Quasar Framework - Build high-performance VueJS user interfaces in record time
Stars: ✭ 20,090 (+133833.33%)
Mutual labels:  material, material-theme
yii2-docker-app-advanced
Yii 2 Advanced Project Template under docker and docker-compose
Stars: ✭ 25 (+66.67%)
Mutual labels:  yii2, yii2-template
base16-materialtheme-scheme
Material Themes for Base16
Stars: ✭ 70 (+366.67%)
Mutual labels:  material, material-theme
Vuetify
🐉 Material Component Framework for Vue
Stars: ✭ 33,085 (+220466.67%)
Mutual labels:  material, material-theme
Jeffrey Way Theme
Jeffrey Way's theme on Laracasts. Example: https://laracasts.com/series/whats-new-in-laravel-5-1/episodes/2.
Stars: ✭ 180 (+1100%)
Mutual labels:  material, material-theme
php-framework-benchmark
php framework benchmark (include laravel、symfony、silex、lumen、slim、yii2、tastphp etc)
Stars: ✭ 17 (+13.33%)
Mutual labels:  yii2, php-framework
yii2-basic-firestarter
This is a pimped up basic yii2 template ❤️. It's a firestarter 🔥
Stars: ✭ 35 (+133.33%)
Mutual labels:  yii2, yii2-template
neper
Polycrystal generation and meshing
Stars: ✭ 111 (+640%)
Mutual labels:  material
yii2-jwt-user
JWT (JSON Web Token) User component for Yii 2
Stars: ✭ 16 (+6.67%)
Mutual labels:  yii2
startmvc
超轻量php框架 lightweight php framework
Stars: ✭ 25 (+66.67%)
Mutual labels:  php-framework

Yii2 Material Theme

Material UI for Yii2 Framework, based on Creative Tim Material Dashboard

alt text

Material Dashboard is a free Material Bootstrap Admin with a fresh, new design inspired by Google's Material Design. We are very excited to introduce our take on the material concepts through an easy to use and beautiful set of components. Material Dashboard was built over the popular Bootstrap framework and it comes with a couple of third-party plugins redesigned to fit in with the rest of the elements.

Material Dashboard makes use of light, surface and movement. The general layout resembles sheets of paper following multiple different layers, so that the depth and order is obvious. The navigation stays mainly on the left sidebar and the content is on the right inside the main panel.

This product came as a result of users asking for a material dashboard after we released our successful Material Kit. We developed it based on your feedback and it is a powerful bootstrap admin dashboard, which allows you to build products like admin panels, content managements systems and CRMs.

Material Dashboard comes with 5 color filter choices for both the sidebar and the card headers (blue, green, orange, red and purple) and an option to have a background image on the sidebar.

Material Dashboard uses a framework built by our friend Federico - Bootstrap Material Design, who did an amazing job creating the backbone for the material effects, animations, ripples and transitions. Big thanks to his team for the effort and forward thinking they put into it.

Special thanks go to:

Installation

The preferred way to install this extension is through composer.

Either run

php composer require --prefer-dist ricar2ce/yii2-material-theme "*"

or add

"ricar2ce/yii2-material-theme": "*"

to the require section of your composer.json file.

Quick Start

Once the extension is installed, you can have a preview by reconfiguring the path mappings of the view component:

'components' => [
    'view' => [
        'theme' => [
            'pathMap' => [
                '@app/views' => '@vendor/ricar2ce/yii2-material-theme/view'
            ],
        ],
    ],
],

Or in your layouts/main.php include followin code for use de assets

<?php

/* @var $this \yii\web\View */
/* @var $content string */
/*
use yii\dependencies
*/
//Register class
if (class_exists('rce\material\Assets')) {
    rce\material\Assets::register($this); ?>
}
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>

Don't forget to remove 'yii\bootstrap\BootstrapAsset' and 'yii\bootstrap\BootstrapPluginAsset' from backend\asset\AppAsset(advence) or app\asset\AppAsset(basic)

Customization

  • Copy files from vendor/ricar2ce/yii2-material-theme/view
  • Remove the custom view configuration from your application by entered the new path mappings, if you have made them before.

Web-font usage

This extension use the fallowing depend for the font icons usage:


Config template

Default config.

[
    'siteTitle' = 'Material Dashboard',
    'sidebarColor' => 'rose', // "purple | azure | green | orange | danger | rose"
    'sidebarBackgroundColor' => 'black', // "black | white"
    'sidebarBackgroundImage' => 'template/material-dashboard/img/sidebar-1.jpg'
]

You can change it in config file.

'components' => [
    'assetManager' => [
        'bundles' => [
            'rce\material\Assets' => [
	              'siteTitle' = 'Your Site Name',
                'sidebarColor' => 'azure',
                'sidebarBackgroundColor' => 'black',
                'sidebarBackgroundImage' => 'img url'
            ],
        ],
    ],
],

or

using bundled assets

    Yii::$container->set(
        Assets::className(),
        [
	    'siteTitle' = 'Your Site Name',
	    'sidebarColor' => 'rose',
	    'sidebarBackgroundColor' => 'black',
	    'sidebarBackgroundImage' => 'img url'
        ]
    );

Sidebar menu - Widget Menu

        $menu = RCEmenu::widget(
            [
                'items' => [
                    ['label' => 'Dashboard', 'icon' => 'dashboard', 'url' => ['/site/index']],
                    [
                        'label' => 'Multi Level Collapse',
                        'icon' => 'swap_vertical_circle',
                        'url' => '#',
                        'items' => [
                            ['label' => 'Level One', 'url' => '#',],
                            [
                                'label' => 'Level Two',
                                'icon' => 'swap_vertical_circle',
                                'url' => '#',
                                'items' => [
                                    ['label' => 'Level Three', 'url' => '#',],
                                    ['label' => 'Level Three', 'url' => '#',],
                                ],
                            ],
                        ],
                    ],
                    [
                        'label' => 'Some tools',
                        'icon' => 'build',
                        'url' => '#',
                        'items' => [
                            ['label' => 'Gii', 'icon' => 'settings_input_composite', 'url' => ['/gii'],],
                            ['label' => 'Debug', 'icon' => 'bug_report', 'url' => ['/debug'],],
                        ],
                    ],
                ],
            ]
        );

create menu.php in common\models(advence) or app\models(basic) if you configuring the path mappings of the view component

example:

<?php
namespace common\models;

use Yii;
use rce\material\widgets\Menu as RCEmenu;

class Menu  
{
    static function getMenu() {
        $menu = RCEmenu::widget(
            [
                'items' => [
                    ['label' => 'Dashboard', 'icon' => 'dashboard', 'url' => ['/site/index']],
                    [
                        'label' => 'Multi Level Collapse',
                        'icon' => 'swap_vertical_circle',
                        'url' => '#',
                        'items' => [
                            ['label' => 'Level One', 'url' => '#',],
                            [
                                'label' => 'Level Two',
                                'icon' => 'swap_vertical_circle',
                                'url' => '#',
                                'items' => [
                                    ['label' => 'Level Three', 'url' => '#',],
                                    ['label' => 'Level Three', 'url' => '#',],
                                ],
                            ],
                        ],
                    ],
                    [
                        'label' => 'Some tools',
                        'icon' => 'build',
                        'url' => '#',
                        'items' => [
                            ['label' => 'Gii', 'icon' => 'settings_input_composite', 'url' => ['/gii'],],
                            ['label' => 'Debug', 'icon' => 'bug_report', 'url' => ['/debug'],],
                        ],
                    ],
                ],
            ]
        );
        return $menu;
    }

}

By default to icons will be added prefix of Material Icon


Notification : Noti widget

This is the Noti widget and Yii 2 enhanced wrapper for the Bootstrap Notify plugin

Usage

Add widget to your layout/main :

use rce\material\widgets\Noti;

<?= Noti::widget(); ?>

Noti widget renders a message from session flash. All flash messages are displayed in the sequence they were assigned using setFlash. You can set message as following:

Set the message in your action, for example:

Yii::$app->session->setFlash('success', 'This is the success');
Yii::$app->session->setFlash('info', 'Your info');
Yii::$app->session->setFlash('warning', 'Your warning');
Yii::$app->session->setFlash('error', 'Your error');

Also, you can set multiple messages as follows:

Yii::$app->session->setFlash('info', ['message 1', 'message 2']);

Render message without the session flash

<?= rce\material\widgets\Noti::widget([
    'useSessionFlash' => false,
    'options' => [
        'message' => 'Your message',
    ],
    'clientOptions' => [
        'type' => 'info', // "error | warning | info | success | danger "
    ]
]); ?>

===============

TO DO

  • [template] add other material template ( backend & frontend )
  • [widgets] add more widgets for material template ( each template )

License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].