Add accent color preview and dark mode by default
This commit is contained in:
parent
4adf0ce931
commit
13c5ea6f02
@ -120,12 +120,14 @@ func (m *Module) homepage(rw http.ResponseWriter, req *http.Request, state *util
|
|||||||
|
|
||||||
err = tmp.Execute(rw, struct {
|
err = tmp.Execute(rw, struct {
|
||||||
User *discordgo.User
|
User *discordgo.User
|
||||||
|
UserAccent string
|
||||||
Avatar template.HTMLAttr
|
Avatar template.HTMLAttr
|
||||||
Guilds []*discordgo.UserGuild
|
Guilds []*discordgo.UserGuild
|
||||||
GuildIcons []template.HTMLAttr
|
GuildIcons []template.HTMLAttr
|
||||||
Connections []*discordgo.UserConnection
|
Connections []*discordgo.UserConnection
|
||||||
}{
|
}{
|
||||||
User: myUser,
|
User: myUser,
|
||||||
|
UserAccent: fmt.Sprintf("#%06x", myUser.AccentColor),
|
||||||
Avatar: template.HTMLAttr(fmt.Sprintf("src=\"/discord/user/avatar/%s/%s\"", myUser.ID, myUser.Avatar)),
|
Avatar: template.HTMLAttr(fmt.Sprintf("src=\"/discord/user/avatar/%s/%s\"", myUser.ID, myUser.Avatar)),
|
||||||
Guilds: myGuilds,
|
Guilds: myGuilds,
|
||||||
GuildIcons: guildIcons,
|
GuildIcons: guildIcons,
|
||||||
|
@ -3,6 +3,15 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>Discord | Melon Tools</title>
|
<title>Discord | Melon Tools</title>
|
||||||
<style>
|
<style>
|
||||||
|
html, body {
|
||||||
|
background-color: #2a2c2d;
|
||||||
|
color: #d8d4d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #4699fa;
|
||||||
|
}
|
||||||
|
|
||||||
.page-content {
|
.page-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@ -20,6 +29,12 @@
|
|||||||
padding: 8px;
|
padding: 8px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.colour-block {
|
||||||
|
display: inline-block;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -38,7 +53,7 @@
|
|||||||
<li>Verified: {{.Verified}}</li>
|
<li>Verified: {{.Verified}}</li>
|
||||||
<li>MFA: {{.MFAEnabled}}</li>
|
<li>MFA: {{.MFAEnabled}}</li>
|
||||||
<li>Banner: {{.Banner}}</li>
|
<li>Banner: {{.Banner}}</li>
|
||||||
<li>Accent Color: {{.AccentColor}}</li>
|
<li>Accent Color: {{$.UserAccent}} <span class="colour-block" style="background-color: {{$.UserAccent}}"> </span></li>
|
||||||
<li>Bot: {{.Bot}}</li>
|
<li>Bot: {{.Bot}}</li>
|
||||||
<li>Premium: {{.PremiumType}}</li>
|
<li>Premium: {{.PremiumType}}</li>
|
||||||
<li>System: {{.System}}</li>
|
<li>System: {{.System}}</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user