diff --git a/dir-index.html b/dir-index.html index 945c1a1dc..2e5d507d3 100644 --- a/dir-index.html +++ b/dir-index.html @@ -20,6 +20,20 @@ + {{ .Path }} @@ -39,7 +53,8 @@
-
+
+
Index of {{ .Path }} {{ if .Hash }}
@@ -47,28 +62,34 @@
{{ end }}
- - - - - - - {{ range .Listing }} - - - - - + {{ if .Size }} +
+  {{ .Size }} +
{{ end }} -
-
 
-
- .. -
-
 
-
- {{ .Name }} - {{ .Size }}
+
+ + + + + + + {{ range .Listing }} + + + + + + {{ end }} +
+
 
+
+ .. +
+
 
+
+ {{ .Name }} + {{ .Size }}
diff --git a/test/main.go b/test/main.go index 22ea89503..e4a4153f0 100644 --- a/test/main.go +++ b/test/main.go @@ -13,6 +13,7 @@ const templateFile = "../dir-index.html" // Copied from go-ipfs/core/corehttp/gateway_indexPage.go type listingTemplateData struct { Listing []directoryItem + Size string Path string BackLink string Hash string @@ -34,6 +35,7 @@ var testData = listingTemplateData{ Name: "this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt", Path: "this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt", }}, + Size: "25 MiB", Path: "/ipfs/QmFooBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm", BackLink: "/..", Hash: "QmFooBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm",