aboutsummaryrefslogtreecommitdiff
path: root/projects/index.php
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-04-22 11:48:10 +0200
committerMinteck <contact@minteck.org>2022-04-22 11:48:50 +0200
commit42d9e605fc3f7e0e139a68e9916b3ccdaa721322 (patch)
treedf86ce2164fe499d2290941aaf51f876ecc57181 /projects/index.php
parent958a68292191d8a4c9024ca2f1f658135ab6f704 (diff)
downloadember-42d9e605fc3f7e0e139a68e9916b3ccdaa721322.tar.gz
ember-42d9e605fc3f7e0e139a68e9916b3ccdaa721322.tar.bz2
ember-42d9e605fc3f7e0e139a68e9916b3ccdaa721322.zip
Update
Diffstat (limited to 'projects/index.php')
-rw-r--r--projects/index.php31
1 files changed, 6 insertions, 25 deletions
diff --git a/projects/index.php b/projects/index.php
index e693deb..0b56fe8 100644
--- a/projects/index.php
+++ b/projects/index.php
@@ -1,26 +1,7 @@
-<?php $title = "Projects"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"; global $Parsedown; ?>
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/navigation.php"; ?>
+<?php
-<br>
-<div class="container">
- <h1>Projects</h1>
- <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
+if (isset(array_keys($_GET)[0])) {
+ require_once "view.php";
+} else {
+ require_once "home.php";
+} \ No newline at end of file