# silverstripe-branding

> [![Build Status](https://travis-ci.org/Rhym/silverstripe-cms-theme.svg?branch=master)](https://travis-ci.org/Rhym/silverstripe-cms-theme)

Latest version **2.0.0** (published 2017-11-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install silverstripe-branding
pnpm add silverstripe-branding
yarn add silverstripe-branding
bun add silverstripe-branding
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2017-11-16 |
| First published | 2017-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 15 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 39 |
| Maintainers | ryanpotternz |

## Links

- npm: https://www.npmjs.com/package/silverstripe-branding
- Repository: https://github.com/Rhym/silverstripe-cms-theme
- npm.io page: https://npm.io/package/silverstripe-branding

## Dependencies (15)

- [cssnano](https://npm.io/package/cssnano.md) ^3.10.0
- [webpack](https://npm.io/package/webpack.md) ^3.8.1
- [node-sass](https://npm.io/package/node-sass.md) ^4.5.3
- [stylelint](https://npm.io/package/stylelint.md) ^8.2.0
- [css-loader](https://npm.io/package/css-loader.md) ^0.28.7
- [sass-loader](https://npm.io/package/sass-loader.md) ^6.0.6
- [style-loader](https://npm.io/package/style-loader.md) ^0.19.0
- [postcss-import](https://npm.io/package/postcss-import.md) ^11.0.0
- [postcss-loader](https://npm.io/package/postcss-loader.md) ^2.0.8
- [stylelint-scss](https://npm.io/package/stylelint-scss.md) ^2.1.0
- [postcss-cssnext](https://npm.io/package/postcss-cssnext.md) ^3.0.2
- [clean-webpack-plugin](https://npm.io/package/clean-webpack-plugin.md) ^0.1.17
- [stylelint-webpack-plugin](https://npm.io/package/stylelint-webpack-plugin.md) ^0.9.0
- [stylelint-config-standard](https://npm.io/package/stylelint-config-standard.md) ^17.0.0
- [extract-text-webpack-plugin](https://npm.io/package/extract-text-webpack-plugin.md) ^3.0.2

## Recent versions

- 2.0.0 (latest) — 2017-11-16
- 0.1.5 — 2017-04-03
- 0.1.4 — 2017-04-03

## README

# Silverstripe CMS Branding

[![Build Status](https://travis-ci.org/Rhym/silverstripe-cms-theme.svg?branch=master)](https://travis-ci.org/Rhym/silverstripe-cms-theme)

Just a nice little UI change for the cms.

The theme supports an UploadField in the *Settings > Settings Tab > CMS Tab* for a logo to be displayed in the left-hand menu of the CMS.

## Thanks

Thanks to [https://github.com/symbiote/silverstripe-grouped-cms-menu](https://github.com/symbiote/silverstripe-grouped-cms-menu) for some of their code for grouped menu items.

## Installation

```bash
composer require ryanpotter/silverstripe-cms-theme
```
## Configuration

You can either choose to upload a CMS logo through the Site Settings section of the CMS, or you can define it through a YML configuration like the below:

```yml
SilverStripe\SiteConfig\SiteConfig:
  cms_logo: 'mysite/images/cms_logo.png'
```

You can set the theme colour of the left menu by defining it through a YML configuration like the below:

```yml
SilverStripe\CMS\Controllers\CMSPagesController:
  cms_background: '#0747A6'
  cms_border_color: '#173778'
  cms_color: '#fff'
  cms_hover_background: '#093684'
  cms_active_background: '#173778'
  cms_active_color: '#fff'
  cms_drawer_background: '#0e418e'
```

## Grouping CMS Menus

You can add menu items to a list by using adding the menu code to the `menu_groups` config e.g:

```yml
SilverStripe\Admin\LeftAndMain:
  menu_groups:
    Misc:
      - SilverStripe-CampaignAdmin-CampaignAdmin
      - Help
      - SilverStripe-Reports-ReportAdmin
```

### Overriding/Adding Icons

The icons in this cms theme use [Font-Awesome](http://fontawesome.io/), to override these icons simply add the class that represents the icon you wish to display in your ModelAdmin extension. e.g:

```php
private static $menu_icon_class = 'fa fa-pencil';
```

Alternatively you can set this using a YML config. e.g

```yml
SilverStripe\CMS\Controllers\CMSPagesController:
  menu_icon_class: 'fa fa-sitemap'
```

---
_Source: https://npm.io/package/silverstripe-branding · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
