承接 heimrichhannot/contao-tiny-slider-bundle 相关项目开发

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

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

heimrichhannot/contao-tiny-slider-bundle

Composer 安装命令:

composer require heimrichhannot/contao-tiny-slider-bundle

包简介

Tiny slider, a vanilla javascript content slider for contao.

README 文档

README

A slider bundle for contao based on Tiny Slider.

Features

Usage

Install

  1. install bundle with composer or contao manager

    composer require heimrichhannot/contao-tiny-slider-bundle
    
  2. Call contao install tool and update the database

Setup

  1. Create a tiny slider config (System -> Tiny-Slider). Please consider the tiny slider documentation for more informations about the different config options.
  2. Select the created config in a content element, an reader config element or in an list config after activating "Render as Tiny slider".

Usage as config element type (list and reader bundle)

This bundle comes with an config element type, already registered for list and reader bundle.

  1. Add 'Slider (Tiny Slider)' as list or reader config element to your configuration
  2. your defined template variable has two keys, html and images. html contains the complete slider, images just the prepared images if you want to define your own wrapper. So your typical template code to output a slider would be:
{% if tinySlider.html is defined %}
    {{ tinySlider.html }}
{% endif %}

Twig usage

Tiny slider comes with an tiny_slider_wrapper.html.twig that can be embedded inside your custom twig template like the following:

{% set tinySliderConfigId = 1 %}
{% embed '@ContaoTinySlider/tiny_slider_wrapper.html.twig' with {config: tinySliderConfigId, selector: '.list-images', wrapperClass: 'overflow-hidden'} %}
    {% block slides %}
        <div class="image-container" {{ aos.default() }}>
        <ul class="list-images list-unstyled">
            {% for i, singleSRC in multiSRC %}
                <li class="image">
                    {{ singleSRC|image([240,180,'px'],{href : url, lazyload: {class: 'tns-lazy-img', src: 'data-src'}})|raw }}
                </li>
            {% endfor %}
        </ul>
        </div>
    {% endblock %}
{% endembed %}

There are also two twig extension available:

tiny_slider_wrapper_class

Returns the tiny slider wrapper css classes.

{% set tinySliderConfigId = 1 %}
{{ tinySliderConfigId|tiny_slider_wrapper_class}}

tiny_slider_container_attributes

Returns the tiny slider data-tiny-slider-config attribute for the container inside the wrapper. The parameter selector is optional and should point to the slides wrapper container.

{% set tinySliderConfigId = 1 %}
{{ config|tiny_slider_container_attributes(selector|default('.tiny-slider-container'))|raw }}

Custom transition effects

In order to use custom transitions for example using animate.css choose from the following effects.

Fade effect

  • import animate.css stylesheet
  • set tiny slider config parameter Mode to gallery
  • set tiny slider config parameter Intro animation to 'fadeIn'
  • set tiny slider config parameterOutro animation to 'fadeOut'
  • empty tiny slider config parameter Normal animation

Assets

NPM/Yarn Package

The assets for this bundle are provided as NPM/Yarn package @hundh/contao-tiny-slider-bundle.

npm version

You will find the sources under src/Resources/npm-package.

Known Issues

Lazyload

If you use tiny-slider together with https://github.com/heimrichhannot/contao-speed-bundle and its lazyload compoment enabled in page layout, ensure that you enabled Lazy load in tiny slider configuration as well and keep the Lazy load selector default value to .tns-lazy-img.

If you use the TwigExtension image that you must provide proper lazyload information in data attributes:

{{ singleSRC|image([240,120,'px'],{lazyload: {class: 'tns-lazy-img', src: 'data-src'} }}

heimrichhannot/contao-tiny-slider-bundle 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2018-11-12