Allows an admin style for SilverStripe Admin v4 to be defined via configuration.
Spiritual successor to SilverStripe Moderno Admin, for SS4.
Installation is via Composer:
$ composer require silverware/admin
As with all SilverStripe modules, configuration is via YAML. Extensions to LeftAndMain
are applied
via config.yml
.
You can customise the admin appearance via YAML by defining an admin_style
array in your configuration. This needs to be applied to LeftAndMain
. For example:
SilverStripe\Admin\LeftAndMain:
admin_style:
ColorBackgroundMenuHeader: '#005b94'
ColorBackgroundHoverMenuHeader: '#207bb4'
ColorForegroundSiteName: '#fff'
ColorForegroundProfile: '#fff'
ColorIconLogo: '#fff'
ColorIconProfile: '#fff'
ColorIconLogout: '#fff'
ColorBorderBottomSiteName: '#106ba4'
ColorBackgroundMenu: '#20282c'
ColorBackgroundMenuItem: '#20282c'
ColorForegroundMenuItem: '#bfc0c0'
ColorBackgroundHoverMenuItem: 'rgba(255, 255, 255, 0.1)'
ColorForegroundHoverMenuItem: '#fff'
ColorBackgroundCurrentMenuItem: '#139fda'
ColorForegroundCurrentMenuItem: '#fff'
ColorBorderRightMenuHide: false
ColorBorderRightMenu: '#20282c'
ColorIconMenuItem: '#bfc0c0'
ColorIconHoverMenuItem: '#fff'
ColorIconCurrentMenuItem: '#fff'
ColorMenuItemAfterText: '#fff'
ColorBackgroundToggle: '#20282c'
ColorBorderTopToggle: '#20282c'
ColorToggleStatus: '#fff'
ColorToggleCollapse: '#fff'
ColorBorderFocusField: '#139fda'
Each variable should be self-explanatory, with the exception of ColorBorderRightMenuHide
. If set to true
,
the thin line on the right-hand side of the admin menu will be hidden, and ColorBorderRightMenu
will be ignored.
If you need to disable the admin style, so that the standard SS4 admin style is used, simply
set admin_style_disabled
to true
for LeftAndMain
:
SilverStripe\Admin\LeftAndMain:
admin_style_disabled: true
Please use the GitHub issue tracker for bug reports and feature requests.
Your contributions are gladly welcomed to help make this project better. Please see contributing for more information.
Colin Tucker | Praxis Interactive |
BSD-3-Clause © Praxis Interactive