161 / zf-octicons-view-helper
Use Octicons with Zend\View: echo $this->octicon('mark-github')
Installs: 38
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Language:HTML
Requires
- php: ^7.0
- zendframework/zend-json: ^3.0 || ^2.6
- zendframework/zend-servicemanager: ^3.0
- zendframework/zend-view: ^2.6
Requires (Dev)
- phpunit/phpunit: ^6.0 || ^5.7
This package is auto-updated.
Last update: 2024-11-18 04:45:28 UTC
README
Usage
<!-- view/application/your-page.phtml --> <button class="btn btn-primary"><?= $this->octicon('mark-github') ?> GitHub's icons</button>
/* octicons.css */ .octicon { display: inline-block; vertical-align: text-top; fill: currentColor; }
FAQ
Options
$this->octicon('mark-github', 1); // icon size: 100% $this->octicon('mark-github', 2); // icon size: 200% $this->octicon('mark-github', [ 'ratio' => 1, // icon size: 100% 'class' => 'octicon', // Attribute class="" ]);
Installation
$ composer require 161/zf-octicons-view-helper
- Add module
Io161\Octicons
in yourconfig/module.config.php
- Add style
octicons.css
Update Octicons
$ composer octicons-update
Yarn is required or replace Yarn by NPM in composer.json file.
Running Unit Tests
$ composer test