sadegh19b/blade-brand-icons

此包已被废弃且不再维护。作者建议使用 https://github.com/codeat3/blade-simple-icons 包代替。

一个易于在Laravel Blade视图中使用流行品牌图标的包。

0.2.1 2023-09-11 12:55 UTC

This package is auto-updated.

Last update: 2023-09-11 12:58:14 UTC


README

一个易于在Laravel Blade视图中使用品牌图标(简单图标)的包。

要查看和预览所有可用图标,请访问 simpleicons.org

警告
此包已被废弃且不再维护。我建议使用 codeat3/blade-simple-icons 包代替。

要求

  • PHP 7.3 或更高版本
  • Laravel 7.14 或更高版本

安装

composer require sadegh19b/blade-brand-icons

使用方法

图标可以使用自闭合的Blade组件,它们将被编译为SVG图标

<x-brand-apple width="10" height="10"/>

您也可以向图标组件传递类

<x-brand-apple class="w-8 h-8 text-white fill-current"/>

甚至可以使用内联样式

<x-brand-apple class="w-8 h-8" style="color: #fff"/>

注意:如果您想更改图标颜色,应在样式表文件中添加 svg{fill:currentColor}

原始SVG图标

如果您想将原始SVG图标用作资产,可以使用以下方法发布它们

php artisan vendor:publish --tag=blade-brand-icons --force

然后在视图中使用它们,如下所示

<img src="{{ asset('vendor/blade-brand-icons/apple.svg') }}" width="10" height="10"/>

Blade图标

Blade Brand Icons 在底层使用Blade Icons。请参阅 Blade Icons 的README 了解更多功能。

维护者

Blade Brand Icons 由 Sadegh19b 开发和维护。

Blade Icons 由 Dries Vints 开发和维护。

SVG Simple Icons 由 Dan Leech 开发和维护。

许可

Blade Brand Icons 是开源软件,采用MIT许可