• Stars
    star
    3
  • Rank 3,963,521 (Top 79 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A package to simplify changing between different icon sets

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.

Install

You can install via composer

composer require peterfox/hieroglyph

Using Hieroglyph with Laravel

Add the Service Provider

Hieroglyph\Laravel\HieroglyphServiceProvider::class,

Add the Facade

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

Publish the config using artisan

php artisan vendor:publish

Edit the hierogplyph config

<?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

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

{!! 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.

More Repositories

1

laravel-webhook-demo

The example code for the article https://medium.com/@SlyFireFox/laravel-innovations-making-your-own-webhook-mechanism-through-notifications-96e75e99a2b1
PHP
17
star
2

laravel-elixir-mjml

A task plugin for running MJML templates in Laravel Elixir
JavaScript
11
star
3

hexavel

A modified version of the Laravel Framework
PHP
7
star
4

openai-laravel-demo

A demo app for using OpenAI with Laravel
PHP
7
star
5

macros-demo

A Demo for Macros
PHP
7
star
6

nova-social-login-demo

A demo for how to implement Social Logins for Laravel Nova
PHP
5
star
7

laravel-runscope

A PHP library for making it easy to use Runscope with your web hooks and external API calls
PHP
5
star
8

notifications-demo

The code in this project is an example of how to create a simple streamlined email unsubscribe mechanism for Laravel's notification system
PHP
5
star
9

roadrunner-plugin-template

Template project for a RoadRunner plugin
Go
3
star
10

bitpayclient

An OOP PHP client for interacting with the BitPay API
PHP
2
star
11

validation-rule-demo

The example code for the article https://medium.com/@SlyFireFox/test-driven-development-for-custom-laravel-validation-rules-669d01e34a65
PHP
2
star
12

seo-demo

The code in this project is an example of how to create root level URLs for dynamic content without causing wildcard clashes
PHP
2
star
13

make-command-demo

A demo for making new Make commands in Laravel
PHP
2
star
14

laravel-incident-logs-demo

The example code for the article https://medium.com/@SlyFireFox/laravel-how-to-make-incident-logs-d7fa88e48490
PHP
2
star
15

hexavel-spark

A library for making installs of Spark compatible with Laravel Spark
PHP
1
star
16

torino

An example of a simple Onion address generator
JavaScript
1
star
17

graphaware-reco-client-php

A configurable PHP library for fetching recommendations from a GraphAware Recommendation setup
PHP
1
star
18

waitformysql

A mini golang util for waiting for a mysql database to be up
Go
1
star
19

laravel-casts-examples

A demo for Laravel Custom Casts with common examples for Money, Location/Address and Date Intervals
PHP
1
star
20

testing-trait-hooks-demo

Demo for Trait hooks to use in Test Cases
PHP
1
star
21

custom-make-model-command

A demo for customising the Laravel make model command to use singular table names.
PHP
1
star