Hi Kvnm,

I would love to take a first stab at a patch for making the splash block responsive. What are your thoughts?

Best,
boehmrya

Comments

kvnm’s picture

I think that's an absolutely fantastic idea, and a top priority for the project in my opinion.

boehmrya’s picture

Great - i'll get rollin' on this :)

boehmrya’s picture

Hey - I attached a patch. I think this gets us most of the way there.

Specifically, I added a method which checks if the width of the window is greater than the width of the block. If so, the block is resized a bit. It's not the cleanest way to make it responsive, but it basically works.

The one somewhat major drawback is that upon increasing the size of the browser, the block does not resize to its desktop dimensions. It would be nice to get that to work. Any thoughts on how to make that happen?

kvnm’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: splash_block-responsive-adjustments-2-3.patch, failed testing.

kvnm’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
kvnm’s picture

Status: Needs work » Needs review
kvnm’s picture

This looks like a really nice start. I agree with you that we should inflate the block back to the original size when the window size is increased enough to support it. Since you're binding your responsive method to window.resize, that means it'll get called every time that event fires. This should make it relatively easy to, when checking width differences, swap in the original width instead of the calculated width as needed, unless I'm missing something.

kvnm’s picture

Also, when reviewing, I noticed some js standards issues, which I've just pushed up a commit for. When/if refactoring this patch, could you please patch it against the latest dev commit?

kvnm’s picture

Status: Needs review » Needs work
boehmrya’s picture

Hey - been a bit busy recently. I'll take another crack at it this weekend.

Yeah, I should be able to make it work with the resize event. I'll let you know how it goes!

kvnm’s picture

Any updates here, @boehmrya?