Git Product home page Git Product logo

silverware-admin's Introduction

SilverWare Admin Module

Latest Stable Version Latest Unstable Version License

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
Colin Tucker Praxis Interactive

License

BSD-3-Clause © Praxis Interactive

silverware-admin's People

Contributors

colintucker avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.