Getting started with templates¶
A template is an ordinary web page — index.html, styles.css, optionally script.js
and an assets/ folder — zipped and uploaded to the template library.
The sign player loads it full-screen, binds it to the schedule, and keeps it running for
days. This page covers the structure every template shares and the rules the upload
enforces; the pages under Data binding explain how the page reads the schedule.
Where to work¶
Any editor with a live HTML preview does for the first draft; index.html opens in a
browser as an ordinary page, with its data-bound fields empty. Once uploaded, click the
template's title in the template library to preview it with sample
data, or open it in the Template Editor, which edits the
template in place and previews it with sample or real event data, so a template can be
finished there — see Testing and troubleshooting templates.
The base template¶
Download Base Template on the Templates page (or here) gives you a ZIP that already follows every rule on this page: the required files, a body that stays black, and a container that is your working area.
index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>[Insert Template Title Here]</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<!-- ! Consider this div as your body and insert all your content inside this div. Do not put anything outside of this div -->
<div id="your-content" class="your-content"></div>
</body>
</html>
styles.css:
/* Global reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body,
html {
width: 100%;
height: 100%;
}
/* ! DO NOT MODIFY THE BODY CSS */
body {
background-color: #000;
cursor: none;
}
/* ! This div acts as your body */
.your-content {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #fff; /* This acts as your body background color. You can change it to any color you want apart from making it transparent. */
/* You can add a background image */
/* background-image: url(./assets/); */
z-index: 9999;
pointer-events: none;
}
Keep the body black¶
The sign player guarantees a black fallback body background, so an unstyled body can never
flash white when switching between templates. A background you set yourself takes priority
over that fallback — but keeping your own body black matches the player's base, so switches
stay seamless. The .your-content container acts as your actual working area where you can
set any background color or image you want.
- Do put all your content inside the
#your-contentdiv, style.your-contentwith your background, and keep the body black (#000). - Don't place content outside
.your-content, make its background transparent, or give the body a light background — a light body is visible during template switches and, if set instyles.css, may blink black for a frame while the stylesheet applies.
Template structure¶
my-template/
├── index.html # required
├── styles.css # required — the only stylesheet
├── script.js # optional
└── assets/
├── images/
├── fonts/
└── videos/
The upload enforces this layout:
- The ZIP root may contain only
index.html,styles.cssandscript.js, plus theassets/folder. Any other root file or folder is rejected — including a wrapper folder, so zip the contents of your template folder, not the folder itself. index.htmlandstyles.cssare required even when all your CSS is inline; keep the base template'sstyles.cssin that case.styles.cssis the only stylesheet: no other.cssfiles at the root or underassets/. Put extra styles instyles.cssor in inline<style>blocks.- Additional JavaScript files are allowed only inside
assets/(for exampleassets/js/animations.js), referenced with a normal<script>tag. Scripts go at the very end of<body>; the stylesheet is linked in<head>. - Images, fonts and videos go under
assets/;.html,.css, archives and executables are not allowed there. - File and folder names must be plain ASCII without spaces or punctuation that needs URL
encoding (
: / ? # [ ] @ ! $ & ' ( ) * + , ; =). Links are case-sensitive on the sign:Logo.pngandlogo.pngare different files.
Scripts must not load files from the ZIP at runtime — no fetch('assets/…'),
import('./…') or asset paths in string literals. Reference every asset from index.html
or styles.css; the full list of rules for script.js is on
Template JavaScript best practices.
Inline or external¶
For a small template, CSS in a <style> block and JavaScript in a <script> block at the
end of <body> is fine; above a few dozen lines, external styles.css and script.js are
easier to maintain and are what the Template Editor shows as separate files. Either way the
ZIP still needs styles.css at the root.
Assets¶
Always use relative paths:
<img src="assets/images/logo.png" alt="Logo" />
<video src="assets/videos/intro.mp4" autoplay muted loop playsinline></video>
Relative paths work in inline SVG too, including <image xlink:href="assets/…"> and url() in
the SVG's own <style> block, as design tools often export them.
An absolute path (C:/Users/…, /var/www/…) breaks as soon as the template leaves your
machine. A <video> needs more than a path to run reliably on a sign — autoplay only
works together with muted, and long-running loops need cleanup; see
Embedding video.
Do not rely on CDN links or external resources. Signs may run on restricted networks or
offline, and only files bundled in the ZIP are cached on the sign. Instead of a
<link href="https://cdn…"> or <script src="https://…">, download the library and bundle
it (combine it into script.js, or place it under assets/), and download fonts into
assets/fonts — see Fonts. Background and banner images
have their own page: Background and banner images.
Keep images close to the size they are displayed at and compress them; a sign that loads a
4000 × 3000 photo for an 800 × 600 slot wastes memory for days. Small icons can be embedded
as data: URIs.
Screen size¶
A sign's screen size is set on the room (or the event's default) and shown as the room's Dimensions. Design for the exact resolution the screens will have — 1920 × 1080 for landscape Full HD, 1080 × 1920 for portrait — and record it as the template's Default Pixel Width and Height at upload so the library shows what the template targets.
Prefer layouts that fill the viewport (width: 100%; height: 100% on .your-content,
viewport units, flex or grid) over hard-coded pixel sizes, so the same template serves
screens that differ slightly. Templates the app generates for you from a media file or URL
offer this choice explicitly as Responsive or Absolute (see the
template library). Hide scrollbars with
overflow: hidden on the container.
Performance¶
Signs run for days without a reload:
- Avoid memory leaks — clear intervals and timeouts, or use the template lifecycle hooks that clean up for you (see Template JavaScript best practices).
- Use CSS animations over JavaScript where possible, and animate
transformandopacityrather thanwidth,height,toporleft. - Limit DOM manipulation — update content, don't rebuild sections.
- Test long-running behavior — a template should look the same after hours.
Packaging and uploading¶
- Zip the contents of your template folder so
index.htmlsits at the ZIP root. - Upload it on the Templates page, or from an event's or room's settings dialog (see Template library). The upload checks the structure and runs a static analysis; errors are listed with the reason.
- Assign the template to an event, a room or an item (How templates are assigned) and check the sign, or click the template's title in the library first to preview it with sample data.
Before uploading, run through Testing and troubleshooting templates.
Related¶
- Template library — uploading, the checks, versions
- Displaying JSON values — binding the schedule into the page
- Template JavaScript best practices
- Testing and troubleshooting templates
- Example templates