awcodes/dimmer 问题修复 & 功能扩展

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

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

awcodes/dimmer

最新稳定版本:v1.2.0

Composer 安装命令:

composer require awcodes/dimmer

包简介

Dimmer is a simple package to easily add a light/dark/system mode switcher to your Laravel app.

README 文档

README

Latest Version on Packagist Total Downloads

dimmer

Dimmer is a simple package to easily add a light/dark/system mode switcher to your Laravel app.

Requirements

  • Alpine JS
  • Tailwind CSS

Installation

You can install the package via composer:

composer require awcodes/dimmer

Next, you need to add the views to your tailwind.config.js file:

content: [
    './vendor/awcodes/dimmer/resources/views/**/*.blade.php',
]

Optionally (not recommended), you can publish the views using

php artisan vendor:publish --tag="dimmer-views"

You can also update the translations by publishing the lang files:

php artisan vendor:publish --tag="dimmer-translations"

Usage

Just include the dimmer component in your layout or anywhere you would to use it.

<x-dimmer::controls />

Forcing a default mode

Should you wish to force a default mode for when a user first visits the site, you can do so by setting the force-mode attribute on the dimmer component. Without this attribute set, the default mode will be determined by the user's system preferences.

<x-dimmer::controls force-mode="dark" />

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.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-09