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

Border spinner while loading #5044

Open
ekdahl opened this issue Oct 16, 2024 · 2 comments
Open

Border spinner while loading #5044

ekdahl opened this issue Oct 16, 2024 · 2 comments

Comments

@ekdahl
Copy link
Contributor

ekdahl commented Oct 16, 2024

Would it be possible to replace the GIF loading symbol from the supplied themes with a border spinner instead?

Bootstrap has a rotating border spinner included which use currentColor as border.
https://getbootstrap.com/docs/5.3/components/spinners/
This would enable easy styling for different color schemes.

I did a small try myself but failed, as the whole content started spinning :).
Maybe it's more work than what is worth, just wanted to raise the idea.

@fisharebest
Copy link
Owner

The spinner is created using the following CSS:

.wt-ajax-load:empty {
    height: 32px;
    width: 32px;
    background: url(images/loading-32x32.gif) no-repeat;
}

Google provides several examples of using CSS to create spinners. I would have thought it was pretty straightforward.

@ekdahl
Copy link
Contributor Author

ekdahl commented Dec 3, 2024

Sure, I understand that. I don't think I was clear enough with what I meant.
What I was after was to replace the spinner with an inline SVG (or the bootstrap alternative), which gives the advantage that the same image can be used for different palettes (light and dark). Because with inline SVG CSS variables for colors can be used to style the image. This is not possible with external images, and then different images has to be used for each palette.
I'm not sure how to accomplish this in webtrees, so that everywhere, where the class wt-ajax-load is used an inline SVG should be used, when loading.
Found a good source of SVG spinners here: https://github.com/n3r4zzurr0/svg-spinners

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

No branches or pull requests

2 participants