@@ -48,7 +48,7 @@ defaultListing pieces (Folder contents) = do
48 , "a { text-decoration: none }"
48 , "a { text-decoration: none }"
50 H.body $ do
50 H.body $ do
51− H.h1 $ showFolder $ filter (not . T.null . fromPiece) pieces
51+ H.h1 $ showFolder' $ filter (not . T.null . fromPiece) pieces
52 renderDirectoryContentsTable haskellSrc folderSrc fps''
52 renderDirectoryContentsTable haskellSrc folderSrc fps''
54 image x = T.unpack $ T.concat [(relativeDirFromPieces pieces), ".hidden/", x, ".png"]
54 image x = T.unpack $ T.concat [(relativeDirFromPieces pieces), ".hidden/", x, ".png"]
@@ -57,8 +57,12 @@ defaultListing pieces (Folder contents) = do
57 showName "" = "root"
57 showName "" = "root"
58 showName x = x
58 showName x = x
60+ -- Add a link to the root of the tree
61+ showFolder' :: Pieces -> H.Html
62+ showFolder' pieces = showFolder (unsafeToPiece "root" : pieces)
60 showFolder :: Pieces -> H.Html
64 showFolder :: Pieces -> H.Html
61− showFolder [] = "/"
65+ showFolder [] = "/" -- won't happen
62 showFolder [x] = H.toHtml $ showName $ fromPiece x
66 showFolder [x] = H.toHtml $ showName $ fromPiece x
63 showFolder (x:xs) = do
67 showFolder (x:xs) = do
64 let href = concat $ replicate (length xs) "../" :: String
68 let href = concat $ replicate (length xs) "../" :: String