定制 iresults/responsive-images 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

iresults/responsive-images

最新稳定版本:0.1.0

Composer 安装命令:

composer require iresults/responsive-images

包简介

README 文档

README

This extension provides a view helper for responsive images.

Installation

composer require iresults/responsive-images

Example usage

Input

<html
  xmlns:iresultsResponsiveImages="http://typo3.org/ns/Iresults/ResponsiveImages/ViewHelpers"
  data-namespace-typo3-fluid="true"
>
  <iresultsResponsiveImages:responsiveImage
    image="{project.imageFile}"
    widths="
             (max-width: 414px) 378px,
             (max-width: 575px) 540px,
             (max-width: 1399px) 546px,
             634px"
    pixelDensities="1,2"
  />
</html>

Output

<picture>
  <source
    srcset="image-path-378px.jpg, image-path-378px.jpg 2x"
    media="(max-width: 414px)"
  />
  <source
    srcset="image-path-540px.jpg, image-path-540px.jpg 2x"
    media="(max-width: 575px)"
  />
  <source
    srcset="image-path-546px.jpg, image-path-546px.jpg 2x"
    media="(max-width: 1399px)"
  />
  <source srcset="image-path-634px.jpg, image-path-634px.jpg 2x" media="" />
  <img src="image-path-634px.jpg" width="634" height="633" alt="" />
</picture>

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2023-08-31