https://github.com/studio24/dev-site-banner
Site banner to display on non-production sites (e.g. staging, development)
https://github.com/studio24/dev-site-banner
Last synced: about 1 year ago
JSON representation
Site banner to display on non-production sites (e.g. staging, development)
- Host: GitHub
- URL: https://github.com/studio24/dev-site-banner
- Owner: studio24
- License: other
- Created: 2015-10-02T11:00:23.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-16T17:57:05.000Z (over 10 years ago)
- Last Synced: 2025-06-13T22:52:40.001Z (about 1 year ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 1
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Development Site Banner
*Note: Alpha software, in development - please don't use yet*
This is a simple package to display a banner at the top of all pages on your website displaying key dev information:
* Environment
* Git branch
* Last commit
## Usage
You first need to set the current environment name for your application in the variable ```$environmentName```
Then output the site banner via:
```
$banner = new \Studio24\SiteBanner($environmentName);
echo $banner->getBanner();
```
### Development
Example test code
```
include '/path/to/dev-site-banner/vendor/autoload.php';
use Studio24\SiteBanner;
$banner = new SiteBanner('development');
echo $banner->getBanner();
```
## Credits
Credit to Sebastian Bergmann, the lightweight Git reading functionality in this package is based from his work in https://github.com/sebastianbergmann/git
Warning icon from Open Iconic — www.useiconic.com/open