From 7a90118f50e14d48f4038a7ba4089bcff973be65 Mon Sep 17 00:00:00 2001 From: Alberto Donato Date: Mon, 24 Jun 2024 16:57:22 +0200 Subject: [PATCH] show ellipsis for long filenames, fielname as tooltip --- server/assets/style.css | 4 ++++ server/template.html | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/server/assets/style.css b/server/assets/style.css index 30a1b13..a5999fd 100644 --- a/server/assets/style.css +++ b/server/assets/style.css @@ -116,6 +116,10 @@ a.type-file { } .col-name { flex-grow: 1; + flex-shrink: 10; + overflow: hidden; + overflow-wrap: anywhere; + text-overflow: ellipsis; } .col-size { border-color: var(--size-color); diff --git a/server/template.html b/server/template.html index 18047e7..cdd990b 100644 --- a/server/template.html +++ b/server/template.html @@ -25,16 +25,16 @@

{{ if not .Dir.IsRoot -}}
- .. + ..
{{- end }} {{- range $i, $entry := .Dir.Entries -}} {{- $i := inc $i -}}
{{ if .IsDir -}} - {{ .Name }}/ + {{ .Name }}/ {{- else -}} - {{ .Name }} + {{ .Name }} {{- end }} {{ if eq .HumanSize.Suffix "" }}—{{ else }}{{ .HumanSize.Value }}{{ end -}}