ryangjchandler/laravel-bunny-fonts 问题修复 & 功能扩展

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

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

ryangjchandler/laravel-bunny-fonts

最新稳定版本:v2.1.1

Composer 安装命令:

composer require ryangjchandler/laravel-bunny-fonts

包简介

Manage Bunny Fonts programatically in your Laravel projects.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package provides a small set of utilities for managing Bunny Fonts programatically.

Installation

You can install the package via Composer:

composer require ryangjchandler/laravel-bunny-fonts

Usage

Inside of your AppServiceProvider::boot() method, use the BunnyFonts class to register font families and variants.

use RyanChandler\BunnyFonts\Facades\BunnyFonts;
use RyanChandler\BunnyFonts\FontFamily;

public function boot()
{
    BunnyFonts::add(FontFamily::AbhayaLibre, weights: [400, 500, 600])
        ->add(FontFamily::FiraCode, weights: [
            400
        ]);
}

This package provides a FontFamily enum that contains all fonts available on Bunny!

If you want to preview a font, click through to the enum and use the handy link in the comment above the case.

Inside of your Blade templates, use the <x-bunny-fonts /> component or @bunnyFonts() directive to render the necessary HTML tags and load your fonts.

Sets

Out of the box this package provides a default set of fonts. Calling add() directly on the BunnyFonts class will register fonts under the default set.

If your site uses different fonts in different places, it's still possible to register them using this package by creating a custom "set".

public function boot()
{
    BunnyFonts::set('shop')
        ->add(FontFamily::Inter, [400, 500, 700]);
}

Then when you use the Blade component or directive, you can provide the set you wish to render.

<x-bunny-fonts set="shop" />
<!-- or... -->
@bunnyFonts('shop')

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固