aboutsummaryrefslogtreecommitdiff
path: root/views/plurality.ejs
blob: 412906eab7282d2a8f4d88d1c9f57a6bfcca19b7 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!--
  ~ MIT License
  ~
  ~ Copyright (c) 2022- Equestria.dev Developers
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in all
  ~ copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~ SOFTWARE.
  ~
  -->
<%- include("./partials/header.ejs", {title: "Plurality"}) %>
<%

// noinspection JSUnresolvedVariable
let cloudburst = pluralCache["ynmuc"];

// noinspection JSUnresolvedVariable
let raindrops  = pluralCache["gdapd"];

let frontersCloudburst = cloudburst['fronters']['members'].map((i) => { return i['id']; });
let frontersRaindrops = raindrops['fronters']['members'].map((i) => { return i['id']; });

%>

<div id="navbar-skipper">
    <div class="container">
        <br>
        <h2 style="text-align: center;">We are plural.</h2>

        <div id="systems">
            <div>
                <img id="system-cloudburst-icon" class="system-icon" alt="" src="<%= cloudburst["general"]["avatar_url"] %>">
                <h3 id="system-cloudburst-name" class="system-name">Cloudburst System</h3>
                <p id="system-cloudburst-description" class="system-description">Plural system of <%= cloudburst["members"].length - 1 %> ponies!</p>

                <% for (let member of cloudburst["members"]) { if (member.name !== "unknown") { %>
                <a href="https://ponies.equestria.horse/Cloudburst:<%= member['display_name'] ?? member['name'] %>" target="_blank" class="plural-member" id="plural-member-<%= member['id'] %>">
                    <img src="<%= member['avatar_url'] ?? cloudburst['general']['avatar_url'] %>" alt="" class="plural-member-picture" id="plural-member-<%= member['id'] %>-picture">
                    <span class="plural-member-name" id="plural-member-<%= member['id'] %>-name"><%= member['display_name'] ?? member['name'] %><% if (member['name'] === "twilight") { %>&nbsp;<span class="badge rounded-pill bg-success">Host</span><% } %><% if (frontersCloudburst.includes(member['id'])) { %>&nbsp;<span class="badge rounded-pill bg-primary">Front</span><% } %></span>
                    <span class="plural-member-prefix" id="plural-member-<%= member['id'] %>-prefix"><%= member['proxy_tags'][0]['prefix'] ?? "{...}" %></span>
                </a>
                <% }} %>
            </div>
            <div>
                <img id="system-raindrops-icon" class="system-icon" alt="" src="<%= raindrops["general"]["avatar_url"] %>">
                <h3 id="system-raindrops-name" class="system-name">Raindrops System</h3>
                <p id="system-raindrops-description" class="system-description">Plural system of <%= raindrops["members"].length - 1 %> ponies!</p>

                <% for (let member of raindrops["members"]) { if (member.name !== "unknown") { %>
                    <a href="https://ponies.equestria.horse/Raindrops:<%= member['display_name'] ?? member['name'] %>" target="_blank" class="plural-member" id="plural-member-<%= member['id'] %>">
                        <img src="<%= member['avatar_url'] ?? raindrops['general']['avatar_url'] %>" alt="" class="plural-member-picture" id="plural-member-<%= member['id'] %>-picture">
                        <span class="plural-member-name" id="plural-member-<%= member['id'] %>-name"><%= member['display_name'] ?? member['name'] %><% if (member['name'] === "scootaloo") { %>&nbsp;<span class="badge rounded-pill bg-success">Host</span><% } %><% if (frontersRaindrops.includes(member['id'])) { %>&nbsp;<span class="badge rounded-pill bg-primary">Front</span><% } %></span>
                        <span class="plural-member-prefix" id="plural-member-<%= member['id'] %>-prefix"><%= member['proxy_tags'][0]['prefix'] ?? "{...}" %></span>
                    </a>
                <% }} %>
            </div>
        </div>
    </div>
    <hr>
    <pre><%= JSON.stringify(pluralCache, null, 4) %></pre>
</div>

<%- include("./partials/footer.ejs") %>