diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-24 15:38:16 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-08-24 15:38:16 +0200 |
commit | 529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105 (patch) | |
tree | 8a50c30271b9b328cde0d907b1441f2dabdc341b /Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php | |
parent | 15e4724761c50b30803df1811a525c85058f70bf (diff) | |
download | electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.gz electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.bz2 electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.zip |
Update
Diffstat (limited to 'Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php')
-rw-r--r-- | Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php b/Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php new file mode 100644 index 0000000..f803f52 --- /dev/null +++ b/Neutron-trunk/cms-special/admin-v2/$resources/spotlight.php @@ -0,0 +1,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>
\ No newline at end of file |