Preview Banner
The Preview Banner will look for the presence of the uom.preview meta
tag and display a banner if it exists and the content
attribute is not empty.
<meta name="uom.preview" content="latest" />
A cookie
stores the value from the content
attribute, which is then passed to the server
on each subsequent page load.
Clicking on the reset
button clears the cookie and reloads the page.
The Preview Banner is primarily used in conjuction with Matrix CMS
Usage
Add the preview-banner.js
script to the <head>
of the document.
<script src="//dds-gen3.web.unimelb.edu.au/v15.5.0/preview-banner.js" defer></script>
Demonstration
Click here to preview the banner.
CMS
When a custom design system version has been requested with ?preview=...
, the CMS will include <meta name="uom.preview" content="...">
in the <head>
of the document.