承接 heimrichhannot/contao-extassets 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

heimrichhannot/contao-extassets

Composer 安装命令:

composer require heimrichhannot/contao-extassets

包简介

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

README 文档

README

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.

Create your own css & js groups and add them to your contao theme layouts.

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.

// 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.

// 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).

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

Use elegant-icon mixins and variables right inside your less files.

// 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).

heimrichhannot/contao-extassets 适用场景与选型建议

heimrichhannot/contao-extassets 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.28k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2014 年 11 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「css」 「bootstrap」 「JS」 「contao」 「font awesome」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 heimrichhannot/contao-extassets 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 heimrichhannot/contao-extassets 我们能提供哪些服务?
定制开发 / 二次开发

基于 heimrichhannot/contao-extassets 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.28k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 23
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 5
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2014-11-05