All Projects → yiisoft → yii-bulma

yiisoft / yii-bulma

Licence: BSD-3-Clause license
Yii Framework Bulma Integration

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to yii-bulma

mailer
Generic mailer
Stars: ✭ 16 (-30.43%)
Mutual labels:  yii3
i18n
Yii i18n
Stars: ✭ 20 (-13.04%)
Mutual labels:  yii3
csrf
PSR-15 middleware implementing CSRF protection
Stars: ✭ 20 (-13.04%)
Mutual labels:  yii3
yii-cycle
Cycle ORM support for Yii
Stars: ✭ 30 (+30.43%)
Mutual labels:  yii3
vue-portfolio
💼 Portfolio built with Vue and Bulma
Stars: ✭ 13 (-43.48%)
Mutual labels:  bulma
cookies
Convenient way to use cookies with PSR-7
Stars: ✭ 17 (-26.09%)
Mutual labels:  yii3
bulma-vuejs-demo-website
A demo website based on framework Bulma (css) & vuejs (JS)
Stars: ✭ 49 (+113.04%)
Mutual labels:  bulma
demo-api
www.yiiframework.com/
Stars: ✭ 23 (+0%)
Mutual labels:  yii3
Cool-Checkboxes-for-Bulma.io
Cool CSS based checkbox for Bulma.io
Stars: ✭ 66 (+186.96%)
Mutual labels:  bulma
ghost-vue
Frontend for Ghost built with Vue.js and Bulma
Stars: ✭ 25 (+8.7%)
Mutual labels:  bulma
bulma-admin
Free admin panel template based on bulma css
Stars: ✭ 28 (+21.74%)
Mutual labels:  bulma
validator
Yii validator library
Stars: ✭ 47 (+104.35%)
Mutual labels:  yii3
balance
A laravel finance application for everyday use
Stars: ✭ 23 (+0%)
Mutual labels:  bulma
graphX
A simple blog based on Nuxt and graphQL
Stars: ✭ 19 (-17.39%)
Mutual labels:  bulma
Wall-Street
A React Based Web App that allows you to trade virtually
Stars: ✭ 29 (+26.09%)
Mutual labels:  bulma
log
PSR-3 compatible logger
Stars: ✭ 32 (+39.13%)
Mutual labels:  yii3
Bulma-Snippets-Sublime-Text-Plugin
Bulma Snippets Sublime Text Plugin
Stars: ✭ 13 (-43.48%)
Mutual labels:  bulma
capsule
A Hugo theme based on the CSS-only Bulma framework.
Stars: ✭ 20 (-13.04%)
Mutual labels:  bulma
bulma-dracula
😈 Bulma css with Dracula dark color themes
Stars: ✭ 25 (+8.7%)
Mutual labels:  bulma
admin-two-vue-bulma-dashboard
Free Vue.js Bulma Buefy Admin Dashboard Template. Vite & Vue CLI supported
Stars: ✭ 68 (+195.65%)
Mutual labels:  bulma

Yii Framework Bulma Integration


Latest Stable Version Total Downloads Build status Scrutinizer Code Quality Code Coverage Mutation testing badge static analysis type-coverage

This Yii Framework package encapsulates Bulma components and plugins in terms of Yii widgets, and thus makes using Bulma components/plugins in Yii applications convenient.

Installation

composer require yiisoft/yii-bulma --prefer-dist

Install assets

There are several ways to install the assets, they are:

1.- Using the AssetPackagist package manager.

Add to composer.json the following:

{
    "require": {
        "npm-asset/bulma": "^0.9.3",
        "npm-asset/bulma-helpers": "^0.4.2",
        "npm-asset/vizuaalog--bulmajs": "^0.12.1",
        "oomphinc/composer-installers-extender": "^2.0.0",
    },
    "extra": {
        "installer-types": [
            "npm-asset"
        ],
        "installer-paths": {
            "./node_modules/{$name}": [
                "type:npm-asset"
            ]
        }
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    ]
}

Once the changes are made, you can install the assets using the following command:

composer update --prefer-dist

2.- Using the npm-asset package manager.

Run the following command at the root directory of your application.

npm i bulma
npm i @vizuaalog/bulmajs
npm i bulma-helpers

Using assets

Bulma is a CSS framework that provides all the CSS and SASS files to customize your application, the widgets by default do not register any Asset so you must register them in your application to be used, since you can simply use the default CSS file layout, or build your own custom CCS.

Three Assets are provided:

  • BulmaAsset: CSS, SASS file bulma css framework without JS code.
  • BulmaHelperAsset: CSS, SASS, MIXINS it is an auxiliary library provide file helpers for Bulma CSS framework.
  • BulmaJsAsset: Vizuaalog/BulmaJs it is an auxiliary library that has all the JS used by the Bulma CSS framework, you can decide to use this library, or alternatively write your own JS code.

To use widgets only, register BulmaAsset::class, which we can do in several ways explained below.

Register asset in view layout or individual view

By registering the Asset in the resources/layout/main.php it will be available for all views. If you need it registered for individual view (such as resources/views/site/contact.php) only, register it in that view.

use  Yiisoft\Yii\Bulma\Asset\BulmaAsset;

/**
 * @var Yiisoft\Assets\AssetManager $assetManager
 * @var Yiisoft\View\WebView $this
 */

$assetManager->register(BulmaAsset::class);

$this->setCssFiles($assetManager->getCssFiles());
$this->setJsFiles($assetManager->getJsFiles());

Register asset in application params

You can register asset in the assets parameters, (by default, this is config/packages/yiisoft/assets/params.php). Asset will be available for all views of this application.

use Yiisoft\Yii\Bulma\Asset\BulmaAsset;

'yiisoft/asset' => [
    'assetManager' => [
        'register' => [
            BulmaAsset::class,
        ],
    ],
],

Then in resources/layout/main.php:

/* @var Yiisoft\View\WebView $this */

$this->setCssFiles($assetManager->getCssFiles());
$this->setJsFiles($assetManager->getJsFiles());

Widgets usage

We will quickly and easily describe how to use widgets, and be able to use all the power of the Bulma CSS framework with PHP:

Testing

Unit testing

The package is tested with PHPUnit. To run tests:

./vendor/bin/phpunit

Mutation testing

The package tests are checked with Infection mutation framework with Infection Static Analysis Plugin. To run it:

./vendor/bin/roave-infection-static-analysis-plugin

Static analysis

The code is statically analyzed with Psalm. To run static analysis:

./vendor/bin/psalm

License

The Yii Framework Bulma Integration is free software. It is released under the terms of the BSD License. Please see LICENSE for more information.

Maintained by Yii Software.

Support the project

Open Collective

Follow updates

Official website Twitter Telegram Facebook Slack

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].