aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/cms-special/admin/$resources/spotlight.php
blob: f803f528057704a50b0701e16d585170f7be2838 (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
<?php // Tutoriel utilisé : https://www.youtube.com/watch?v=5Y3Urj_DVMw 
?>
<script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/spotlight.js" defer></script>

<?php

$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/home/all/db.json"));

?>
<ul class="spotlight-elements">
    <?php foreach ($data as $category): ?>
        <?php foreach ($category->items as $item): ?>
            <li class="spotlight-element">
                <a href="#/<?= $item->page ?>" cat="<?= $category->name ?>" icon="<?= $category->icon ?>" class="spotlight-link"><?= $lang["admin-home"]["allitems"][$item->id] ?></a>
            </li>

            <script>
                sysroot = "<?= $GLOBALS["SYSTEM_ROOT"] ?>";
            </script>
        <?php endforeach; ?>
    <?php endforeach; ?>
</ul>
<spotlight-bar target=".spotlight-elements a" placeholder="<?= $lang["spotlight"]["search"] ?>">
</spotlight-bar>