feat(Modules): add modules list module
This commit is contained in:
parent
2b64fe576f
commit
c677114e08
2 changed files with 26 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
return [
|
||||
'domain' => 'lefuturiste.fr',
|
||||
'modules' => [
|
||||
'modules' => [],
|
||||
'random' => [],
|
||||
'date' => [
|
||||
'alias' => ['printdate']
|
||||
|
|
25
modules/modules/modules.php
Normal file
25
modules/modules/modules.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<h1> List of modules </h1>
|
||||
|
||||
<?php
|
||||
|
||||
echo "<ul>\n";
|
||||
foreach ($config['modules'] as $name => $moduleConf) {
|
||||
if ($name == 'modules') { continue; }
|
||||
?>
|
||||
<li>
|
||||
<a href="http://<?= $name . '.' . $config['domain'] ?>"><?= $name ?></a>
|
||||
|
||||
<?php
|
||||
if (isset($moduleConf['alias'])) {
|
||||
echo ' : ';
|
||||
foreach ($moduleConf['alias'] as $alias) {
|
||||
?>
|
||||
<a href="http://<?= $alias . '.' . $config['domain'] ?>"><?= $alias ?></a>,
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
echo "</ul>";
|
Loading…
Reference in a new issue