Skip to content

Tag page appearance

Someone who scans a tag without the Sancho app sees a page on t1g.pl with the tag’s details. By default the page looks like Sancho. You can give it your company’s logo and colour and add an HTML fragment of your own, for example a phone number for whoever finds your tool.

Open Settings > Tags, find the Tag page appearance row and click Configure. A panel opens under the row with three fields, a preview of the page with a light and dark mode switch, and Cancel and Save buttons.

Changing the appearance takes the permission to change account administration. Everyone else sees the row, but the button is disabled for them.

The setting works the same in the cloud and on a self-hosted server, but the tag page appears only under these conditions:

  • In the cloud, only in the Page in the app redirect mode. In Custom URL mode a scan goes to your address, and in Disabled mode it ends on the “No destination” page in Sancho’s look.
  • On a self-hosted server, only when the install is registered with Sancho cloud for tag scans and Public access to tag information is on in Settings > Tags. Without that switch, people who scan a tag see the “Tag scanning disabled” page in your look.

The company name in the page header is the account’s display name from Settings > General. The panel shows it under the fields and links to those settings.

On a self-hosted server the root account is created with the name “Root account”, and that is the name people will see when they scan a tag. Rename it before you set up your own appearance.

One colour in #RRGGBB format. The page uses it for links, the badge with the tag’s kind (e.g. “Tool”), the initials of the person using a tool, and the tile with the company’s initial when there is no logo.

To keep text readable, the page darkens colours that are too light in light mode and lightens them in dark mode. The page may therefore show a different shade from the one you picked. A dark navy such as #003973 stays unchanged in light mode.

You paste the logo as SVG text. It replaces the Sancho mark and name in the header and is not a link. Without a logo the header shows a tile with the first letter of the account name in the brand colour, with the full name beside it.

  • Paste the <svg> code, up to 64 KiB. Sancho neither checks nor fixes it: it goes on the page exactly as you paste it.
  • With a viewBox attribute the logo is 52 px tall and its width follows its proportions, up to the width of the page. Without a viewBox the logo does not scale.
  • Put colours in a style="fill:…" attribute, not in classes. Graphics programs such as Illustrator save styles as <style>.st0{…}</style>, and such a block applies to the whole page, not only to the logo.
  • style="fill:var(--brand-ink)" makes a logo element follow light and dark mode, in a readable shade of the brand colour. There is an example below, in “A logo for dark mode”.

The fragment is your own HTML, up to 32 KiB. The tag page shows it under the tag’s details, above the footer. The “Unassigned tag” and “Tag scanning disabled” pages show it under the message. So does the “Something went wrong” page, if it managed to fetch the account’s appearance; when the account’s server does not answer, that page looks like Sancho.

One fragment serves every tag of the account. To show something only for some tags, use CSS with the attributes described below. The fragment can contain a <style> block and style attributes. Classes from your <style> apply to the whole page, so pick names the page does not use.

With your own appearance the page shows no Sancho description and no button to Sancho’s website. The footer keeps a “Powered by Sancho WMS” link, and on the tag page also the scanned code.

These CSS variables have values for the scanning person’s light and dark mode:

  • var(--brand-ink): a readable shade of the brand colour, for text, links and buttons;
  • var(--brand-tint): a faint background in the brand colour;
  • var(--text): text colour;
  • var(--text-secondary): secondary text colour;
  • var(--raised): card background;
  • var(--shaded): shaded background;
  • var(--border): border colour;
  • var(--page): page background, also for text on a var(--brand-ink) background.

These attributes tell you what the page is showing:

  • main[data-page]: tag (the tag page), unprogrammed (“Unassigned tag”), disabled (“Tag scanning disabled”), error (“Something went wrong”);
  • main[data-target], on the tag page only: asset (a fixed asset, equipment or a tool), product, document;
  • html[lang]: the scanning person’s language, pl, en, de or uk.

The examples below show how to use them.

The page runs no scripts and submits no forms. It shows no frames (iframe) and no web fonts at all, so use system fonts such as sans-serif. It loads images only over https: or as data:. tel: and mailto: links work.

Paste the examples into the HTML fragment field, and the last one, the logo, into the Logo (SVG) field. Change the text, the phone number and the address. The examples use different classes, so you can combine several in one fragment.

A card with the company name, a phone number and an email address. The request to call appears only on fixed assets, equipment and tools.

<style>
.found { margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--raised); color: var(--text); }
.found p { margin: 0 0 12px; }
.found .call { display: inline-block; padding: 10px 16px; border-radius: 10px; background: var(--brand-ink); color: var(--page); font-weight: 600; text-decoration: none; }
.found .mail { margin-left: 12px; color: var(--brand-ink); }
main:not([data-target="asset"]) .lost { display: none; }
</style>
<div class="found">
<p class="lost">Znalazłeś to narzędzie? Zadzwoń, a odbierzemy je tam, gdzie jest.</p>
<p>Przykładowa Firma</p>
<a class="call" href="tel:+48123456789">Zadzwoń: 12 345 67 89</a>
<a class="mail" href="mailto:biuro@example.com">biuro@example.com</a>
</div>

This paragraph shows only on tags of fixed assets, equipment and tools. It is hidden on other tags and on the message pages.

<style>
main:not([data-target="asset"]) .only-asset { display: none; }
</style>
<p class="only-asset">To narzędzie należy do Przykładowej Firmy. Prosimy o zwrot.</p>

The page shows one of two paragraphs: the first on products, the second on fixed assets, equipment and tools. On documents and on the message pages both are hidden.

<style>
main:not([data-target="product"]) .for-product { display: none; }
main:not([data-target="asset"]) .for-asset { display: none; }
</style>
<p class="for-product">Pytania o ten produkt? Zadzwoń: 12 345 67 89.</p>
<p class="for-asset">Znalazłeś to narzędzie? Zadzwoń: 12 345 67 89.</p>

Sancho does not translate the fragment. Write the text in several languages and hide the versions the scanning person does not need. In this example, someone whose language is Polish sees the Polish text, and everyone else sees the English one.

<style>
html:not([lang="pl"]) .lang-pl { display: none; }
html[lang="pl"] .lang-en { display: none; }
</style>
<p class="lang-pl">Znalazłeś to narzędzie? Zadzwoń: 12 345 67 89.</p>
<p class="lang-en">Found this tool? Call +48 12 345 67 89.</p>

The “Unassigned tag” page appears when a tag is not assigned in Sancho yet. This paragraph shows only on that page.

<style>
.new-tag { text-align: center; color: var(--text-secondary); }
main:not([data-page="unprogrammed"]) .new-tag { display: none; }
</style>
<p class="new-tag">Ten tag czeka na przypisanie. Jeśli go znalazłeś, zadzwoń: 12 345 67 89.</p>

The square always keeps the same colour, and the company name takes a readable shade of the brand colour in light and dark mode. Paste this code into the Logo (SVG) field.

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 40">
<rect width="40" height="40" rx="8" style="fill:#003973" />
<text x="52" y="27" style="fill:var(--brand-ink);font:600 18px sans-serif">Przykładowa Firma</text>
</svg>

The preview in the panel shows changes at once, before you save. It is drawn by the same code as the page on t1g.pl, for a sample tool. A saved change appears on t1g.pl within 5 minutes.

To go back to the Sancho page, clear all three fields and save.