kc0bfv / autophugo

AutoPhugo [ˌɔtoʊˈfjuːgəʊ] is a gallery/photoblog theme for Hugo that's a little more automatic than Phugo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible left-to-right order when clicking the next (nav-next) button

J-An-dev opened this issue · comments

commented

Hi Karl,

Many thanks for this incredible theme. I have been building up my own photo gallery based on it recently and it turned out to be great.

While, I am just wondering is it possible to change the photo switching order to left-to-right with cross-flexcol fashion when clicking the next/previous arrow button? Right now, the order of the photo appears when clicking next button is going through the left flexcol from top to bottom then switching to the right flexcol and going through it next. Since photos are added from left to right crossing flexcol, so I believe it would be better if the next/previous order could also obey the same rule.

Thank you and take care,
J.

commented

@J-An-dev - I think this is definitely possible but related to some problems I had been running into when thinking about how to make this more accessible. There - for browser accessibility it's best to have items in the HTML in the order in which the user wants to browse through them using keys. So, I wanted to go left to right instead of top-bottom first col, top-bottom second col.

The problem there was that specifying the html entities in an order left to right then top to bottom is a row-like ordering, and when handling pictures that scale to different heights I really wanted something that looks like columns, just aesthetically.

I still don't have a solution for good accessibility there. I probably just need to focus on improving keypress usage instead of solving this deeper accessibility issue.

But - for what your'e talking about, I think those buttons are implemented by poptrox, the lightbox. There's probably a way to override their default behavior and change how they figure out what the next item is. Some javascript that produces an item ordering similar to the code that figures out how to load the columns should enable left-right up-down ordering.

I think it'll take digging into the poptrox code to figure it out. I'll try to get some time to do this - that would definitely be the better way for the buttons to work. If you make any progress let me know ;-)

commented

Hi Karl! Thanks for the response. Yes, l did have a look of the functions that control next/previous button, and like you mentioned, they are under the jquery.poptrox.min.js and jquery.min.js files. However these two js files are kind of messy without proper indentation, it quite hard to figure out the structure. I would definitely keep digging into that part and will let you know if there is any solution. Thank you.