Skip to content

Commit 96cc16f

Browse files
committed
fix(0.0.8): fixed leaderboard link and css
1 parent 1f5e956 commit 96cc16f

File tree

5 files changed

+57
-12
lines changed

5 files changed

+57
-12
lines changed

api/public/styles.css

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ body {
2626
display: flex;
2727
align-items: center;
2828
justify-content: center;
29-
margin-bottom: 20px;
3029
}
3130

3231
.guildInfo img {
@@ -49,10 +48,10 @@ body {
4948

5049
.leaderboard {
5150
display: grid;
52-
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
5351
grid-gap: 20px;
52+
margin-top: 20px;
53+
grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
5454
}
55-
5655
.user {
5756
background-color: #333;
5857
padding: 20px;
@@ -85,4 +84,19 @@ body {
8584
.userXP {
8685
margin: 0;
8786
font-size: large;
87+
}
88+
89+
a:link,
90+
a:visited {
91+
background-color: turquoise;
92+
color: black;
93+
padding: 14px 25px;
94+
text-align: center;
95+
text-decoration: none;
96+
display: inline-block;
97+
}
98+
99+
a:hover,
100+
a:active {
101+
background-color: #31ada0;
88102
}

api/views/index.ejs

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,42 @@
1717
<h1>Chatr - A Discord XP Bot</h1>
1818
</div>
1919
</div>
20-
<div class="box">
21-
<div class="guildInfo">
22-
<h1>
23-
<%=botInfo.total_guilds%> Guilds | <%=botInfo.total_members%> Members
24-
</h1>
20+
<div class="leaderboard">
21+
<div class="user">
22+
<div class="userInfo">
23+
<h1 class="userName">Chatr is in:</h1>
24+
<h1>
25+
<%=botInfo.total_guilds%> Guilds
26+
</h1>
27+
</div>
28+
</div>
29+
<div class="user">
30+
<div class="userInfo">
31+
<h1 class="userName">With a total of:</h1>
32+
<h1>
33+
<%=botInfo.total_members%> Members
34+
</h1>
35+
</div>
36+
</div>
37+
<!-- <div class="user">
38+
<div class="userInfo">
39+
<h1 class="userName">Future metric</h1>
40+
<h1>
41+
when i fix the sql statement for it
42+
</h1>
43+
</div>
44+
</div> -->
45+
</div>
46+
<div class="leaderboard">
47+
<div class="user">
48+
<div class="userInfo">
49+
<a href="/invite">Invite the bot!</a>
50+
</div>
51+
</div>
52+
<div class="user">
53+
<div class="userInfo">
54+
<h1 class="userName">(Search modal soon)</h1>
55+
</div>
2556
</div>
2657
</div>
2758
</main>

bot/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ const commands: Record<string, Command> = {
217217

218218
const button = new ButtonBuilder()
219219
.setLabel('Leaderboard')
220-
.setURL(`https://chatr.imgalvin.me/guild/${interaction.guildId}`)
220+
.setURL(`https://chatr.imgalvin.me/leaderboard/${interaction.guildId}`)
221221
.setStyle(ButtonStyle.Link);
222222

223223
const row = new ActionRowBuilder<ButtonBuilder>()

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "xpbot",
33
"type": "module",
4-
"version": "0.0.7.2",
4+
"version": "0.0.8",
55
"scripts": {
66
"api": "bun api/index.ts",
77
"bot": "bun bot/index.ts"

0 commit comments

Comments
 (0)