ivopetkov/lazy-image-bearframework-addon 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ivopetkov/lazy-image-bearframework-addon

Composer 安装命令:

composer require ivopetkov/lazy-image-bearframework-addon

包简介

Lazy image addon for Bear Framework

README 文档

README

Addon for Bear Framework

This addon enables you to easily create lazy-loaded images that are SEO friendly. It's based on the popular library Responsively Lazy. Multiple versions with different sizes are created on the fly and only the best one is loaded. This saves bandwidth and loads the website faster.

Build Status Latest Stable Version codecov.io License Codacy Badge

Download and install

Install via Composer

composer require ivopetkov/lazy-image-bearframework-addon

Download an archive

Download the latest release from the GitHub page and include the autoload file.

include '/path/to/the/addon/autoload.php';

Enable the addon

Enable the addon for your Bear Framework application.

$app->addons->add('ivopetkov/lazy-image-bearframework-addon');

Usage

<component src="lazy-image" filename="path/to/the/file.jpg" />

Attributes

filename

      The name of the file to be shown. It must be in a publicly accessible directory.

aspectRatio

      The proportional relationship between the width and the height of the image. It is useful for cropping and resizing the image. Example values: 1:1, 1:2, 1.5:1, etc.

loadingBackground

      The type of background shown while the image is loading. Available values: none and checkered.

class

      HTML class attribute value

style

      HTML style attribute value

alt

      HTML alt attribute value

title

      HTML title attribute value

Examples

The image rendered is a square

<component src="lazy-image" filename="path/to/the/file.jpg" aspectRatio="1:1" />

A custom class name is added to the image HTML code

<component src="lazy-image" filename="path/to/the/file.jpg" class="my-class-name" />

A title is added

<component src="lazy-image" filename="path/to/the/file.jpg" title="New Year's Eve" />

License

Lazy image addon for Bear Framework is open-sourced software. It's free to use under the MIT license. See the license file for more information.

Author

This addon is created by Ivo Petkov. Feel free to contact me at @IvoPetkovCom or ivopetkov.com.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固