2017 © Pedro Peláez
 

library hieroglyph

A package to simplify changing between different icon sets

image

peterfox/hieroglyph

A package to simplify changing between different icon sets

  • Tuesday, May 3, 2016
  • by peterfox
  • Repository
  • 1 Watchers
  • 3 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Hieroglyph

A simple package for PHP making it easier to switch around the icon sets you use in your markup. There's currently a lot of different icon sets and changing between them can be a pain. The idea of Hieroglyph is that you can map the correct icons in your application to the different sets and even apply modifiers without fixing your mark up to using one icon set., (*1)

Install

You can install via composer, (*2)

composer require peterfox/hieroglyph

Using Hieroglyph with Laravel

Add the Service Provider, (*3)

Hieroglyph\Laravel\HieroglyphServiceProvider::class,

Add the Facade, (*4)

'Hiero' => Hieroglyph\Laravel\HieroglyphFacade::class,

Publish the config using artisan, (*5)

php artisan vendor:publish

Edit the hierogplyph config, (*6)

<?php

return [

    'default' => 'font-awesome',

    'font-awesome' => [
        'template' => '<i class="fa %s" aria-hidden="true"></i>',
        'prefix' => 'fa-',
        'icons' => [
            // Add icons here .e.g. 'create' => 'pencil' or 'loading' => 'spinner'
        ],
        'modifiers' => [
            'spin' => 'spin',
            'large' => 'lg',
            'twoX' => '2x',
            'threeX' => '3x',
            'fourX' => '4x',
            'fiveX' => '5x',
            'fixedWidth'    => 'fw',
            'button'        => 'btn',
        ]
    ],
];

Using the Facade, (*7)

Hiero::glyph('twitter');
Hiero::glyph('instagram')->large();
Hiero::glyph('loading')->large()->spin();
Hiero::glyph('loading')->button()->spin();
Hiero::glyphDecision(true, 'ok', 'wrong')->large();

Using the Facade in Blade, (*8)

{!! Hiero::glyph('facebook') !!}
{!! Hiero::glyphDecision(true, 'ok', 'wrong')->large() !!}

Contribute

Currently I've only supported what I've personally needed. I'd love to make a twig extension and a Symphony bundle but currently it's no a requirement for me. I can't really take any requests or suggestions but if you want to do the work and make a pull request I'll do my best to add it., (*9)

The Versions

03/05 2016

dev-master

9999999-dev

A package to simplify changing between different icon sets

  Sources   Download

MIT

03/05 2016

1.1.0

1.1.0.0

A package to simplify changing between different icon sets

  Sources   Download

MIT

26/04 2016

1.0.0

1.0.0.0

A package to simplify changing between different icon sets

  Sources   Download

MIT