-
Notifications
You must be signed in to change notification settings - Fork 85
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
"Content in date order"? #1
Comments
Hey @Schweinepriester! Thanks for the kind words, it's much appreciated 😄 This seems to be the trickiest use case to deal with 😕 I think the issue is trying to make it play nicely responsively. And that's even after solving how to render things in the correct order in the DOM. As this is aiming to be pure CSS, it's a little out of scope. But with some JavaScript, you could modify the structure slightly once the request for images has been made. As for the pure CSS approach. I may be overlooking something simple with the flexbox/multi column layout specification but I haven't come up with a solution yet and not sure if there is a simple one. Approach 1: jsbin.com/kozirih...The solution I propose in the post was a quick one off the top of my head without any time to truly explore it. My idea was something along the following. If we say have items 1 through 7 going where 1 is the newest and seven oldest, we could populate columns in that order filling one column at a time. Consider; <div class="layout">
<div class="column">
<div class="panel panel--1">1</div>
<div class="panel panel--4">4</div>
<div class="panel panel--7">7</div>
</div>
<div class="column">
<div class="panel panel--2">2</div>
<div class="panel panel--5">5</div>
</div>
<div class="column">
<div class="panel panel--3">3</div>
<div class="panel panel--6">6</div>
</div>
</div> We could set our layout block to When we scale down to mobile, the assumption is that we would want them all to stack nicely on top of each other in order. I had thought there might be some way to use the Approach 2: jsbin.com/zoxiwe...Alternatively, we could discard the column elements altogether and develop mobile first so that they are all stacked by default. When we scale up to larger viewport we can define an Not ideal but would workIt may not be ideal. However, a work around could be to duplicate the markup and show/hide appropriately. Have one set of panels columned and another just stacked in order. At set breakpoints show/hide whichever is appropriate at that viewport size. Hope that elaborates things a little. It may be a little out of pure CSS scope at the moment. |
Update:: I updated the implementation of clusters and segments to make use of separate columns/rows. This still won't solve the issue out of the box though. For date ordered going left to right, it will require some logic either for server side rendering or using JavaScript to modify the ordering/structure of the DOM. |
Closing as dormant. Addressed timeline ordering in README update. |
Hi!
At first: Really great post, pretty much what i was looking for, thanks! :)
Could you elaborate on:
Which is exactly my use case, i would want to have a masonry with images only in order of capture time.
The text was updated successfully, but these errors were encountered: