add badges and fix clan tags, and readme issue
All checks were successful
Code quality checks / biome (push) Successful in 11s
All checks were successful
Code quality checks / biome (push) Successful in 11s
This commit is contained in:
parent
7816210a2c
commit
bf66b301ae
9 changed files with 129 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
import { getImageColors } from "@/helpers/colors";
|
||||
import { lanyardConfig } from "@config/environment";
|
||||
import { badgeApi, lanyardConfig } from "@config/environment";
|
||||
import { renderEjsTemplate } from "@helpers/ejs";
|
||||
import { getLanyardData, handleReadMe } from "@helpers/lanyard";
|
||||
|
||||
|
@ -64,6 +64,7 @@ async function handler(request: ExtendedRequest): Promise<Response> {
|
|||
allowSnow: presence.kv.snow === "true",
|
||||
allowRain: presence.kv.rain === "true",
|
||||
colors: colors?.colors ?? {},
|
||||
badgeApi: badgeApi,
|
||||
};
|
||||
|
||||
return await renderEjsTemplate("index", ejsTemplateData);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getImageColors } from "@/helpers/colors";
|
||||
import { lanyardConfig } from "@config/environment";
|
||||
import { badgeApi, lanyardConfig } from "@config/environment";
|
||||
import { renderEjsTemplate } from "@helpers/ejs";
|
||||
import { getLanyardData, handleReadMe } from "@helpers/lanyard";
|
||||
|
||||
|
@ -63,6 +63,7 @@ async function handler(): Promise<Response> {
|
|||
allowSnow: presence.kv.snow === "true",
|
||||
allowRain: presence.kv.rain === "true",
|
||||
colors: colors?.colors ?? {},
|
||||
badgeApi: badgeApi,
|
||||
};
|
||||
|
||||
return await renderEjsTemplate("index", ejsTemplateData);
|
||||
|
|
|
@ -236,7 +236,6 @@ class ServerHandler {
|
|||
"unknown";
|
||||
}
|
||||
|
||||
|
||||
logger.custom(
|
||||
`[${request.method}]`,
|
||||
`(${response.status})`,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head data-user-id="<%= user.id %>" data-instance-uri="<%= instance %>">
|
||||
<head data-user-id="<%= user.id %>" data-instance-uri="<%= instance %>" data-badge-url="<%= badgeApi %>">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
<div class="user-info">
|
||||
<div class="user-info-inner">
|
||||
<h1><%= username %></h1>
|
||||
<% if (user.clan) { %>
|
||||
<% if (user.clan && user.clan.tag) { %>
|
||||
<div class="clan-badge">
|
||||
<img src="https://cdn.discordapp.com/clan-badges/<%= user.clan.identity_guild_id %>/<%= user.clan.badge %>" alt="Clan Badge" class="clan-badge">
|
||||
<span class="clan-name"><%= user.clan.tag %></span>
|
||||
|
@ -79,6 +79,9 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<% if(badgeApi) { %>
|
||||
<div id="badges" class="badges"></div>
|
||||
<% } %>
|
||||
<%
|
||||
let filtered = activities
|
||||
.filter(a => a.type !== 4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue