From f3bcaebab57a16ac25a935e85a7aae3b8c8bd58f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 27 May 2016 07:12:55 +0100 Subject: index: add more information on symlinks This requires the supporting CSS change of adding :first-of-type selectors for the icons, because there may now be 2 elements on a row for links. --- style.css | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) (limited to 'style.css') diff --git a/style.css b/style.css index 3d6a70c..1521b48 100644 --- a/style.css +++ b/style.css @@ -19,42 +19,37 @@ td.number { text-align: right; } -td a { - margin-left: 20px; -} - tr:hover { box-shadow: inset 0 0 0 1px #bcd; } -td a:before { +/* Make room for a 16x16 icon on the left, with 4px padding between it + * and the text. */ +td a:first-of-type { + margin-left: 20px; +} +td a:first-of-type::before { width: 16px; height: 16px; margin-left: -20px; margin-right: 4px; } -/* inode */ - +/* generic inode information ---------------------------------------- */ tr.hidden { /*opacity: 0.5;*/ display: none; } - -tr.link a:before { content: url("link.png"); } - -tr.dir a:after { content: "/"; } -tr.dir a:before { content: url("dir.png"); } -tr.dir.parent a:before { content: url("parent.png"); } - -tr.file a:before { content: url("file.png"); } - -/* domain */ - -tr.dir.repo a:before { content: url("repo.png"); } -tr.file.pkg.tar a:before { content: url("pkg.png"); } -tr.file.iso a:before { content: url("iso.png"); } -tr.file.tar a:before { content: url("tar.png"); } -tr.file.txt a:before { content: url("txt.png"); } -tr.file.torrent a:before { content: url("torrent.png"); } - +tr.dir a::after { content: "/"; } +tr.dir a:first-of-type::before { content: url("dir.png"); } +tr.dir.parent a:first-of-type::before { content: url("parent.png"); } +tr.link a:first-of-type::before { content: url("link.png"); } +tr.file a:first-of-type::before { content: url("file.png"); } +/* domain-specific information -------------------------------------- */ +tr.dir.repo a:first-of-type::before { content: url("repo.png"); } tr.arch td { background:#7fc3e5; } tr.para td { background:#9fa6e3; } -tr.community {} +tr.community { /* TODO: we should indicate this somehow */ } +/* file extension information --------------------------------------- */ +tr.file.pkg.tar a:first-of-type::before { content: url("pkg.png"); } +tr.file.iso a:first-of-type::before { content: url("iso.png"); } +tr.file.tar a:first-of-type::before { content: url("tar.png"); } +tr.file.txt a:first-of-type::before { content: url("txt.png"); } +tr.file.torrent a:first-of-type::before { content: url("torrent.png"); } -- cgit v1.2.2