Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load HTML5 splashscreen dynamically from HTML file in metadata #160

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kfischer-okarin
Copy link
Contributor

Here's a little experiment - specifying your HTML 5 splash screen via a little HTML file you put at metadata/html5-splashscreen.html

Comment on lines -559 to -572
img.onload = function() { // once we know its size, scale it, keeping aspect ratio.
var pct = 30;
var w = img.naturalWidth;
var h = img.naturalHeight;
if (!w || !h || (w == h)) {
img.style.width = '' + pct + '%';
img.style.height = '' + pct + '%';
} else if (w > h) {
img.style.width = '' + pct + '%';
} else {
img.style.height = '' + pct + '%';
}
img.style.display = 'block';
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not sanely reproduce this Javascript that dynamically sets the icon CSS depending on its actual width/height.

But I replaced it with static styles (fixed max-height max-height of 30%) that should hopefully have the same effects.....

I can try and take some comparison screenshots later with some extremely proportioned icons

@kfischer-okarin kfischer-okarin changed the title Load splashscreen from HTML file in metadata Load HTML5 splashscreen from HTML file in metadata Dec 12, 2024
@kfischer-okarin kfischer-okarin changed the title Load HTML5 splashscreen from HTML file in metadata Load HTML5 splashscreen dynamically from HTML file in metadata Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant