提交 053e531d 作者: Henry

http/index: fix indention and remove unused field

License: MIT
Signed-off-by: 's avatarHenry <cryptix@riseup.net>
上级 0ed49dbb
...@@ -3,7 +3,6 @@ package corehttp ...@@ -3,7 +3,6 @@ package corehttp
import ( import (
"errors" "errors"
"fmt" "fmt"
"html/template"
"io" "io"
"net/http" "net/http"
gopath "path" gopath "path"
...@@ -31,7 +30,6 @@ const ( ...@@ -31,7 +30,6 @@ const (
// (it serves requests like GET /ipfs/QmVRzPKPzNtSrEzBFm2UZfxmPAgnaLke4DMcerbsGGSaFe/link) // (it serves requests like GET /ipfs/QmVRzPKPzNtSrEzBFm2UZfxmPAgnaLke4DMcerbsGGSaFe/link)
type gatewayHandler struct { type gatewayHandler struct {
node *core.IpfsNode node *core.IpfsNode
dirList *template.Template
config GatewayConfig config GatewayConfig
} }
......
...@@ -22,7 +22,7 @@ type directoryItem struct { ...@@ -22,7 +22,7 @@ type directoryItem struct {
var listingTemplate = template.Must(template.New("dir").Funcs(template.FuncMap{"iconFromExt": iconFromExt}).Parse(` var listingTemplate = template.Must(template.New("dir").Funcs(template.FuncMap{"iconFromExt": iconFromExt}).Parse(`
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<!-- TODO: seed these - maybe like the starter ex or the webui? --> <!-- TODO: seed these - maybe like the starter ex or the webui? -->
<link rel="stylesheet" href="/ipfs/QmXB7PLRWH6bCiwrGh2MrBBjNkLv3mY3JdYXCikYZSwLED/bootstrap.min.css"/> <link rel="stylesheet" href="/ipfs/QmXB7PLRWH6bCiwrGh2MrBBjNkLv3mY3JdYXCikYZSwLED/bootstrap.min.css"/>
...@@ -43,8 +43,8 @@ var listingTemplate = template.Must(template.New("dir").Funcs(template.FuncMap{" ...@@ -43,8 +43,8 @@ var listingTemplate = template.Must(template.New("dir").Funcs(template.FuncMap{"
} }
</style> </style>
<title>{{ .Path }}</title> <title>{{ .Path }}</title>
</head> </head>
<body> <body>
<div id="header" class="row"> <div id="header" class="row">
<div class="col-xs-2"> <div class="col-xs-2">
<div id="logo" class="ipfs-logo">&nbsp;</div> <div id="logo" class="ipfs-logo">&nbsp;</div>
...@@ -80,7 +80,7 @@ var listingTemplate = template.Must(template.New("dir").Funcs(template.FuncMap{" ...@@ -80,7 +80,7 @@ var listingTemplate = template.Must(template.New("dir").Funcs(template.FuncMap{"
</table> </table>
</div> </div>
</div> </div>
</body> </body>
</html> </html>
`)) `))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论