-尊龙登录

.. _themes: custom themes ============= phpmyadmin comes with support for third party themes. you can download additional themes from our website at . configuration ------------- themes are configured with :config:option:`$cfg['thememanager']` and :config:option:`$cfg['themedefault']`. under :file:`./themes/`, you should not delete the directory ``pmahomme`` or its underlying structure, because this is the system theme used by phpmyadmin. ``pmahomme`` contains all images and styles, for backwards compatibility and for all themes that would not include images or css-files. if :config:option:`$cfg['thememanager']` is enabled, you can select your favorite theme on the main page. your selected theme will be stored in a cookie. creating custom theme --------------------- to create a theme: * make a new subdirectory (for example "your\_theme\_name") under :file:`./themes/`. * copy the files and directories from ``pmahomme`` to "your\_theme\_name" * edit the css-files in "your\_theme\_name/css" * put your new images in "your\_theme\_name/img" * edit :file:`_variables.scss` in "your\_theme\_name/scss" * edit :file:`theme.json` in "your\_theme\_name" to contain theme metadata (see below) * make a new screenshot of your theme and save it under "your\_theme\_name/screen.png" theme metadata .. versionchanged:: 4.8.0 before 4.8.0 the theme metadata was passed in the :file:`info.inc.php` file. it has been replaced by :file:`theme.json` to allow easier parsing (without need to handle php code) and to support additional features. in theme directory there is file :file:`theme.json` which contains theme metadata. currently it consists of: .. describe:: name display name of the theme. **this field is required.** .. describe:: version theme version, can be quite arbitrary and does not have to match phpmyadmin version. **this field is required.** .. describe:: description theme description. this will be shown on the website. **this field is required.** .. describe:: author theme author name. **this field is required.** .. describe:: url link to theme author website. it's good idea to have way for getting support there. .. describe:: supports array of supported phpmyadmin major versions. **this field is required.** for example, the definition for original theme shipped with phpmyadmin 4.8: .. code-block:: json { "name": "original", "version": "4.8", "description": "original phpmyadmin theme", "author": "phpmyadmin developers", "url": "https://www.phpmyadmin.net/", "supports": ["4.8"] } sharing images if you do not want to use your own symbols and buttons, remove the directory "img" in "your\_theme\_name". phpmyadmin will use the default icons and buttons (from the system-theme ``pmahomme``).
网站地图