Replace remaining Gitea logo and default-avatar assets with the Hop logo
Hop-State: A_06FN4T8GD6B0X5FF50Y7RH0 Hop-Proposal: R_06FN4T78S8RKXYERD0H7FC0 Hop-Task: T_06FN4ST5GWBMGMCKM41S470 Hop-Attempt: AT_06FN4ST5GYS235FJA8XDP30
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
@@ -140,9 +140,18 @@
|
||||
sidebar.prepend(list);
|
||||
}
|
||||
|
||||
function replaceBrandImages() {
|
||||
const upstreamBrandAsset = /\/img\/(?:avatar_default\.png|logo\.png|logo\.svg)(?:\?.*)?$/;
|
||||
for (const image of document.querySelectorAll('img[src]')) {
|
||||
if (!upstreamBrandAsset.test(image.src)) continue;
|
||||
image.src = image.src.replace(upstreamBrandAsset, '/img/hop.svg?v=3');
|
||||
}
|
||||
}
|
||||
|
||||
function applyHopSemantics() {
|
||||
const brandLogo = document.querySelector('#navbar-logo img');
|
||||
if (brandLogo) brandLogo.src = brandLogo.src.replace(/\/img\/(?:logo|hop)\.svg(?:\?.*)?$/, '/img/hop.svg?v=2');
|
||||
if (brandLogo) brandLogo.src = brandLogo.src.replace(/\/img\/(?:logo|hop)\.svg(?:\?.*)?$/, '/img/hop.svg?v=3');
|
||||
replaceBrandImages();
|
||||
for (const root of document.querySelectorAll(semanticRoots)) replaceExactText(root);
|
||||
replaceAccessibleLabels(document);
|
||||
addWorkflowSummary();
|
||||
|
||||
Reference in New Issue
Block a user