承接 npmweb/admin-theme-laravel-layout 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

npmweb/admin-theme-laravel-layout

最新稳定版本:3.0.0

Composer 安装命令:

composer require npmweb/admin-theme-laravel-layout

包简介

Layout files to use in Laravel with the NPM Admin Theme look and feel.

README 文档

README

Layout files to use in Laravel with the NPM Admin Theme look and feel.

Works with the npmweb/admin-theme Bower package.

Installation

Run composer require npmweb/admin-theme-laravel-layout:^3.0

Add the service provider to your Laravel service providers list in config\app.php:

'providers' => [
    ...
   	NpmWeb\AdminThemeLaravelLayout\LayoutServiceProvider::class,
],

This package also relies on laravelcollective/html. It's pulled down by Composer, but if you don't already have it set up in your app.php, add the following entries:

'providers' => [
    ...
   	Collective\Html\HtmlServiceProvider::class,
],
...
'aliases' => [
    'Form'      => Collective\Html\FormFacade::class,
    'Html'      => Collective\Html\HtmlFacade::class,
],

Add an empty public/css/makeitbetter.css file. This is this package's name for shame.css.

Install the Admin Theme sass library npmweb/admin-theme (i.e. by using Bower). Then set up the default JS and CSS assets required with Elixir. All of these can be handled by replacing your Laravel project's gulpfile.js with the sample src/gulpfile.js.

  • Sass or Less is compiled from resources/assets/sass/app.scss down into a public/css/app.css file. (You can copy this package's src/app.scss to get started.)
  • Third-party JavaScript dependencies are combined into a public/js/vendor.js file.
  • The foundation-icon-fonts library (downloaded by Bower as a dependency of admin-theme) needs to be copied to public/vendor/foundation-icon-fonts to be web-accessible.
  • And all of those files need to be versioned using Elixir with mix.version().

Add an entry to config/app.php to set the name of the system that shows up in the template:

'name' => 'My Awesome App',

Usage

Instead of extending your own Blade layout template, use the following line:

@extends('admin-theme-laravel-layout::layout')

The following sections can be filled in using @section('my-section-name') syntax:

  • 'content': your main page body content
  • 'breadcrumbs': breadcrumbs that show up at the top of the page
  • 'page-header-buttons': buttons that show up to the right of the page header, i.e. to
  • 'js': page-specific <script/> tags
  • 'css': page-specific CSS <link/> tags

You can also override some view partials to customize appearance for your system. Just run php artisan vendor:publish --provider="NpmWeb\AdminThemeLaravelLayout\LayoutServiceProvider", then customize them in resources/views/vendor/admin-theme-laravel-layout:

  • '_nav.blade.php': define your sidebar
  • 'css/_non_sass.blade.php: any CSS files that can't be included in your Sass build of app.css
  • 'scripts/_app.blade.php: any app-specific JS files
  • any other view partials you like

When rendering a view, be sure to pass a 'page_title' data item for the title to show for the page.

License

This code is open-sourced under the MIT license. For more information, see the LICENSE file.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 12
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-08