Skip to content

161io/zf-octicons-view-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use Octicons with Zend\View

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