Skip to content

Commit

Permalink
show hash if given
Browse files Browse the repository at this point in the history
This template will only get passed the hash value if the hash is not already being shown in the path. If a hash value is passed in, it will display under the path in grey.

License: MIT
Singed-off-by: Jack Loughran <j@ckloughran.com>
  • Loading branch information
jackloughran committed Dec 11, 2018
1 parent d9fb37f commit 427874e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dir-index-uncat.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
.ipfs-icon {
width:16px;
}
.ipfs-hash {
color: #999;
}
</style>
<title>{{ .Path }}</title>
</head>
Expand All @@ -33,6 +36,11 @@
<div class="panel panel-default">
<div class="panel-heading">
<strong>Index of {{ .Path }}</strong>
{{ if .Hash }}
<div class="ipfs-hash">
{{ .Hash }}
</div>
{{ end }}
</div>
<table class="table table-striped">
<tr>
Expand Down
8 changes: 8 additions & 0 deletions dir-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
.ipfs-icon {
width:16px;
}
.ipfs-hash {
color: #999;
}
</style>
<title>{{ .Path }}</title>
</head>
Expand All @@ -31,6 +34,11 @@
<div class="panel panel-default">
<div class="panel-heading">
<strong>Index of {{ .Path }}</strong>
{{ if .Hash }}
<div class="ipfs-hash">
{{ .Hash }}
</div>
{{ end }}
</div>
<table class="table table-striped">
<tr>
Expand Down

0 comments on commit 427874e

Please sign in to comment.