Block 8 UI 模板对应的 Laravel 包。

维护者

详细信息

github.com/Block8/ui

源代码

问题

安装: 729

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 3

分支: 1

开放问题: 2

语言:CSS

1.0.13 2019-03-05 21:00 UTC

This package is auto-updated.

Last update: 2024-09-06 09:12:34 UTC


README

Laravel 包,提供简单、干净的行政用户界面。

###配置

#####1) UI 主色调 要更改 UI 包的默认颜色,只需在应用程序的 dashboard.scss 文件中添加 $color-primary 变量。

$color-primary: "your-color";

#####2) 品牌标志 要在侧边栏顶部加载品牌标志,只需在扩展布局之前声明 logo

Example: 
@php($logo = Storage::url($currentClient->logo))
@extends('ui::layouts.primary')

#####3) 通知 要启用 Laravel 通知模块,您只需进行以下操作

a. 在扩展布局之前声明通知

Example: 
@php($notifications = Auth::user()->unreadNotifications)
@extends('ui::layouts.primary')

b. 在您的应用程序中创建一个 NotificationController 以处理通知索引页面,并返回您自定义的视图。

c. 在 web.php 文件中注册路由。

Example: 
Route::get('/notifications', 'NotificationController@index')->name('notification.index');
Route::get('/notification/{notification}', '\Block8\UI\Http\Controllers\NotificationController@show')->name('notification.show');
Route::get('/notification/read-all/{user}', '\Block8\UI\Http\Controllers\NotificationController@markAllRead')->name('notification.mark-all-read'); 

###组件

1) 警报

有三种类型的警报:警告、危险和成功。声明 type 变量和您选择的 icon

@section('alerts')
    @component('ui::alert')
        @slot('type', 'warning')
        @slot('icon', 'exclamation-circle')
                
        This is a bold <strong>alert</strong>.
    @endcomponent
@endsection
2) Alert-banner

您可以通过将 alert-banner 组件添加到 alert-banners 部分来在主面板顶部显示警报横幅。

@section('alert-banners')
    @component('ui::alert-banner')
        @slot('type', 'warning')
        @slot('icon', 'exclamation-circle')
        
        Hi <strong>{{ $user->name }}</strong>, your subscription is about to end.
    @endcomponent
@endsection