2017 © Pedro Peláez
 

library twig-grid

Twig extension for bootstrap grid layout

image

serega3000/twig-grid

Twig extension for bootstrap grid layout

  • Friday, April 1, 2016
  • by serega3000
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Twig extension for bootstrap grid layout

To write this code, (*1)

<div class='row'>
    <div class='col col-lg-4 col-md-8 col-sm-6'>
        some content here ...
    </div>
    <div class='col col-lg-4 col-md-8 col-sm-6'>
        some content here ...
    </div>
</div>

In twig template you can write, (*2)

{% row %}
    {% col "lg4 md8 sm6" %}
        some content here ...
    {% endcol %}
    {% col "lg4 md8 sm6" %}
        some content here ...
    {% endcol %}
{% endrow %}

class definition in {% col %} tag like "lg4 md8 sm6 xs8" will be automatically converted to "col col-lg-4 col-md-8 col-sm-6 col-sx-8", (*3)

You also can add your own CSS class to column, for example, "lg4 md8 sm6 my-class" will be automatically converted to "col col-lg-4 col-md-8 col-sm-6 my-class", (*4)

Installing

Require in composer, (*5)

composer require serega3000/twig-grid:^1.2

Register as twig extension:, (*6)

$twig = new Twig_Environment($loader);
$twig->addExtension('', new \Serega3000\TwigGrid\Extension());

The Versions

01/04 2016

dev-master

9999999-dev https://github.com/serega3000/twig-grid

Twig extension for bootstrap grid layout

  Sources   Download

MIT

01/04 2016

1.2

1.2.0.0 https://github.com/serega3000/twig-grid

Twig extension for bootstrap grid layout

  Sources   Download

MIT

01/04 2016

1.1

1.1.0.0 https://github.com/serega3000/twig-grid

Twig extension for bootstrap grid layout

  Sources   Download

MIT

01/04 2016

1.0

1.0.0.0 https://github.com/serega3000/twig-grid

Twig extension for bootstrap grid layout

  Sources   Download

MIT