aboutsummaryrefslogtreecommitdiff
path: root/templates/sidebar/map_key.php
blob: 34d6c7f02ad09749ed4ccad40d03745255cccf4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?
/**
 * Template parameter documentation:
 *
 * - $keys: A two-dimensional array with the keys.
 *   Each array element has the following structure:
 *   [
 *       'colour' => The colour for the key.
 *       'text' => The description for the key.
 *   ]
 *
 */
?>

<? if ($keys): ?>
    <ul class="default map-key-list">
        <? foreach ($keys as $key): ?>
            <li class="map-key">
                <span style="background-color:<?= $key['colour'] ?>">
                    &nbsp;
                </span>
                <?= htmlReady($key['text']) ?>
            </li>
        <? endforeach ?>
    </ul>
<? endif ?>