Creating specialized layouts for different gallery
We set up a default layout for each of our posts, but what if we want to change up the design for each? We can do that by creating a new layout and using that layout for individual posts.
Creating a side-scrolling gallery
To start, let’s create a scrollable gallery template to show the images at a large size and allow a user to scroll from left to right to see all the images.
Figure 6.2 – A gallery with a side-to-side scroll for the images
We can accomplish this with some additional Tailwind classes and resizable images. The Tailwind classes will allow the images to sit side by side and we’ll make sure the overflow of the browser for this area is allowed to scroll with a Tailwind class as well.
Create a new layout in the _templates/layouts
directory named full.html
. This will be the layout we can use on certain posts:
{% include 'includes/header.html' %} <div class...