SilverWare Admin Module
Allows an admin style for SilverStripe Admin v4 to be defined via configuration, and fixes the broken page icons currently present in SS4 alpha.
Contents
Background
Spiritual successor to SilverStripe Moderno Admin, for SS4.
Requirements
Installation
Installation is via Composer:
$ composer require silverware/admin
Configuration
As with all SilverStripe modules, configuration is via YAML. Extensions to LeftAndMain
are applied
via config.yml
.
Page Icon Fix
The module fixes the broken page icons currently present in SS4 alpha, and
uses the page_icon_selectors
array defined in config.yml
to build its custom CSS.
By default, these selectors are:
.page-icon.class-%s
li.class-%s > a .jstree-pageicon
Elements matching the configured selectors will have their CSS class backslashes replaced with underscores, resulting in valid CSS and allowing the page icons to appear again in the site tree.
Admin Style
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:
ColorBackgroundLogo: '#005b94'
ColorForegroundLogo: 'rgba(255, 255, 255, 0.8)'
ColorLinkLogo: '#fff'
ColorLinkLogoIcon: 'rgba(255, 255, 255, 0.8)'
ColorBorderBottomLogo: '#106ba4'
ColorBackgroundMenu: '#20282c'
ColorBackgroundMenuItem: '#20282c'
ColorForegroundMenuItem: '#bfc0c0'
ColorBackgroundHoverMenuItem: 'rgba(255, 255, 255, 0.1)'
ColorForegroundHoverMenuItem: '#fff'
ColorBackgroundCurrentMenuItem: '#139fda'
ColorForegroundCurrentMenuItem: '#fff'
ColorBorderRightMenuHide: false
ColorBorderRightMenu: '#20282c'
ColorMenuItemIcon: '#bfc0c0'
ColorMenuItemAfterText: '#fff'
ColorHoverMenuItemIcon: '#fff'
ColorCurrentMenuItemIcon: '#fff'
ColorBackgroundToggle: '#20282c'
ColorBorderTopToggle: '#20282c'
ColorToggleStatus: '#fff'
ColorToggleCollapse: '#fff'
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.
Disabling Admin Style
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
Issues
Please use the GitHub issue tracker for bug reports and feature requests.
Contribution
Your contributions are gladly welcomed to help make this project better. Please see contributing for more information.
Maintainers
Colin Tucker | Praxis Interactive |
License
BSD-3-Clause © Praxis Interactive