Ich möchte einen benutzerdefinierten Scrollbalken direkt über der Schaltfläche „Beitrag erstellen“ hinzufügen, und zwar spezifisch für die Themen-Seite. Gibt es eine Möglichkeit, dies zu implementieren, oder sollte ich die Änderungen direkt im Repository vornehmen? Ich verwende das Redditish-Theme von @awesomerobot.
Ich habe unten einen Ausschnitt von HTML und CSS beigefügt, falls jemand daran interessiert ist. Fühlen Sie sich frei, ihn nach Bedarf anzupassen – ich habe ihn für mein Forum bereits angepasst. PS: Ich verlange dafür nichts.
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;
}
}
Außerdem ist dies Mobile First und Sie können es einfach anpassen.