Add invite link on home page

This commit is contained in:
Sebastien 2018-12-03 16:36:56 +02:00
parent f216808663
commit b41dc8c8ca
2 changed files with 24 additions and 4 deletions

View File

@ -53,6 +53,8 @@ public class GeneralWebView {
model.addAttribute("isLogged", false); model.addAttribute("isLogged", false);
model.addAttribute("guild_name", ""); model.addAttribute("guild_name", "");
model.addAttribute("isAdmin", false); model.addAttribute("isAdmin", false);
model.addAttribute("inviteLink", "https://discordapp.com/oauth2/authorize?client_id=" + MainBot.jda.getSelfUser().getId() + "&scope=bot&permissions=8");
return CheckPage.getPageIfReady("index"); return CheckPage.getPageIfReady("index");
} }

View File

@ -35,11 +35,23 @@
</header> </header>
<main> <main>
<div class="section no-pad-bot container main" id="index-banner"><div th:if="${isLogged} == false">
<div class="row">
<div class="col offset-l4 l4 m6 offset-m3 s12">
</div>
</div>
<div class="section no-pad-bot container main" id="index-banner"><div th:if="${isLogged} == false">
<div class="row valign-wrapper"> <div class="row valign-wrapper">
<div class="col m6 offset-s3 s6"> <div class="col m6 offset-s2 s8 center">
<img src="/favicon.png" class="responsive-img"/> <img src="/favicon.png" class="responsive-img"/>
<div class="card blue-grey">
<div class="card-content white-text center z-depth-5">
<span class="card-title">Add me to you'r server !</span>
<a class="btn green" th:href="${inviteLink}" target="_blank">Invite me !</a>
</div>
</div>
</div> </div>
<div class="col m6 s12 center flow-text"> <div class="col m6 s12 center flow-text">
<h2>Hello you !</h2> <h2>Hello you !</h2>
@ -68,13 +80,19 @@
</div> </div>
<div th:if="${noMutualGuilds} == false"> <div th:if="${noMutualGuilds} == false">
<div class="row"> <div class="row">
<div class="col m6 offset-s3 s6 center"> <div class="col m6 offset-s2 s8 center">
<img src="/favicon.png" class="responsive-img"/> <img src="/favicon.png" class="responsive-img"/>
<h2 class="flow-text">Home Page Comming soon!</h2> <h2 class="flow-text">Home Page Comming soon!</h2>
<div class="card blue-grey">
<div class="card-content white-text center z-depth-4">
<span class="card-title">Add me to you'r server !</span>
<a class="btn green waves-effect" th:href="${inviteLink}" target="_blank">Invite me !</a>
</div>
</div>
</div> </div>
<div class="col m6 s12"> <div class="col m6 s12">
<div id="feed" style="height: 80vh"></div> <div class="z-depth-2" id="feed" style="height: 80vh"></div>
</div> </div>
</div> </div>