Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
dir-index-html
Commits
beb1120f
Commit
beb1120f
authored
Jul 01, 2020
by
Kevin Neaton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display viewed directory's size
parent
269b1d03
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
22 deletions
+45
-22
dir-index.html
dir-index.html
+43
-22
test/main.go
test/main.go
+2
-0
No files found.
dir-index.html
View file @
beb1120f
This diff is collapsed.
Click to expand it.
test/main.go
View file @
beb1120f
...
...
@@ -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"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment