I’m looking to add a custom scrollbar just above the “Create a post” button, and I want it to be specific to the topics page. Is there a way to implement this, or should I make the changes directly in the repository? I’m using the Redditish theme by @awesomerobot.
I’ve included a snippet of the HTML and CSS below for anyone interested in using it. Feel free to customize it as needed—I’ve already made some adjustments for my forum. P.S.: I’m not charging anything for this.
HTML:
<div class="image-scrollbar-container">
<a href="https://example.com/link1">
<img src="https://res.cloudinary.com/dn1hjjczy/image/upload/v1729712069/6_oqnefr.png" alt="Image 1">
</a>
<a href="https://example.com/link2">
<img src="https://res.cloudinary.com/dn1hjjczy/image/upload/v1729712069/6_oqnefr.png" alt="Image 2">
</a>
<a href="https://example.com/link3">
<img src="https://res.cloudinary.com/dn1hjjczy/image/upload/v1729712069/6_oqnefr.png" alt="Image 3">
</a>
<a href="https://example.com/link4">
<img src="https://res.cloudinary.com/dn1hjjczy/image/upload/v1729712069/6_oqnefr.png" alt="Image 4">
</a>
<a href="https://example.com/link5">
<img src="https://res.cloudinary.com/dn1hjjczy/image/upload/v1729712069/6_oqnefr.png" alt="Image 5">
</a>
</div>
CSS:
.image-scrollbar-container {
display: flex;
overflow-x: auto;
padding: 5px 0;
margin-top: 10px;
gap: 8px;
scrollbar-width: none;
-ms-overflow-style: none;
scroll-behavior: smooth;
}
.image-scrollbar-container::-webkit-scrollbar {
display: none;
}
.image-scrollbar-container img {
border-radius: 50%;
width: 50px;
height: 50px;
object-fit: cover;
transition: transform 0.3s ease;
}
.image-scrollbar-container img:hover {
transform: scale(1.1);
}
@media (min-width: 768px) {
.image-scrollbar-container {
gap: 10px;
margin-top: 15px;
padding: 8px 0;
}
.image-scrollbar-container img {
width: 60px;
height: 60px;
}
}
@media (min-width: 1024px) {
.image-scrollbar-container {
gap: 15px;
margin-top: 20px;
padding: 10px 0;
}
.image-scrollbar-container img {
width: 80px;
height: 80px;
}
}
Also, this is mobile first and you can customize it easily.