├── docs └── screenshot.png ├── package.json ├── assets └── css │ └── panel-brand.css ├── kirby-panel-brand.php └── readme.md /docs/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flokosiol/kirby-panel-brand/HEAD/docs/screenshot.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kirby-panel-brand", 3 | "description": "Makes it easier to see when you are in the wrong or right panel.", 4 | "author": "Jens Törnell ", 5 | "version": "0.1", 6 | "type": "kirby-plugin", 7 | "license": "MIT" 8 | } -------------------------------------------------------------------------------- /assets/css/panel-brand.css: -------------------------------------------------------------------------------- 1 | .app:before { 2 | content: '[text]'; 3 | background: [background]; 4 | color: [color]; 5 | display: block; 6 | height: 3em; 7 | line-height: 3em; 8 | padding: 0 20px; 9 | position: fixed; 10 | top: 0; 11 | width: 100%; 12 | } 13 | 14 | .topbar { 15 | margin-top: 3em; 16 | } 17 | 18 | .fileview-preview-link, .main { 19 | margin-top: 3em; 20 | height: calc(100% - 3em); 21 | } -------------------------------------------------------------------------------- /kirby-panel-brand.php: -------------------------------------------------------------------------------- 1 | user() ) { 3 | kirby()->set('option', 'panel.stylesheet', u() . '/panel-brand.css'); 4 | 5 | kirby()->routes(array( 6 | array( 7 | 'pattern' => 'panel-brand.css', 8 | 'action' => function() { 9 | header("Content-type: text/css; charset: UTF-8"); 10 | $css_path = kirby()->roots()->plugins() . DS . 'kirby-panel-brand' . DS . 'assets' . DS . 'css' . DS . 'panel-brand.css'; 11 | $css = file_get_contents($css_path); 12 | $css = str_replace( 13 | array( 14 | '[text]', 15 | '[background]', 16 | '[color]' 17 | ), 18 | array( 19 | c::get('plugin.panel.brand.text', 'Panel Brand'), 20 | c::get('plugin.panel.brand.background', '#ae287f'), 21 | c::get('plugin.panel.brand.color', '#fff') 22 | ), 23 | $css 24 | ); 25 | echo $css; 26 | } 27 | ) 28 | )); 29 | } -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Kirby Panel Brand 2 | 3 | *Version 0.1* 4 | 5 | When having multiple environments (local, development and production) and all the panels look the same, it can be easy to be in the wrong Panel. 6 | 7 | This plugin add a bar with background color and a text of your choice to make it easier to be alerted when you are in the wrong or right Panel. 8 | 9 | ![](docs/screenshot.png) 10 | 11 | ## Installation 12 | 13 | Use one of the alternatives below. 14 | 15 | ### 1. Kirby CLI 16 | 17 | If you are using the [Kirby CLI](https://github.com/getkirby/cli) you can install this plugin by running the following commands in your shell: 18 | 19 | ``` 20 | $ cd path/to/kirby 21 | $ kirby plugin:install username/kirby-panel-brand 22 | ``` 23 | 24 | ### 2. Clone or download 25 | 26 | 1. [Clone](https://github.com/username/kirby-panel-brand.git) or [download](https://github.com/username/kirby-panel-brand/archive/master.zip) this repository. 27 | 2. Unzip the archive if needed and rename the folder to `kirby-panel-brand`. 28 | 29 | **Make sure that the plugin folder structure looks like this:** 30 | 31 | ``` 32 | site/plugins/kirby-panel-brand/ 33 | ``` 34 | 35 | ### 3. Git Submodule 36 | 37 | If you know your way around Git, you can download this plugin as a submodule: 38 | 39 | ``` 40 | $ cd path/to/kirby 41 | $ git submodule add https://github.com/username/kirby-panel-brand site/plugins/kirby-panel-brand 42 | ``` 43 | 44 | ## Setup 45 | 46 | ## Options 47 | 48 | The following options can be set in your `/site/config/config.php` file: 49 | 50 | ```php 51 | c::set('plugin.panel.brand.text', 'Panel Brand'); 52 | c::set('plugin.panel.brand.background', '#ae287f'); 53 | c::set('plugin.panel.brand.color', '#fff'); 54 | ``` 55 | 56 | ### text 57 | 58 | Bar text. Letters and numbers are allowed (it used the CSS `content` property). 59 | 60 | ### background 61 | 62 | Bar background color. 63 | 64 | ### color 65 | 66 | Bar text color. 67 | 68 | ## Changelog 69 | 70 | **0.1** 71 | 72 | - Initial release 73 | 74 | ## Requirements 75 | 76 | - [**Kirby**](https://getkirby.com/) 2.3+ 77 | 78 | ## Disclaimer 79 | 80 | This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please [create a new issue](https://github.com/username/kirby-panel-brand/issues/new). 81 | 82 | ## License 83 | 84 | [MIT](https://opensource.org/licenses/MIT) 85 | 86 | It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech. 87 | 88 | ## Credits 89 | 90 | - [Jens Törnell](https://github.com/jenstornell) --------------------------------------------------------------------------------