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
ce0dceac
Commit
ce0dceac
authored
4 years ago
by
Kevin Neaton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use short hash for uniform CID presentation of directory items
parent
c5d042ac
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
dir-index.html
dir-index.html
+4
-5
test/main.go
test/main.go
+3
-0
No files found.
dir-index.html
View file @
ce0dceac
This diff is collapsed.
Click to expand it.
test/main.go
View file @
ce0dceac
...
...
@@ -25,6 +25,7 @@ type directoryItem struct {
Name
string
Path
string
Hash
string
ShortHash
string
}
type
breadcrumb
struct
{
...
...
@@ -39,11 +40,13 @@ var testData = listingTemplateData{
Name
:
"short-film.mov"
,
Path
:
testPath
+
"/short-film.mov"
,
Hash
:
"QmQuxBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7"
,
ShortHash
:
"QmQu
\u2026
xDu7"
,
},
{
Size
:
"1 KiB"
,
Name
:
"this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt"
,
Path
:
testPath
+
"/this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt"
,
Hash
:
"QmquXbaRQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7"
,
ShortHash
:
"Qmqu
\u2026
xDu7"
,
}},
Size
:
"25 MiB"
,
Path
:
testPath
,
...
...
This diff is collapsed.
Click to expand it.
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