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 {
|
||||
User *discordgo.User
|
||||
UserAccent string
|
||||
Avatar template.HTMLAttr
|
||||
Guilds []*discordgo.UserGuild
|
||||
GuildIcons []template.HTMLAttr
|
||||
Connections []*discordgo.UserConnection
|
||||
}{
|
||||
User: myUser,
|
||||
UserAccent: fmt.Sprintf("#%06x", myUser.AccentColor),
|
||||
Avatar: template.HTMLAttr(fmt.Sprintf("src=\"/discord/user/avatar/%s/%s\"", myUser.ID, myUser.Avatar)),
|
||||
Guilds: myGuilds,
|
||||
GuildIcons: guildIcons,
|
||||
|
@ -3,6 +3,15 @@
|
||||
<head>
|
||||
<title>Discord | Melon Tools</title>
|
||||
<style>
|
||||
html, body {
|
||||
background-color: #2a2c2d;
|
||||
color: #d8d4d0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #4699fa;
|
||||
}
|
||||
|
||||
.page-content {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@ -20,6 +29,12 @@
|
||||
padding: 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.colour-block {
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -38,7 +53,7 @@
|
||||
<li>Verified: {{.Verified}}</li>
|
||||
<li>MFA: {{.MFAEnabled}}</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>Premium: {{.PremiumType}}</li>
|
||||
<li>System: {{.System}}</li>
|
||||
|
Loading…
Reference in New Issue
Block a user