logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/
commit: fffda79ee299727044fffa878c2967503021d89d
parent 843a1d08593c64a1ee83a27c96685b6c345ddeac
Author: Lain Soykaf <lain@lain.com>
Date:   Tue, 25 Feb 2025 00:13:19 +0400

Index, Main: Use smaller images, preload relevant files.

Diffstat:

Mindex.html7++++++-
Msrc/main.js2+-
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/index.html b/index.html @@ -3,6 +3,11 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no"> + <link rel="preload" href="/static/config.json" as="fetch" crossorigin /> + <link rel="preload" href="/api/pleroma/frontend_configurations" as="fetch" crossorigin /> + <link rel="preload" href="/nodeinfo/2.1.json" as="fetch" crossorigin /> + <link rel="preload" href="/api/v1/instance" as="fetch" crossorigin /> + <link rel="preload" href="/static/pleromatan_apology_fox_small.webp" as="image" /> <!-- putting styles here to avoid having to wait for styles to load up --> <style id="splashscreen"> #splash { @@ -148,7 +153,7 @@ <div class="chunk" id="chunk-E"> </div> </div> - <img id="mascot" src="/static/pleromatan_apology.png"> + <img id="mascot" src="/static/pleromatan_apology_small.webp"> </div> <div id="status" class="css-ok"> <!-- (。>﹏<) --> diff --git a/src/main.js b/src/main.js @@ -85,7 +85,7 @@ const persistedStateOptions = { console.error('Storage error', e) storageError = e } - document.querySelector('#mascot').src = `/static/pleromatan_apology${isFox}.png` + document.querySelector('#mascot').src = `/static/pleromatan_apology${isFox}_small.webp` document.querySelector('#status').removeAttribute('class') document.querySelector('#status').textContent = i18n.global.t('splash.loading') document.querySelector('#splash-credit').textContent = i18n.global.t('update.art_by', { linkToArtist: 'pipivovott' })