fix: prevent entry names from moving

This commit is contained in:
Louis Dalibard 2024-06-10 22:13:43 +02:00
parent 4984db587d
commit b0f1fa5fda

View File

@ -71,6 +71,10 @@ func FileListPage(req string, entries []Entry) string {
margin-left: 16px;
margin-right: auto;
}
.entry-icon{
width: 48px;
height: 48px;
}
#leech {
image-rendering: pixelated;
transform-origin: center center;
@ -129,7 +133,7 @@ func FileListPage(req string, entries []Entry) string {
if dirEntry.IsDir {
icon = "/assets/images/diricon.png"
}
body += fmt.Sprintf(`<a href="%s"><div class="entry"><img src="%s"></img><div class="entry-name">%s</div><div class="entry-size">%s</div></div></a>`, link, icon, dirEntry.Name, formattedSize)
body += fmt.Sprintf(`<a href="%s"><div class="entry"><img class="entry-icon" src="%s"></img><div class="entry-name">%s</div><div class="entry-size">%s</div></div></a>`, link, icon, dirEntry.Name, formattedSize)
}
return header + body + footer
}