Giter Site home page Giter Site logo

sftangoiconsplugin's Introduction

sfTangoIconsPlugin

StyleCI

symfony 1.x plugin that offers a set of Tango Icons in sizes extra small (16x16 px), small (22x22 px) and medium (32x32 px).

Installation

  • Install the plugin

    composer require tomasz-rup/sf-tango-icons-plugin

Configuration

  • You can set the default size of icons in app.yml:

    all:
      tango_icons:
        size: small
  • Activate helper in settings.yml:

    standard_helpers: [...TangoIcons]

    or:

    use_helper('TangoIcons');

Use

Icons

If you have selected the default size of icons:

<img src="<?php echo ti_get_action_icon_uri(TangoIconsAction::GO_HOME) ?>" alt="" />

If you do not have determined the size of the default icons, or want to manually set the icon size:

<img src="<?php echo ti_get_action_icon_uri(TangoIconsAction::GO_HOME, 'small') ?>" alt="" />

Animation

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <script type="text/javascript" src="sfTangoIconsPlugin/js/jquery.processworking.js"></script>
  <link href="sfTangoIconsPlugin/css/animation.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
      $(document).ready(function() {
        $('#animation').processWorking('init', 32);
      });
    </script>
  </head>
  <body>
      <div id="animation"></div>
      <button type="button" onclick="$('#animation').processWorking('start', 15);">Start 15</button>
      <button type="button" onclick="$('#animation').processWorking('start', 30);">Start 30</button>
      <button type="button" onclick="$('#animation').processWorking('start', 60);">Start 60</button>
      <button type="button" onclick="$('#animation').processWorking('stop');">Stop</button>
  </body>
</html>

Icon size

Proper icon sizes are:

  • For extra small icons:
    • 16
    • 16px
    • extra-small
    • extra small
    • x-small
  • For small icons:
    • 22
    • 22px
    • small
  • For medium icons:
    • 32
    • 32px
    • medium

sftangoiconsplugin's People

Contributors

tomi77 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.