JavaScript gallery

This week was interesting. Going back and forth with the gallery took a significant amount of time. From going back through the tutorials to finding helpful YouTube videos and W3Schools pages that offer a plethora of avenues to reach the same (or similar) goal, I think my biggest issue for this week was mass overload.

In this case, I have my gallery page with tons of JavaScript (and a few different stylized buttons, etc.), but the events/const aren’t taking place like how I intended. I think with each new strategy I employed, I made the code appear more complicated and it got to the point where I wasn’t sure where the bug(s) was. In JavaScript, I actually have three different routes for coding the gallery’s auto scroll timing function. I believe I deleted the HTML- and CSS-only version, but I found a way to use span tags to link to a following or previous image. Adding a fade/transform effect to make the transition appear like JavaScript. I scrapped that because it was not how the assignment was supposed to work.

I think my biggest issue was getting the script to work inside of the container but outside of the individual images, I believe. After a while of taking a few steps backward to take one forward, I saw that the code for the script was already built, along with the container, but I ended up not being sure which code canceled out the previous.

It then made me wonder about how content management systems are built (in this case, for photo galleries). I understand having a resize function to make featured images consistent, which I initially pursued but resorted to sizing in Photoshop, but what about changing the number of images available in the gallery? After I figure out which code to delete, I’d like to know the basics around a photo being added to a collection and the container expanding (or contracting) to accommodate for different final products.

A bit of a tangent, at the three news organizations I’ve worked, I haven’t seen a wholly aesthetically pleasing gallery that fits and works neatly within a normal article. I have seen and used sliders for posts designed for the slider to have preeminence on the page, but the gallery function toward the middle of the page below the A section of an article is often very basic or clunky. And most news organizations I’ve seen generally rely on single images within the text to avoid addressing it, which leaves image heavy stories lacking in ways that simply linking to photo gallery pages (which statistically aren’t clicked at large rates) aren’t the solution.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.