diff options
author | Minteck <contact@minteck.org> | 2022-05-07 15:14:00 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-05-07 15:14:00 +0200 |
commit | a31deb0c7e22167d9721dc9b889406119d723127 (patch) | |
tree | 81f911a1c8a65beac4d905ae02c57cbc79d51e79 /projects/home.php | |
parent | 66225fedd25567a2fe06da392b29171774842264 (diff) | |
download | ember-a31deb0c7e22167d9721dc9b889406119d723127.tar.gz ember-a31deb0c7e22167d9721dc9b889406119d723127.tar.bz2 ember-a31deb0c7e22167d9721dc9b889406119d723127.zip |
Add flagship projects
Diffstat (limited to 'projects/home.php')
-rw-r--r-- | projects/home.php | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/projects/home.php b/projects/home.php index 6ef808d..2b78456 100644 --- a/projects/home.php +++ b/projects/home.php @@ -7,7 +7,7 @@ <br> <div class="row"> - <?php foreach (json_decode(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/includes/fetcher/projects.json"), true) as $project): if (!$project['archive']): ?> + <?php foreach (json_decode(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/includes/fetcher/projects.json"), true) as $project): if (!$project['archive'] && $project['flagship']): ?> <div class="col-lg-4"> <div class="card stylized-card"> <div class="card-body"> @@ -22,18 +22,34 @@ <?php endif; endforeach; ?> </div> - <details> - <summary>View deprecated projects</summary> - <br> - <div class="list-group"> - <?php foreach (json_decode(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/includes/fetcher/projects.json"), true) as $project): if ($project['archive']): ?> - <a href="?<?= $project["id"] ?>" class="list-stylized list-group-item list-group-item-action"> - <img <?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" ?>" class="memberview-icon archive-icon"> - <?= $project["name"] ?><span style="opacity:.5;"> · Updated <?= timeAgo($project['date']) ?></span> - </a> - <?php endif; endforeach; ?> - </div> - </details> + <hr> + + <div class="row"> + <?php foreach (json_decode(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/includes/fetcher/projects.json"), true) as $project): if (!$project['archive'] && !$project['flagship']): ?> + <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["id"] ?>" 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 endif; endforeach; ?> + </div> + + <hr> + + <div class="list-group"> + <?php foreach (json_decode(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/includes/fetcher/projects.json"), true) as $project): if ($project['archive']): ?> + <a href="?<?= $project["id"] ?>" class="list-stylized list-group-item list-group-item-action"> + <img <?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" ?>" class="memberview-icon archive-icon"> + <?= $project["name"] ?><span style="opacity:.5;"> · Updated <?= timeAgo($project['date']) ?></span> + </a> + <?php endif; endforeach; ?> + </div> </div> <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?>
\ No newline at end of file |