aboutsummaryrefslogtreecommitdiff
path: root/index.php
blob: 2c28e8ad1e4b55b1f9f6ada106e9baaf5103899a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php $title = null; require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/gui/header.php"; ?>

<div id="hero">
    <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("<a href='/members/read/?m=$fronter[uuid]' class='text-white'>" . $fronter["display_name"] . "</a>");
            } else if ($index + 2 === count($data["members"])) {
                echo("<a href='/members/read/?m=$fronter[uuid]' class='text-white'>" . $fronter["display_name"] . "</a> and ");
            } else {
                echo("<a href='/members/read/?m=$fronter[uuid]' class='text-white'>" . $fronter["display_name"] . "</a>, ");
            }
        }

        ?>
</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-lg-4">
            <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"; ?>