diff options
Diffstat (limited to 'includes/projects/list.php')
-rw-r--r-- | includes/projects/list.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/projects/list.php b/includes/projects/list.php new file mode 100644 index 0000000..00c27d0 --- /dev/null +++ b/includes/projects/list.php @@ -0,0 +1,13 @@ +<div class="list-group"> + <?php + + $articles = scandir($_SERVER['DOCUMENT_ROOT'] . "/creations"); + $i = 1; + foreach ($articles as $article): + + ?> + <?php if (trim($article) !== "." && trim($article) !== ".." && trim($article) !== "dev" && trim($article) !== "video" && is_dir($_SERVER['DOCUMENT_ROOT'] . "/creations/" . $article)): ?> + <a href="/creations/<?= $article ?>" class="list-group-item list-group-item-action"><img src="<?= trim(file_exists($_SERVER['DOCUMENT_ROOT'] . "/creations/" . $article . "/icon.txt") ? file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/creations/" . $article . "/icon.txt") : "/static/genericProjectIcon.png") ?>" width="24px" alt=""> <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/creations/" . $article . "/title.txt") ?><span class="text-muted"> ยท <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/creations/" . $article . "/description.txt") ?></span></a> + <?php endif;$i++; ?> + <?php endforeach; ?> +</div>
\ No newline at end of file |