aboutsummaryrefslogtreecommitdiff
path: root/includes/projects
diff options
context:
space:
mode:
Diffstat (limited to 'includes/projects')
-rw-r--r--includes/projects/home.php6
-rw-r--r--includes/projects/list.php13
2 files changed, 16 insertions, 3 deletions
diff --git a/includes/projects/home.php b/includes/projects/home.php
index 34fb3e1..743adc1 100644
--- a/includes/projects/home.php
+++ b/includes/projects/home.php
@@ -1,5 +1,5 @@
<div class="list-group">
- <a href="/creations/dev/kartik" class="list-group-item list-group-item-action">Kartik <span class="badge bg-secondary rounded-pill">Development</span></a>
- <a href="/creations/dev/neutron" class="list-group-item list-group-item-action">Neutron <span class="badge bg-secondary rounded-pill">Development</span></a>
- <a href="/creations/video/gyrate-with-obliqueness" class="list-group-item list-group-item-action">Gyrate with Obliqueness <span class="badge bg-secondary rounded-pill">Multimedia</span></a>
+ <a href="/creations/kartik" class="list-group-item list-group-item-action"><img src="<?= trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/creations/dev/kartik/icon.txt")) ?>" alt="" width="24px"> Kartik <span class="badge bg-secondary rounded-pill">Development</span></a>
+ <a href="/creations/neutron" class="list-group-item list-group-item-action"><img src="<?= trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/creations/dev/neutron/icon.txt")) ?>" alt="" width="24px"> Neutron <span class="badge bg-secondary rounded-pill">Development</span></a>
+ <a href="/creations/gyrate-with-obliqueness" class="list-group-item list-group-item-action"><img src="/static/genericProjectIcon.png" alt="" width="24px"> Gyrate with Obliqueness <span class="badge bg-secondary rounded-pill">Multimedia</span></a>
</div> \ No newline at end of file
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="">&nbsp;<?= 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