161/zf-octicons-view-helper

Use Octicons with Zend\View: echo $this->octicon('mark-github')

0.1.2 2017-08-30 17:16 UTC

This package is auto-updated.

Last update: 2024-11-18 04:45:28 UTC


README

Build Status Latest Version License

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 your config/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