定制 idf/nova-html-card 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

idf/nova-html-card

最新稳定版本:3.4.0

Composer 安装命令:

composer require idf/nova-html-card

包简介

A Laravel Nova card to display arbitrary HTML content

README 文档

README

We stand with Ukraine 🇺🇦

Nova HTML Card

Latest Stable Version Total Downloads Type coverage

Adds a card to the Laravel Nova dashboard with any arbitrary HTML content.

image

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require interaction-design-foundation/nova-html-card

Usage

Register your new card.

use InteractionDesignFoundation\HtmlCard\HtmlCard;

public function cards()
{
    return [
        (new HtmlCard())->width('1/3')->html('<h1>Hello World!</h1>'),
        (new HtmlCard())->width('1/3')->markdown('# Hello World!'),
        (new HtmlCard())->width('1/3')->view('cards.hello', ['name' => 'World']),
     ];
}

Options

  • Set content
    • ->html('<h1>Hello!</h1>'): Set HTML or plain content.
    • ->markdown('# Hello!'): Set Markdown content that will be converted into HTML.
    • ->view('path.to.view', []): Specify blade view file and optionally pass an array of data to view.
  • Styling
    • ->center(false): Center card's content. false by default.
    • ->withoutCardStyles(true): Whether to use standard Nova Card styles for a card (background, padding, etc). false by default.
    • ->withBasicStyles(): Adds some basic styling to the HTML elements in the card. Useful when rendering Markdown.

Why this package?

There are a few packages with similar functionality. Our package provides an API to cover all cases covered by these packages plus additionally provides some unique features like:

  • Markdown support
  • easy switch between class Nova-card look and raw-HTML look
  • Simple, Laravel-like API

Changelog

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

Contributing

Please see CONTRIBUTING for details.

License

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

统计信息

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

GitHub 信息

  • Stars: 67
  • Watchers: 8
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-27