ether/critical
Composer 安装命令:
composer require ether/critical
包简介
A Critical CSS generator for Craft CMS
README 文档
README
A Critical CSS generator for Craft CMS.
Usage
Add the critical-css hook to your head tag:
<head> {# ... #} {% hook 'critical-css' %} {# ... #} </head>
Wrap anything you consider to be above the fold with fold tags:
{% fold %}
...
{% endfold %}
The fold tag supports an If statement, useful when using the tag in a loop:
{% for block in entry.pageContent %}
{% fold if loop.index < 2 %}
...
{% endfold %}
{% endfor %}
Upcoming Features
- Exclude
@font-face's if their font isn't referenced in critical. - Ability to ignore certain CSS files.
- Ability to clear all critical CSS files
- Ability to clear all critical CSS files for a certain template
- Ability to (re)gen critical en masse (loop through all elements)
- Support all possible templates (products, categories, static, etc.)
- Option to generate missing critical on page load
- Customize Critical CSS save location.
统计信息
- 总下载量: 66
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2018-10-18