add readme support

This commit is contained in:
creations 2025-04-05 09:18:54 -04:00
parent 7b30305ac8
commit 30191a5b1f
Signed by: creations
GPG key ID: 8F553AA4320FC711
6 changed files with 176 additions and 14 deletions

View file

@ -3,6 +3,11 @@
<head data-user-id="<%= user.id %>" data-instance-uri="<%= instance %>">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="<%= username %>'s Presence">
<meta property="og:image" content="https://cdn.discordapp.com/avatars/<%= user.id %>/<%= user.avatar %>">
<meta property="og:description" content="<%= activities[0]?.state || 'Discord Presence' %>">
<title><%= title %></title>
<link rel="stylesheet" href="/public/css/index.css">
@ -99,7 +104,7 @@
<% if (progress !== null) { %>
<div class="progress-bar" data-start="<%= start %>" data-end="<%= end %>">
<div class="progress-fill" style="width: <%= progress %>%"></div>
<div class="progress-fill" <%= progress !== null ? `style="width: ${progress}%"` : '' %>></div>
</div>
<% if (start && end) { %>
@ -114,5 +119,11 @@
<% }) %>
</ul>
<% } %>
<% if (readme) { %>
<h2>Readme</h2>
<section class="readme">
<div class="markdown-body"><%- readme %></div>
</section>
<% } %>
</body>
</html>