aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-04-21 14:37:44 +0200
committerMinteck <contact@minteck.org>2022-04-21 14:37:44 +0200
commit958a68292191d8a4c9024ca2f1f658135ab6f704 (patch)
tree114779ef1b2deb7430e91e30f029e151816d5977 /projects
parent7a7e357dcdd34e4a33a81eadc55548d579938f49 (diff)
downloadember-958a68292191d8a4c9024ca2f1f658135ab6f704.tar.gz
ember-958a68292191d8a4c9024ca2f1f658135ab6f704.tar.bz2
ember-958a68292191d8a4c9024ca2f1f658135ab6f704.zip
WIP projects page
Diffstat (limited to 'projects')
-rw-r--r--projects/index.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/projects/index.php b/projects/index.php
index 9c5010f..e693deb 100644
--- a/projects/index.php
+++ b/projects/index.php
@@ -1,10 +1,26 @@
-<?php $title = "Projects"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"; ?>
+<?php $title = "Projects"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"; global $Parsedown; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/navigation.php"; ?>
<br>
<div class="container">
<h1>Projects</h1>
- Coming soon
+ <br>
+
+ <div class="row">
+ <?php foreach (json_decode(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/includes/fetcher/projects.json"), true) as $project): ?>
+ <div class="col-lg-4">
+ <div class="card stylized-card">
+ <div class="card-body">
+ <img class="stylized-card-icon" <?php if (!isset($project["icon"])): ?>style="background: hsla(<?= hexdec(substr($project['id'], 0, 2)) ?>, 100%, 50%, 0.1) !important;"<?php endif; ?> src="<?= isset($project["icon"]) ? $project["icon"] . "?width=96" : "/assets/img/letters/" . getLetters($project['name']) . ".png" ?>" alt="">
+ <h4 class="card-title"><?= $project["name"] ?></h4>
+ <p class="card-text"><?= preg_replace('/[|.?!;](.*)/m', '', strip_tags($Parsedown->line(trim($project["description"])))) ?></p>
+ <a href="<?= $project["web"] ?>" target="_blank" class="btn btn-outline-light">View Project</a>
+ <div class="small text-muted" style="margin-top:10px;">Updated <?= timeAgo($project['date']) ?></div>
+ </div>
+ </div>
+ </div>
+ <?php endforeach; ?>
+ </div>
</div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?> \ No newline at end of file