定制 backpack/theme-tabler 二次开发

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

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

backpack/theme-tabler

Composer 安装命令:

composer require backpack/theme-tabler

包简介

UI for Backpack v6 that uses Tabler and Bootstrap v5.

README 文档

README

Latest Version on Packagist Total Downloads The Whole Fruit Manifesto

This package provides a theme for the Backpack for Laravel administration panel, that uses Tabler and implicitly Bootstrap v5. All esthetic customizations on top of Tabler are done in separate CSS files, which can be easily edited if you don't like them.

The file structure inside this package has changed a bit from Backpack v3-v5. We've split split it into smaller, more granual views. So that if you need to customize something by publishing a view, your change is small. If you want the old file structure, you can use the CoreUI v4 or CoreUI v2 themes.

Screenshots

all-layouts

Installing

Automatic installation

Because this a 1st party theme, you can quickly install it using

php artisan backpack:require:theme-tabler

Alternatively, follow the manual installation process below.

Manual installation

Step 1. Install via Composer

composer require backpack/theme-tabler

Step 2. Go to config/backpack/ui.php and change your view namespace:

-    'view_namespace' => 'backpack::',
+    'view_namespace' => 'backpack.theme-tabler::',

Step 3. (Optional) Publish the theme config file:

php artisan vendor:publish --tag="theme-tabler-config"

Config

Note: Any value set here will override the ones defined in config/backpack/ui.php when this theme is in use.

Change layout: Simply pick a layout

/**
 * Possible values: horizontal, horizontal_dark, horizontal_overlap, vertical,
 * vertical_dark, vertical_transparent (legacy theme), right_vertical, right_vertical_dark, right_vertical_transparent
 */
'layout' => 'horizontal_overlap',

Change auth layout: Pick a login page layout

'auth_layout' => 'default', //Possible values: default, illustration, cover

Add CSS: Here you can easily load your own extra CSS styles.

'styles' => [
  base_path('vendor/backpack/theme-tabler/resources/assets/css/color-adjustments.css'),
  base_path('vendor/backpack/theme-tabler/resources/assets/css/colors.css'),
 // add your css here
],

Add JS: Here you can easily include your own JS files.

'scripts' => [],

More configs: Get more out of theme-tabler.

  • Take more control on Dark Mode
  • Make Container fluid to utilize the space
  • Choose how Header, Sidebar should be
'options' => [
   /**
    * The available color modes.
    */
    'colorModes' => [
        'system' => 'la-desktop',
        'light' => 'la-sun',
        'dark' => 'la-moon',
    ],

    /**
     * The color mode used by default.
     */
    'defaultColorMode' => 'system', // system, light, dark

    /**
     * When true, a switch is displayed to let admins choose their favorite theme mode.
     * When false, the theme will only use the "defaultColorMode" set above.
     * In case "defaultColorMode" is null, system is the default.
     */
    'showColorModeSwitcher' => true,

    /**
     * Fix the top-header component (present in "vertical_transparent") and the menu when the layout type is set as "horizontal".
     * This value is skipped when the layout type is horizontal-overlap, using false as default.
     */
    'useStickyHeader' => false,

    /**
     * When true, the content area will take the whole screen width.
     */
    'useFluidContainers' => false,

    /**
     * When true, the sidebar content for vertical layouts will not scroll with the rest of the content.
     */
    'sidebarFixed' => false,

    /**
     * When true, horizontal layouts will display the classic top bar on top to free some space when multiple nav items are used.
     */
    'doubleTopBarInHorizontalLayouts' => false,

    /**
      * When true, the password input will have a toggle button to show/hide the password.
      */
    'showPasswordVisibilityToggler' => true,
],

Uninstalling

To uninstall this Backpack theme:

  1. Remove the composer package. Eg. composer remove backpack/theme-tabler
  2. Delete the config file. Eg. rm -rf config/backpack/theme-tabler.php
  3. Install a new theme (eg. php artisan backpack:require:theme-coreuiv4) or change the view_namespace in config/backpack/ui.php to the theme you want to be active.

Overriding

If you need to change a blade file in any way, you can easily copy-paste the file to your app, and modify that file any way you want. If you do that to the correct directory, your file will be used instead of the one in the package. But please keep in mind that you will NOT be getting any updates for that file.

The more files you copy-paste and customize, the more difficult it will be to upgrade to newer versions. So please avoid doing this too much.

# create the custom directory if it's not already there
mkdir -p resources/views/vendor/backpack/theme-tabler

# copy the blade file inside the folder we created above
cp -i vendor/backpack/crud/src/resources/views/ui/dashboard.blade.php resources/views/vendor/backpack/theme-tabler/dashboard.blade.php

Change log

Changes are documented here on Github. Please see the Releases tab.

Contributing

Please see contributing.md for a todolist and howtos.

Security

If you discover any security related issues, please email hello@backpackforlaravel.com instead of using the issue tracker.

Credits

License

This project was released under MIT, so you can install it on top of any Backpack & Laravel project. Please see the license file for more information.

backpack/theme-tabler 适用场景与选型建议

backpack/theme-tabler 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 637.46k 次下载、GitHub Stars 达 37, 最近一次更新时间为 2023 年 04 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「backpack」 「Backpack for Laravel」 「Backpack Addon」 「ThemeTabler」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 backpack/theme-tabler 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 backpack/theme-tabler 我们能提供哪些服务?
定制开发 / 二次开发

基于 backpack/theme-tabler 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 37
  • Watchers: 1
  • Forks: 16
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-06