Browse Source

调整显示样式

master
453530270@qq.com 2 years ago
parent
commit
2ce0870602
  1. BIN
      fssc/fssc
  2. 5
      fssc/main.go
  3. 3
      fssc/web/embed.go
  4. BIN
      fssc/web/favicon.ico
  5. 11
      fssc/web/list.tmpl
  6. 1
      fssc/web/up.tmpl

BIN
fssc/fssc

Binary file not shown.

5
fssc/main.go

@ -34,6 +34,11 @@ func sendClient() error {
fmt.Printf("Server address: %s\n", url)
http.HandleFunc("/", handler.SendHandler)
// ico
http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "image/x-icon")
http.ServeFile(w, r, "./favicon.ico")
})
// 加载静态资源
http.Handle("/static/", http.StripPrefix("/static/",
http.FileServer(http.FS(web.StaticFs))))

3
fssc/web/embed.go

@ -12,3 +12,6 @@ var ListPage string
//go:embed up.tmpl
var UpPage string
// go:embed favicon.ico
var WbIco string

BIN
fssc/web/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

11
fssc/web/list.tmpl

@ -96,6 +96,7 @@
}
</style>
<link rel="stylesheet" href="/static/static/css/bootstrap.css">
<link rel="icon" type="image/x-icon" href="/favicon.ico?v=2">
<script type="text/javascript" src="/static/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/static/js/bootstrap.min.js"></script>
</head>
@ -138,12 +139,20 @@
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<button class="btn btn-primary" type="submit">以压缩包模式发送文件</button>
</div>
</div>
</div>
<div class="row">
<ol class="breadcrumb">
<li><a href="./">Home</a></li>
<li class="{{.UrlPath}}">{{.UrlPath}}</li>
</ol>
</div>
<div class="row">
<ul class="list-group">
{{ range .Files }}

1
fssc/web/up.tmpl

@ -4,6 +4,7 @@
<title>send file to server</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/static/css/bootstrap.css">
<link rel="icon" type="image/x-icon" href="/favicon.ico?v=2">
<script type="text/javascript" src="/static/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/static/js/bootstrap.min.js"></script>
</head>

Loading…
Cancel
Save