Migrate imgb64 to jimp (#163)

This commit is contained in:
Simon Lecoq
2021-03-02 01:42:04 +01:00
committed by GitHub
parent 4bbc59d3af
commit 46ef6a1532
15 changed files with 318 additions and 30 deletions

View File

@@ -48,7 +48,7 @@
</h2>
<% for (const {name, type, description, release, status, genres, scores, progress, released, artwork} of plugins.anilist.lists[media][list]) { %>
<div class="media">
<img src="data:image/png;base64,<%= artwork %>" width="48" height="72" alt=""/>
<img src="<%= artwork %>" width="48" height="72" alt=""/>
<div class="about">
<div class="name">
<%= name %>
@@ -116,7 +116,7 @@
</h2>
<div class="characters">
<% for (const {name, artwork} of plugins.anilist.characters) { %>
<img src="data:image/png;base64,<%= artwork %>" width="36" height="54" alt=""/>
<img src="<%= artwork %>" width="36" height="54" alt=""/>
<% } %>
</div>
</div>

View File

@@ -2,7 +2,7 @@
<% if (account === "user") { %>
<section>
<h1 class="field">
<img class="avatar" src="data:image/png;base64,<%= computed.avatar %>" width="20" height="20" />
<img class="avatar" src="<%= computed.avatar %>" width="20" height="20" />
<span><%= user.name || user.login %></span>
</h1>
<div class="row">
@@ -47,7 +47,7 @@
<% } else if (account === "organization") { %>
<section>
<h1 class="field">
<img class="avatar organization" src="data:image/png;base64,<%= computed.avatar %>" width="20" height="20" />
<img class="avatar organization" src="<%= computed.avatar %>" width="20" height="20" />
<span><%= user.name || user.login %></span>
</h1>
<div class="row">

View File

@@ -22,7 +22,7 @@
<div class="tracklist">
<% for (const {name = "", artist = "", artwork = "", played_at = ""} of plugins.music.tracks) { %>
<div class="track">
<img src="data:image/png;base64,<%= artwork %>" width="<%= plugins.music.played_at ? 48 : 32 %>" height="<%= plugins.music.played_at ? 48 : 32 %>" alt=""/>
<img src="<%= artwork %>" width="<%= plugins.music.played_at ? 48 : 32 %>" height="<%= plugins.music.played_at ? 48 : 32 %>" alt=""/>
<div class="infos">
<div class="name"><%= name %></div>
<div class="artist"><%= artist %></div>

View File

@@ -33,7 +33,7 @@
<%= plugins.people.error.message %>
</div>
<% } else { %>
<% for (const user of plugins.people[type]) { %><img class="avatar" src="data:image/png;base64,<%= user.avatar %>" width="<%= plugins.people.size %>" height="<%= plugins.people.size %>" alt="" /><% } %>
<% for (const user of plugins.people[type]) { %><img class="avatar" src="<%= user.avatar %>" width="<%= plugins.people.size %>" height="<%= plugins.people.size %>" alt="" /><% } %>
<% } %>
</section>
</div>

View File

@@ -22,7 +22,7 @@
<% } else if (plugins.topics.mode === "mastered") { %>
<% for (const {name, icon} of plugins.topics.list) { %>
<% if (icon) { %>
<img src="data:image/png;base64,<%= icon %>" width="24" height="24" alt="<%= name %>" title="<%= name %>"/>
<img src="<%= icon %>" width="24" height="24" alt="<%= name %>" title="<%= name %>"/>
<% } %>
<% } %>
<% } %>