2017 © Pedro Peláez
 

symfony-bundle ionicons-bundle

Easy integration of Ionicons into Symfony2 projects (based on similar package by Coding Fogey).

image

neonexus/ionicons-bundle

Easy integration of Ionicons into Symfony2 projects (based on similar package by Coding Fogey).

  • Thursday, August 7, 2014
  • by demortis
  • Repository
  • 1 Watchers
  • 0 Stars
  • 183 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 10 Versions
  • 1 % Grown

The README.md

NeoNexusIoniconsBundle

Dependency Status SensioLabsInsight Latest Stable Version Latest Unstable Version Total Downloads License, (*1)

About

This Bundle makes it easy to integrate Ionicons into your Symfony2 projects., (*2)

Prerequisites

  • Ionicons repo installed somewhere in your project. It is not contained in this bundle. You can use Composer, Bower or any other way to install it.

Installation

  1. Add neonexus/ionicons-bundle to your composer.json:, (*3)

    {
        ...
        "require": {
            ...
            "neonexus/ionicons-bundle": "0.4.*",
            "driftyco/ionicons": "1.5.*"
        }
        ...
    }
  2. Add IoniconsBundle to your AppKernel.php:, (*4)

    ...
    public function registerBundles()
    {
        $bundles = array(
            ...
            new NeoNexus\Ionicons\IoniconsBundle()
        );
        ...
    }
    ...
  3. Update your dependencies: composer update., (*5)

NOTICE Installing Ionicons via composer is optional but makes this bundle work out of the box. So I recommend this way., (*6)

Configuration

If you did not install Ionicons via composer you have to configure the path to your installation:, (*7)

ionicons:
    assets_dir: %kernel.root_dir%/../vendor/driftyco/ionicons

Customization

If you want to customize Ionicons you have to put a customized variables file somewhere in your project and configure the path. You also have to set the output path., (*8)

ionicons:
    filter: less
    customize:
        variables_file:         %kernel.root_dir%/Resources/ionicons/variables.less
        ionicons_output:    %kernel.root_dir%/Resources/less/ionicons.less

If you want to use the lessphp or sass Assetic filter you have to set the filter variable accordingly., (*9)

There is a command to generate a customized output file to incorporate your customized variables file:, (*10)

app/console neonexus:ionicons:generate

Usage

Installation of font files

The bundle provides a command to install the font files to the web/fonts directory:, (*11)

app/console neonexus:ionicons:install

There is also a ScriptHandler for conveniently doing this automatically on each composer install or composer update:, (*12)

...
"scripts": {
    "post-install-cmd": [
        ...
        "NeoNexus\\Ionicons\\Composer\\ScriptHandler::install"
    ],
    "post-update-cmd": [
        ...
        "NeoNexus\\Ionicons\\Composer\\ScriptHandler::install"
    ]
},
...

To include the Ionicons css just include @ionicons_css in your base template., (*13)

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>{% block title %}Welcome!{% endblock %}</title>
        {% block stylesheets %}
            {% stylesheets
                '@ionicons_css'
            %}
                <link rel="stylesheet" href="{{ asset_url }}" media="screen"/>
            {% endstylesheets %}
        {% endblock %}

Simple icons (currently broken)

To insert a simple icon add {{ fa_icon( icon name|options ) }} into your template., (*14)

The parameter can be a string containing only the icon name without fa- prefix or JSON for more customization. The complete set of options is as follows:, (*15)

{
    icon:           name of the icon without 'fa-' prefix
    scale:          [lg|2x|3x|4x|5x|stack-1x|stack-2x],
    fixed-width:    [true|false],
    list-icon:      [true|false],
    border:         [true|false],
    pull:           [left|right],
    spin:           [true|false],
    rotate:         [90|180|270],
    flip:           [horizontal|vertical],
    inverse:        [true|false]
}

TODO

  • Fix the Twig Extension
  • Fix the tests

License

Acknowledgment

The Versions

07/08 2014

dev-master

9999999-dev

Easy integration of Ionicons into Symfony2 projects (based on similar package by Coding Fogey).

  Sources   Download

MIT

The Requires

 

The Development Requires

07/08 2014

dev-develop

dev-develop

Easy integration of Ionicons into Symfony2 projects (based on similar package by Coding Fogey).

  Sources   Download

MIT

The Requires

 

The Development Requires

07/08 2014

v0.4.3

0.4.3.0

Easy integration of Ionicons into Symfony2 projects (based on similar package by Coding Fogey).

  Sources   Download

MIT

The Requires

 

The Development Requires

07/08 2014

v0.4.2

0.4.2.0

Easy integration of Ionicons into Symfony2 projects (based on similar package by Coding Fogey).

  Sources   Download

MIT

The Requires

 

The Development Requires

07/08 2014

v0.4.1

0.4.1.0

Easy integration of Ionicons into Symfony2 projects (based on similar package by Coding Fogey).

  Sources   Download

MIT

The Requires

 

The Development Requires

07/08 2014

v0.4.0

0.4.0.0

Easy integration of Ionicons into Symfony2 projects (based on similar package by Coding Fogey).

  Sources   Download

MIT

The Requires

 

The Development Requires

25/01 2014

v0.3.0

0.3.0.0

Easy integration of Font Awesome into Symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Ernst

05/12 2013

v0.2.1

0.2.1.0

Easy integration of Font Awesome into Symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Ernst

05/12 2013

v0.2.0

0.2.0.0

Easy integration of Font Awesome into Symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Ernst

22/11 2013

v0.1.0

0.1.0.0

Easy integration of Font Awesome into Symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Ernst