1
0
Fork 0
mirror of https://gitlab.com/niansa/discordlistforbots.git synced 2025-03-06 20:49:22 +01:00
discordlistforbots/views/menu.csp
2021-01-13 10:34:31 +01:00

45 lines
1.4 KiB
Text

<%inc#include "controllers/views.h"
#include "config.h" %>
<%c++ auto ref = @@.get<std::string>("ref");%>
<%c++ auto sessionData = @@.get<SessionDataPtr>("sessionData");%>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/global.css">
<style>
#items>.special-button{width:100%;margin:unset;border-radius:0;padding:9px 0px;}
</style>
</head>
<body>
<div style="text-align:right;">
<noscript>
<a href="{%ref%}" class="special-button">&rarr;</a>
</noscript>
<div id="jsBack" style="display:none;">
<a href="#" onclick="window.history.back();" class="special-button">&rarr;</a>
</div>
<script>
document.getElementById('jsBack').style.display = 'block';
</script>
<br>
</div>
<div id="items">
<p style="text-align:center;">{%std::string(sessionData?sessionData->discord_username:"Anonymous")%}</p>
<a class="special-button" href="/">Start</a><br>
<%c++ if (sessionData) {%>
<a class="special-button" href="/bots/@me">My bots</a><br>
<a class="special-button" href="/bots/register">Register bot</a><br>
<a class="special-button" href="/discorddeauth">Logout</a><br>
<%c++ } else {%>
<a class="special-button" href="/discordauth">Login</a><br>
<%c++ }%>
<br>
<a class="special-button" href="{%COMMUNITY%}" style="background-color:#7289da;">Join our Discord</a>
</div>
</body>
</html>