2017 © Pedro Peláez
 

contao-module contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

image

heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  • Thursday, March 15, 2018
  • by digitales@heimrich-hannot.de
  • Repository
  • 3 Watchers
  • 2 Stars
  • 1,047 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 51 Versions
  • 4 % Grown

The README.md

Contao Extassets

This bundle is outdated and not actively maintained anymore! Please have a look at Encore Bundle if you need a good and actively maintained asset solution., (*1)

Create your own css & js groups and add them to your contao theme layouts., (*2)

General features

  • Backend Module for external css
  • Backend Module for external js
  • Add multiple CSS & JS groups to contao layout
  • Bootstrap framework support (for css by default, enable within js group)
  • Font-Awesome added by default (availability of all variables and mixins)
  • Elegant Icons can be added (availability of all variables and mixins)
  • Css file caching for production mode (disable byPassCache in contao settings)

External CSS

Features

  • Complete lesscss support, automatically compile all your less files within a external css group to css
  • Observer folders (recursive) within your external css groups
  • Add multiple custom variable files, to overwrite for example bootstrap variables.less (like @brand-primary)
  • make use of all bootstrap mixins and variables within your own less files (See: http://getbootstrap.com/customize/#less-variables)
  • bootstrap print.css support
  • Internet Explorer 6-9 - 4096 css-selector handling (Internet Explorer 6 - 9 has only a maximum of 4096 css-selectors possible per file. Extassets make usage of https://github.com/zweilove/css_splitter ans solve this problem by splitting aggregated files into parts.)
  • all files within $GLOBALS['TL_USER_CSS'] will be parsed within external css groups

Installation

Contao 4.0

  1. Install via composer
composer require heimrichhannot/contao-extassets
  1. Add the following to lines to the $bundles array in your app/AppKernel.php
/**
     * {@inheritdoc}
     */
    public function registerBundles()
    {
        $bundles = [
            …
            new ContaoModuleBundle('extassets', $this->getRootDir()),
            new ContaoModuleBundle('haste_plus', $this->getRootDir()),
        ];

        …
    }
  1. Clear app chache
bin/console cache:clear -e prod

Hooks

addCustomAssets

Attach custom fonts or css libraries to extassets combiner., (*3)

// config.php
$GLOBALS['TL_HOOKS']['addCustomAssets'][] = array('MyClass', 'addCustomAssetsHook');


// MyClass.php

public function addCustomAssetsHook(\Less_Parser $objLess, $arrData, \ExtAssets\ExtCssCombiner $objCombiner)
{
    // example: add custom less variables to your css group to provide acces to mixins or variables in your external css files
    $this->objLess->parseFile('/assets/components/my-library/less/my-variables.less'));

    // example: add custom font to your css group
    $objFile = new \File('/assets/components/my-library/css/my-font.css, true);
    $strCss = $objFile->getContent();
    $strCss = str_replace("../fonts", '/assets/components/my-library/'), $strCss); // make font path absolut, mostly required
    $this->objLess->parse($strCss);
}

Font Awesome (http://fontawesome.io/)

Use font-awesome mixins and variables right inside your less files., (*4)

// my-styles.less
.my-button{
  .fa;
  .fa-lg;
  &:before{
    content: @fa-var-github;
  }
}

List of all font-awesome variables, see (https://github.com/heimrichhannot/font-awesome/blob/master/less/variables.less)., (*5)

Elegant Icon Font (http://www.elegantthemes.com/blog/resources/elegant-icon-font)

Use elegant-icon mixins and variables right inside your less files., (*6)

// my-styles.less
.my-button{
  .ei;
  &:before{
    content: @ei-var-info;
  }
}

List of all elegant-icon variables, see (https://github.com/heimrichhannot/elegant-icons/blob/master/less/variables.less)., (*7)

The Versions

30/06 2015

1.0.19

1.0.19.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

22/06 2015

1.0.18

1.0.18.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

06/05 2015

1.0.15

1.0.15.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

31/03 2015

1.0.14

1.0.14.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

31/03 2015

1.0.13

1.0.13.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

24/03 2015

1.0.12

1.0.12.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

18/02 2015

1.0.11

1.0.11.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

18/02 2015

1.0.10

1.0.10.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

18/02 2015

1.0.9

1.0.9.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

18/02 2015

1.0.8

1.0.8.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

05/02 2015

1.0.7

1.0.7.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

05/02 2015

1.0.6

1.0.6.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

22/01 2015

1.0.5

1.0.5.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

22/01 2015

1.0.4

1.0.4.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

22/01 2015

1.0.3

1.0.3.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

22/01 2015

1.0.2

1.0.2.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

01/12 2014

1.0.1

1.0.1.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome

05/11 2014

1.0.0

1.0.0.0 https://github.com/heimrichhannot/contao-extassets

External CSS & JS assets groups with bootstrap and font-awesome support

  Sources   Download

LGPL-3.0+

The Requires

 

css bootstrap js contao font awesome