mirror of
https://gitlab.com/niansa/discordlistforbots.git
synced 2025-03-06 20:49:22 +01:00
47 lines
1.9 KiB
Text
47 lines
1.9 KiB
Text
<%inc#include "controllers/views.h" %>
|
|
<%c++ auto viewHidden = @@.get<bool>("viewHidden");%>
|
|
<%c++ auto justMine = @@.get<bool>("justMine");%>
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="/global.css">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>DFB</title>
|
|
</head>
|
|
<body>
|
|
<div class="container text-center">
|
|
<img style="width:15%;height:15%;" src="/logo.png">
|
|
<p class="title">Discordlist for Bots</p>
|
|
<p>Find a lot of bots that will be useful to your server</p>
|
|
<%c++ if (@@.get<bool>("authed")) {%>
|
|
<%c++ if (justMine) {%>
|
|
<a class="linkButton" href="@all">All bots</a>
|
|
<%c++ } else {%>
|
|
<a class="linkButton" href="@me">My bots</a>
|
|
<%c++ }%>
|
|
<a class="linkButton" href="/discorddeauth">Logout</a>
|
|
<%c++ } else {%>
|
|
<a class="linkButton" href="/discordauth">Login</a>
|
|
<%c++ }%>
|
|
<hr>
|
|
<br>
|
|
<%c++ for (const auto& [bot_id, bot] : @@.get<std::map<uint64_t, Bot>>("bots")) {%>
|
|
<%c++ if (bot.approved == viewHidden) continue;%>
|
|
<a class="linkButton" href="{%bot_id%}/detail">
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<img src="{%bot.avatar_url%}" style="width:128px;height:128px;">
|
|
</td>
|
|
<td style="padding:10px;">
|
|
<h1 style="line-height:0px;">{%bot.name%}</h1>
|
|
<p>{%bot.short_description%}</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</a>
|
|
<%c++ }%>
|
|
</div>
|
|
</body>
|
|
</html>
|