sherlockode / sonata-gentelella-bundle
Symfony SonataAdminBundle 集成了 Gentelella 主题
v1.0.18
2019-07-02 08:52 UTC
Requires
- sonata-project/admin-bundle: ^3.14
README
这是一个简单集成 Gentelella Alela! 主题到 SonataAdminBundle 的工具。
此包自动为 sonata admin 定义默认配置,因此安装过程非常简单
composer require sherlockode/sonata-gentelella-bundle
并在 app/AppKernel.php
public function registerBundles() { $bundles = [ ... new Sherlockode\SonataGentelellaBundle\SherlockodeSonataGentelellaBundle(), ]; }
中的 app/config.yml
sonata_admin:
templates:
layout: '@App/standard_layout.html.twig'
您需要扩展标准布局 standard_layout.html.twig
。如果您没有,请创建一个并按照以下方式编辑
{% extends '@SherlockodeSonataGentelella/standard_layout.html.twig' %}
大多数模板块保持不变,但为了主题,我们被迫移动其中一些。因此,如果您已覆盖 sonata 模板,可能会出现一些错误
默认禁用所有插件,要在配置文件中启用插件,请修改 config.yml
sherlockode_sonata_gentelella:
fast_click: true
nprogress: true
chart: true
echarts: true
gauge: true
bootstrap_progressbar: true
skycons: true
flot: true
datejs: true
jqvmap: true
bootstrap_daterangerpicker: true
calendar: true
switchery: true
starrr: true
jquery_tag_input: true
bootstrap_wysiwyg: true
parsley: true
cropper: true
autosize: true
jquery_autocomplete: true
ion_rangeslider: true
bootstrap_colorpicker: true
jquery_inputmask: true
jquery_knob: true
dropzone: true
validator: true
jquery_smart_wizard: true
pnotify: true
jquery_sparklines: true
morris: true
animate: true
easy_pie_chart: true
echarts: true
datatables: true
查看演示(需要所有插件)
sherlockode_sonata_gentelella:
demo: true