Things I wish I knew how to:
Make a group of pictures to post as a grid on my blog.
@Gaby Have you taken a look at @jsonbeckerâs Lightbox plugin for Micro.blog? It allows you to make a 2 column grid of photos which you can tap on to enlarge. Hereâs an example of how it looks on a page.
@Gaby So after installing, youâll need to use a short-code to make a grid of photos. Instead of having:
<img src=âpicture1.pngâ>
<img src=âpicture2.pngâ>
Youâll have something like the following:
<div class=âimg-galleryâ>
{{<glightbox src=âpicture1.pngâ gallery=âmy-group-nameâ >}}
{{<glightbox src=âpicture2.pngâ gallery=âmy-group-nameâ >}}
</div>
Where gallery is an ID to use for the gallery (to distinguish it from other galleries on the page). I think the div
will make the grid and the shortcode will make them expandable when tapped. It shouldnât affect any other <img>
you have on the page.
@lmika @gaby A few updates:
The div is just a way to get the built in style for building the grid-- you can use your own CSS. You're only getting 2 columns because of the width of your blog post column and the default size in the CSS I include. With a wider blog post (or smaller setting for your photos) you could get wider grids if you want.
My favorite thing with this plug in is that every image that uses Markdown syntax will now click to expand into a lightbox-- it's quite nice compared to the standard image.
@jsonbecker @lmika @Gaby But you still need to add some code manually for it to display as thumbnails, right? I wish that were by default and hopefully in a masonry layout.
@pratik @jsonbecker @lmika and yet all of this, for some reason, goes over my head a little đ«Ł
@pratik a div with the class of img-gallery
is how you get the grid. A masonry layout is substantially more complex in a pure CSS implementation-- most folks resort to a significant amount of javascript. I will not add that until there's widespread support for the proposed grid template property masonry
.
I am not aware of any way to apply styling like a grid to a series of elements automatically for any plug in-- you need a container for CSS selecting for the images. You could add styling to individual images, but not to wrap around a series of images without some syntax.
@Gaby @jsonbecker Here you go: www.youtube.com/watch. Sorry, might have been a bit late, but this conversation got my creative juices flowing. đ
@jsonbecker @gaby @lmika Thanks! This is much better. I've added div class to Pastebot for easier use. Since masonry layout is not yet standard, I've to remember to use similar format photos together.
BTW know where I may reduce the gap between two rows?
@pratik @jsonbecker @lmika I post mostly from my phone so I can either crate a template on drafts or just save it in Tot
@pratik not sure whatâs causing that. I think I use just one grid-gap of 10px all around. I will try and remember to look when Iâm at my desk tomorrow.