A Javascript plugin which creates a dynamic link to your status page, displaying the current state of affairs for your audience to see. As used on our own site https://www.sorryapp.com
Wherever on the page you'd like to see the dynamic link. You can specify which pages you want updates to be sourced from by including your Page ID in the data-status-link-for
attribute.
<a href="https://status-bar-test.sorryapp.com" data-status-link-for="f1ff551f" title="Visit our status page">System Status</a>
If the address of your status page is http://xxxxxx.sorryapp.com
then xxxxxxx
is what you need to use as the data attribute. This unique ID can also be found in the browser's address bar within the app. https://app.sorryapp.com/pages/xxxxx
Just before the closing </ body>
tag, this JS will do the clever stuff to transform your basic HTML link above into something more intelligent.
<script src="//code.sorryapp.com/status-page-link/0.latest/status-page-link.min.js"></script>
You'll want to include FontAwsome Icon Fonts on your site to get the icons working. You'll also need to include the following CSS reference for some basic styling.
<link href="//code.sorryapp.com/status-page-link/0.latest/status-page-link.min.css" rel="stylesheet">
If you want to custom style your widget, you only need create your own CSS. The markup for the widget looks as follows.
<a href="https://status-bar-test.sorryapp.com" data-status-link-for="f1ff551f" title="Visit our status page">
<small>Current Status:</small>
<i class="fa fa-times-circle-o" aria-hidden="true"></i>We are having issues at the moment
</a>
If you want to create your own custom build, or contribute to the project it’s important you know how our build and release process works.
This project uses Grunt with convenient methods for working with the project. It's how we compile our code, run tests, and more. To use it, install the required dependencies as directed and then run some Grunt commands.
From the command line:
- Install
grunt-cli
globally withnpm install -g grunt-cli
. - Navigate to the root
/sorry-announce
directory, then runnpm install
. npm will look at package.json and automatically install the necessary local dependencies listed there.
When completed, you'll be able to run the various Grunt commands provided from the command line.
Unfamiliar with npm
? Don't have node installed? That's a-okay. npm stands for node packaged modules and is a way to manage development dependencies through node.js. Download and install node.js before proceeding.
Run grunt
to run tests locally and compile the CSS and JavaScript into /dist
.
Should you encounter problems with installing dependencies or running Grunt commands, uninstall all previous dependency versions (global and local). Then, rerun npm install
.
For transparency and insight into our release cycle, and for striving to maintain backward compatibility, This project will be maintained under the Semantic Versioning guidelines as much as possible.
Releases will be numbered with the following format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
- Breaking backward compatibility bumps the major (and resets the minor and patch)
- New additions without breaking backward compatibility bumps the minor (and resets the patch)
- Bug fixes and misc changes bumps the patch
For more information on SemVer, please visit http://semver.org/.
Robert Rawlins
Robin Geall
Copyright © 2016 Sorry™ - See LICENSE for details.