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

Default background image and selector and slideshow for default background images #788

Closed
wants to merge 25 commits into from

Conversation

Unihedro
Copy link
Contributor

fixes #774

@Unihedro Unihedro changed the title Default background image and selector and slideshow for default background images, fixes #774 Default background image and selector and slideshow for default background images Aug 16, 2015
"http:https://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-146575.jpg"
];
$defaultBg.prepend(defaultBgs.map(function(v) {
return '<a style="background-image:url(' + v + ')" img="' + v + '"></a>';
Copy link
Contributor

Choose a reason for hiding this comment

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

img attribute is not valid on a-tags which makes this invalid html, use data-img instead
http:https://api.jquery.com/data/
http:https://ejohn.org/blog/html-5-data-attributes/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, thanks for the hint!

@ornicar
Copy link
Collaborator

ornicar commented Aug 19, 2015

Is this branch compiling?

Also I remember why there's bgImg on server side, now.

It's the only way to serve the page with the background image set directly in the HTML (https://github.com/Unihedro/lila/blob/default-bg/app/views/base/layout.scala.html#L41-L43).
Without it, the image must be set by the JS, and there would probably be a FOUC.

@Unihedro
Copy link
Contributor Author

I also can't tell if it compiles since I had to go just when I was going to test compiling, but f7e1613 was pretty dubious.

You're right about the FOUC - since the background image is set on the first time the theme picker is loaded (the same time the selector initializes), the background isn't effectively loaded until everything else is, at least. Still, it's disappointing if we'd had to store every picture the user has, it makes me wonder if there's a solution to the design requirement at all.

@ornicar
Copy link
Collaborator

ornicar commented Aug 19, 2015

it should be possible to keep using bgImg to solve the FOUC issue, while keeping all the rest client side.

@Unihedro
Copy link
Contributor Author

Right, I'll revert f7e1613 and give that a try.

This reverts commit f7e1613.
It is recommended that you add an explanation for reverting commits,
as the default commit revert message is not helpful.
@Unihedro
Copy link
Contributor Author

Unihedro commented Sep 4, 2015

Turns out I forgot to commit the rest of the common.css changes.

@Unihedro
Copy link
Contributor Author

Unihedro commented Sep 5, 2015

Done. Compiles fine and works mostly. Let me know if there's any room for improvements!

@ornicar
Copy link
Collaborator

ornicar commented Sep 10, 2015

what's the status on this? zoom slider still looks broken on my machine

@Unihedro
Copy link
Contributor Author

Oh, I forgot about it. I'll look into that now.

@niklasf
Copy link
Member

niklasf commented May 3, 2018

looks like code has diverged so far that you would probably have to start over

@niklasf niklasf closed this May 3, 2018
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.

preselection of background images with selector
4 participants