CID: {{.CID}}
+ Codec: {{.CodecName}} ({{.CodecHex}})
+ Preview as JSON |
+
+ Or download as: +
|
+
diff --git a/assets/dag-index-html/README.md b/assets/dag-index-html/README.md new file mode 100644 index 00000000000..de38a9504a1 --- /dev/null +++ b/assets/dag-index-html/README.md @@ -0,0 +1,3 @@ +# dag-index-html + +> HTML representation for non-UnixFS DAGs such as DAG-CBOR. diff --git a/assets/dag-index-html/index.go b/assets/dag-index-html/index.go new file mode 100644 index 00000000000..214b06a3822 --- /dev/null +++ b/assets/dag-index-html/index.go @@ -0,0 +1,81 @@ +package dagindexhtml + +import "html/template" + +// TODO: DagIndexTemplate - replace static CSS with shared one with ../dir-index-html + +// DagIndexTemplate is HTML-based template for non-UnixFS DAGs when request was +// made with Accept: text/html (web browsers). +var DagIndexTemplate = template.Must(template.New("redirect").Parse(` + +
+ + + + + + + + + + + + + + + +CID: {{.CID}}
+ Codec: {{.CodecName}} ({{.CodecHex}})
+ Preview as JSON |
+
+ Or download as: +
|
+