diff options
-rw-r--r-- | api/pluralkit/fronters/index.php | 2 | ||||
-rw-r--r-- | assets/css/main.css | 11 | ||||
-rw-r--r-- | data/projects.json | 4 | ||||
-rw-r--r-- | index.php | 33 | ||||
-rw-r--r-- | projects/index.php | 24 |
5 files changed, 71 insertions, 3 deletions
diff --git a/api/pluralkit/fronters/index.php b/api/pluralkit/fronters/index.php index ae4b196..4dcb08f 100644 --- a/api/pluralkit/fronters/index.php +++ b/api/pluralkit/fronters/index.php @@ -2,4 +2,4 @@ $config = json_decode(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/data/pluralkit.json"), true); header("Content-Type: application/json"); -die(file_get_contents("https://api.pluralkit.me/v2/systems/$config[system]/list"));
\ No newline at end of file +die(file_get_contents("https://api.pluralkit.me/v2/systems/$config[system]/fronters"));
\ No newline at end of file diff --git a/assets/css/main.css b/assets/css/main.css index 1cff20a..c9df151 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -20,4 +20,15 @@ nav.navbar { #hero-img { width: 256px; max-width: 100vw; +} + +.stylized-card { + background: rgba(0, 0, 0, .5) !important; + text-align: center; +} + +.stylized-card-icon { + width: 64px; + height: 64px; + margin-bottom: 5px; }
\ No newline at end of file diff --git a/data/projects.json b/data/projects.json index 507a3be..bf9b365 100644 --- a/data/projects.json +++ b/data/projects.json @@ -11,13 +11,13 @@ "description": "A fake PIM app created for this template", "icon": "https:\/\/sattelite.cdn.minteck.org\/logo.svg", "source": "https:\/\/gitlab.minteck.org\/minteck\/cloudsdale", - "showcase": false + "showcase": true }, { "name": "Random Projecto", "description": "Random Project, yay!", "icon": "about:blank", "source": "https:\/\/gitlab.minteck.org\/minteck\/kartik-client", - "showcase": false + "showcase": true } ]
\ No newline at end of file @@ -4,6 +4,39 @@ <img src="/assets/img/icon.png" id="hero-img" alt=""> <h1>Cloudburst System</h1> <h4>Lorem ipsum dolor sit amet</h4> + <b>Current Fronter·s:</b> <?php + + $config = json_decode(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/data/pluralkit.json"), true); + $data = json_decode(file_get_contents("https://api.pluralkit.me/v2/systems/$config[system]/fronters"), true); + foreach ($data["members"] as $index => $fronter) { + if ($index + 1 === count($data["members"])) { + echo($fronter["display_name"]); + } else if ($index + 2 === count($data["members"])) { + echo($fronter["display_name"] . " and "); + } else { + echo($fronter["display_name"] . ", "); + } + } + + ?> +</div> +<br> + +<div class="container"> + <div class="row"> + <?php foreach (json_decode(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/data/projects.json"), true) as $project): if ($project["showcase"]): ?> + <div class="col"> + <div class="card stylized-card"> + <div class="card-body"> + <img class="stylized-card-icon" src="<?= $project["icon"] ?>" alt=""> + <h4 class="card-title"><?= $project["name"] ?></h4> + <p class="card-text"><?= $project["description"] ?></p> + <a href="<?= $project["source"] ?>" target="_blank" class="btn btn-outline-light">View Project</a> + </div> + </div> + </div> + <?php endif; endforeach; ?> + </div> </div> <?php require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/gui/footer.php"; ?>
\ No newline at end of file diff --git a/projects/index.php b/projects/index.php new file mode 100644 index 0000000..4521314 --- /dev/null +++ b/projects/index.php @@ -0,0 +1,24 @@ +<?php $title = "Projects"; require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/gui/header.php"; ?> + +<div class="container"> + <br> + <h1>Projects</h1> + <br> + + <div class="row"> + <?php foreach (json_decode(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/data/projects.json"), true) as $project): ?> + <div class="col"> + <div class="card stylized-card"> + <div class="card-body"> + <img class="stylized-card-icon" src="<?= $project["icon"] ?>" alt=""> + <h4 class="card-title"><?= $project["name"] ?></h4> + <p class="card-text"><?= $project["description"] ?></p> + <a href="<?= $project["source"] ?>" target="_blank" class="btn btn-outline-light">View Project</a> + </div> + </div> + </div> + <?php endforeach; ?> + </div> +</div> + +<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/gui/footer.php"; ?>
\ No newline at end of file |