{"id":20961876,"url":"https://github.com/heimrichhannot/contao-extassets","last_synced_at":"2025-05-14T07:31:11.050Z","repository":{"id":22871905,"uuid":"26219772","full_name":"heimrichhannot/contao-extassets","owner":"heimrichhannot","description":"Contao external CSS \u0026 JS assets groups with bootstrap and font-awesome support","archived":false,"fork":false,"pushed_at":"2020-12-01T07:49:02.000Z","size":970,"stargazers_count":2,"open_issues_count":2,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-23T06:49:03.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heimrichhannot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-05T13:06:46.000Z","updated_at":"2020-12-01T07:49:04.000Z","dependencies_parsed_at":"2022-08-21T16:10:14.118Z","dependency_job_id":null,"html_url":"https://github.com/heimrichhannot/contao-extassets","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-extassets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-extassets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-extassets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-extassets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heimrichhannot","download_url":"https://codeload.github.com/heimrichhannot/contao-extassets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254094869,"owners_count":22013650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T02:18:05.203Z","updated_at":"2025-05-14T07:31:07.737Z","avatar_url":"https://github.com/heimrichhannot.png","language":"PHP","readme":"# Contao Extassets\n\n\u003e This bundle is outdated and not actively maintained anymore! Please have a look at [Encore Bundle](https://github.com/heimrichhannot/contao-encore-bundle) if you need a good and actively maintained asset solution.\n\nCreate your own css \u0026 js groups and add them to your contao theme layouts.\n\n## General features\n- Backend Module for external css\n- Backend Module for external js \n- Add multiple CSS \u0026 JS groups to contao layout \n- Bootstrap framework support (for css by default, enable within js group)\n- Font-Awesome added by default (availability of all variables and mixins)\n- Elegant Icons can be added (availability of all variables and mixins)\n- Css file caching for production mode (disable byPassCache in contao settings)\n\n## External CSS\n\n### Features\n- Complete lesscss support, automatically compile all your less files within a external css group to css\n- Observer folders (recursive) within your external css groups\n- Add multiple custom variable files, to overwrite for example bootstrap variables.less (like @brand-primary)\n- make use of all bootstrap mixins and variables within your own less files (See: http://getbootstrap.com/customize/#less-variables)\n- bootstrap print.css support\n- 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.)\n- all files within $GLOBALS['TL_USER_CSS'] will be parsed within external css groups\n\n### Installation\n\n#### Contao 4.0\n\n1. Install via composer\n\n```\ncomposer require heimrichhannot/contao-extassets\n```\n\n2. Add the following to lines to the `$bundles` array in your `app/AppKernel.php` \n\n```\n/**\n     * {@inheritdoc}\n     */\n    public function registerBundles()\n    {\n        $bundles = [\n            …\n            new ContaoModuleBundle('extassets', $this-\u003egetRootDir()),\n            new ContaoModuleBundle('haste_plus', $this-\u003egetRootDir()),\n        ];\n\n        …\n    }\n```\n\n3. Clear app chache\n \n```\nbin/console cache:clear -e prod\n```\n\n\n\n### Hooks\n\n#### addCustomAssets\n\nAttach custom fonts or css libraries to extassets combiner. \n\n```\n// config.php\n$GLOBALS['TL_HOOKS']['addCustomAssets'][] = array('MyClass', 'addCustomAssetsHook');\n\n\n// MyClass.php\n\npublic function addCustomAssetsHook(\\Less_Parser $objLess, $arrData, \\ExtAssets\\ExtCssCombiner $objCombiner)\n{\n    // example: add custom less variables to your css group to provide acces to mixins or variables in your external css files\n    $this-\u003eobjLess-\u003eparseFile('/assets/components/my-library/less/my-variables.less'));\n    \n    // example: add custom font to your css group\n    $objFile = new \\File('/assets/components/my-library/css/my-font.css, true);\n    $strCss = $objFile-\u003egetContent();\n    $strCss = str_replace(\"../fonts\", '/assets/components/my-library/'), $strCss); // make font path absolut, mostly required\n    $this-\u003eobjLess-\u003eparse($strCss);\n}\n\n```\n\n### Font Awesome (http://fontawesome.io/)\n\nUse font-awesome mixins and variables right inside your less files.\n\n```\n// my-styles.less\n.my-button{\n  .fa;\n  .fa-lg;\n  \u0026:before{\n    content: @fa-var-github;\n  }\n}\n```\n\nList of all font-awesome variables, see (https://github.com/heimrichhannot/font-awesome/blob/master/less/variables.less). \n\n\n### Elegant Icon Font (http://www.elegantthemes.com/blog/resources/elegant-icon-font)\n\nUse elegant-icon mixins and variables right inside your less files.\n\n```\n// my-styles.less\n.my-button{\n  .ei;\n  \u0026:before{\n    content: @ei-var-info;\n  }\n}\n```\n\nList of all elegant-icon variables, see (https://github.com/heimrichhannot/elegant-icons/blob/master/less/variables.less). \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-extassets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheimrichhannot%2Fcontao-extassets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-extassets/lists"}