mirror of
https://gitlab.com/niansa/discordlistforbots.git
synced 2025-03-06 20:49:22 +01:00
39 lines
1.3 KiB
Text
39 lines
1.3 KiB
Text
<%inc#include "controllers/views.h"
|
|
#include "config.h" %>
|
|
<%c++ auto modView = @@.get<bool>("modView");%>
|
|
<%c++ auto justMine = @@.get<bool>("justMine");%>
|
|
<%layout global_layout%>
|
|
|
|
<title>{%SHORT_NAME%}</title>
|
|
|
|
<div class="container text-center">
|
|
<img style="width:15%;height:15%;" src="/logo.png">
|
|
<p class="title">{%LONG_NAME%}</p>
|
|
<p>{%DESCRIPTION%}</p>
|
|
<%c++ if (@@.get<bool>("authed")) {%>
|
|
<%c++ if (justMine or modView) {%>
|
|
<a class="special-button" href="@all">All bots</a>
|
|
<%c++ } else {%>
|
|
<a class="special-button" href="@me">My bots</a>
|
|
<%c++ }%>
|
|
<a class="special-button" href="register">Register bot</a>
|
|
<%c++ }%>
|
|
<hr>
|
|
<br>
|
|
<%c++ for (const auto& [bot_id, bot] : @@.get<std::map<uint64_t, Bot>>("bots")) {%>
|
|
<a class="special-button tile" href="{%bot_id%}/detail" style="background-color:{%(bot.approved?"#222222":"red")%};color:white;">
|
|
<img src="{%bot.avatar_url%}" style="width:128px;height:128px;">
|
|
<center>
|
|
<div class="votesbox">
|
|
<p class="votestext">Votes: <b>{%bot.votes%}</b></p>
|
|
</div>
|
|
</center>
|
|
<p style="line-height:0px;font-size:20px;">{%bot.name%}</p>
|
|
<p>{%bot.short_description%}</p>
|
|
<%c++ if (not bot.approved) {%>
|
|
<i>Not yet approved</i>
|
|
<%c++ }%>
|
|
</a>
|
|
<hr class="tilespacer">
|
|
<%c++ }%>
|
|
</div>
|