From 81bb2ee74101624623fbc9e887040958b9a36015 Mon Sep 17 00:00:00 2001 From: David Darrell Date: Thu, 31 Dec 2015 19:11:58 +0800 Subject: [PATCH] Improve long name line breaks --- caddy/setup/browse.go | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/caddy/setup/browse.go b/caddy/setup/browse.go index 5986194bd..38403f1d6 100644 --- a/caddy/setup/browse.go +++ b/caddy/setup/browse.go @@ -112,12 +112,22 @@ header, th:first-child, td:first-child { - padding-left: 5%; + padding: 0.5em 2.5% 0.5em 5%; +} + +td:first-child svg { + position: absolute; +} + +td:first-child div.name { + margin-left: 2em; + word-break: break-all; + overflow-wrap: break-word; } th:last-child, td:last-child { - padding-right: 5%; + padding: 0.5em 5% 0.5em 2.5%; } header { @@ -174,7 +184,7 @@ tr:not(:first-child):hover { th, td { text-align: left; - padding: 10px 0; + vertical-align: top; } th { @@ -201,9 +211,17 @@ td:first-child { word-break: break-word; } +th:nth-child(2), +td:nth-child(2) { + padding: 0.5em 2.5%; + white-space: nowrap; +} + th:last-child, td:last-child { text-align: right; + padding: 0.5em 5% 0.5em 2.5%; + white-space: nowrap; } footer { @@ -217,14 +235,16 @@ footer { display: none; } + th:first-child, td:first-child { width: auto; } th:nth-child(2), td:nth-child(2) { - padding-right: 5%; + padding: 0.5em 5% 0.5em 2.5%; text-align: right; + width: 5em; } } @@ -280,7 +300,7 @@ footer { {{else}} {{end}} - {{.Name}} +
{{.Name}}
{{.HumanSize}}