Chapter 4. Design Configuration =============================== The design of the backend is based on the popular `AdminLTE template`_ and it also uses `Bootstrap 3`_, `jQuery`_ and `Font Awesome icons`_. You can customize this design in two ways: 1. For **simple backends**, you can change the value of some YAML configuration options, as explained in this chapter. 2. For **more complex backends**, you can override every template and fragment used to render the backend pages, as explained in the following chapters. All the configuration options explained in this chapter are defined under the global ``design`` YAML key: .. code-block:: yaml easy_admin: design: # ... design configuration options Changing the Main Backend Color ------------------------------- Define the ``brand_color`` option to change the default blue color used by the backend interface: .. code-block:: yaml easy_admin: design: brand_color: '#1ABC9C' # ... .. image:: ../images/easyadmin-design-brand-color.png :alt: Using a custom brand color in the backend The value of the ``brand_color`` option can be any of the valid CSS color formats: .. code-block:: yaml easy_admin: design: brand_color: 'red' brand_color: 'rgba(26, 188, 156, 0.85)' # in this example, all '%' characters are doubled to escape them and # avoid Symfony considering them special values in the YAML file brand_color: 'hsl(0, 100%%, 50%%);' # ... Changing the Color Scheme ------------------------- By default, backend interface uses a dark color scheme, which is the most common choice for admin applications. If you prefer a lighter alternative, add the ``color_scheme`` option with the ``light`` value: .. code-block:: yaml easy_admin: design: # 'dark' is the default value color_scheme: 'light' # ... .. image:: ../images/easyadmin-design-color-scheme-light.png :alt: The default backend homepage using the light color scheme .. caution:: The ``color_scheme`` option is deprecated since 1.x version and it will be removed in EasyAdmin 2.0. Adding Custom Web Assets ------------------------ Complex backends may require to load your own CSS and JavaScript files. Add the ``assets`` option to define the paths of the web assets to load in the backend pages. All kinds of assets are supported and linked accordingly: .. code-block:: yaml easy_admin: design: assets: css: # HTTP protocol-relative URL - '//example.org/css/admin1.css' # absolute non-secure URL - 'http://example.org/css/admin2.css' # absolute secure URL - 'https://example.org/css/admin3.css' # absolute internal bundle URL - '/bundles/user/css/admin4.css' # relative internal bundle URL - 'bundles/app/css/admin5.css' js: # this option works exactly the same as the 'css' option - '//example.org/js/admin1.js' - 'http://example.org/js/admin2.js' - 'https://example.org/js/admin3.js' - '/bundles/user/js/admin4.js' - 'bundles/app/js/admin5.js' # ... CSS Selectors ~~~~~~~~~~~~~ The ``
`` element of every backend page includes different ``id`` and ``class`` attributes to help you target your own styles. The ``id`` follows this pattern: ======== ============================================ View ```` ID attribute ======== ============================================ ``edit`` ``easyadmin-edit-