From c99274a0cca13ef3d3af2bdb31c2970a37538b7a Mon Sep 17 00:00:00 2001 From: Ambrose Chua Date: Mon, 1 Jun 2020 18:07:48 +0800 Subject: [PATCH] Implement web interface generator --- cmd/control/control.go | 47 +++++++++++++++++++--------- cmd/web/bindata.go | 24 +++++++-------- cmd/web/templates.go | 9 +++++- cmd/web/web.go | 13 +++++++- pkg/bucket/photo.go | 6 +++- pkg/bucket/photopreview.go | 12 +++++++- pkg/bucket/signer.go | 24 ++++++++++++++- web/shared/css/base.css | 2 ++ web/shared/css/enlarge.css | 6 ++-- web/shared/js/enlarge.js | 19 +++++++++--- web/shared/js/gallery.js | 63 ++++++++++++++++++++++---------------- web/view/index.tmpl | 20 ++++++------ 12 files changed, 171 insertions(+), 74 deletions(-) diff --git a/cmd/control/control.go b/cmd/control/control.go index 44b17e7..b44b4e7 100644 --- a/cmd/control/control.go +++ b/cmd/control/control.go @@ -64,16 +64,31 @@ func read(w http.ResponseWriter, req *http.Request) { } bucket := lib.Bucket(req.FormValue("bucket")) - photo := lib.Photo(req.FormValue("photo")) + photo := lib.Photo(req.FormValue("object")) + preview := lib.Preview(req.FormValue("object")) - url, err := signer.GetPhoto(bucket, photo) - if err != nil { - httphelpers.ErrorResponse(w, err) + if photo.Validate() == nil { + url, err := signer.GetPhoto(bucket, photo) + if err != nil { + httphelpers.ErrorResponse(w, err) + return + } + + w.Header().Add("Location", url) + w.WriteHeader(http.StatusTemporaryRedirect) + return + } else if preview.Validate() == nil { + url, err := signer.GetPreview(bucket, preview) + if err != nil { + httphelpers.ErrorResponse(w, err) + return + } + + w.Header().Add("Location", url) + w.WriteHeader(http.StatusTemporaryRedirect) return } - - w.Header().Add("Location", url) - w.WriteHeader(http.StatusTemporaryRedirect) + httphelpers.ErrorResponse(w, httphelpers.ErrorBadRequest) } func write(w http.ResponseWriter, req *http.Request) { @@ -84,14 +99,18 @@ func write(w http.ResponseWriter, req *http.Request) { } bucket := lib.Bucket(req.FormValue("bucket")) - photo := lib.Photo(req.FormValue("photo")) + photo := lib.Photo(req.FormValue("object")) - url, err := signer.PutPhoto(bucket, photo) - if err != nil { - httphelpers.ErrorResponse(w, err) + if photo.Validate() == nil { + url, err := signer.PutPhoto(bucket, photo) + if err != nil { + httphelpers.ErrorResponse(w, err) + return + } + + w.Header().Add("Location", url) + w.WriteHeader(http.StatusTemporaryRedirect) return } - - w.Header().Add("Location", url) - w.WriteHeader(http.StatusTemporaryRedirect) + httphelpers.ErrorResponse(w, httphelpers.ErrorBadRequest) } diff --git a/cmd/web/bindata.go b/cmd/web/bindata.go index 1fb54cd..32fde62 100644 --- a/cmd/web/bindata.go +++ b/cmd/web/bindata.go @@ -173,7 +173,7 @@ func AssetFile() http.FileSystem { return &assetOperator{} } -var _sharedCssBaseCss = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x93\xc9\x72\xa3\x48\x10\x86\xcf\xe2\x29\xea\x34\x5a\x42\x85\x00\x5b\x96\xa7\x08\xc7\xf8\x34\xa7\x99\x98\xcb\xf4\x03\x94\x20\x81\xb4\x6b\x8b\xaa\x44\x12\xea\xe8\x77\xef\x60\x91\x5a\xb6\xdc\x37\x82\x5c\xfe\x2f\x33\xff\x7a\x45\xed\xac\x27\xd6\x7a\xb5\x98\x37\x44\x2e\x88\xcd\xa6\xb2\x86\x42\x5c\x5b\x5b\x2b\x90\x0e\x43\x5c\x58\xbd\x29\x42\xc8\xfe\xaa\xa4\x46\xd5\xbd\xfc\x2d\xdb\x40\x68\xa4\x38\xd6\x0d\xbd\x3e\x26\x49\xbe\xdd\x26\x7f\x94\x18\x9c\x92\xdd\x4b\x38\x4a\x37\x5f\xe6\x51\xb4\x59\x45\x6c\xc5\xbe\x19\xa4\x10\xb1\xd5\x26\x8a\x84\xb7\x96\xd8\xf7\x68\xc6\x79\x70\xb2\x40\x53\x0b\x96\xc4\x0f\xbb\xad\x07\x9d\x47\x3f\x2e\x15\xff\x77\xce\xd6\x5e\xba\xa6\x1b\xcb\x1a\xd2\xaa\xaf\xea\xb9\xf8\x88\x20\xd8\xfc\x02\x31\x5f\xb3\x00\x1e\xab\x7c\x4a\x38\x02\xd6\x0d\x09\xd6\x63\x45\x33\x82\x13\x71\x0f\xa6\x04\x3f\xc8\x59\x47\xa8\xf1\x0c\xff\x40\x8d\x7b\x54\x48\xdd\x20\xbc\xb7\x65\xd7\x4b\x68\xe9\x6b\x34\x82\x25\x03\xd1\xd4\x31\xe0\x19\x04\x4b\x41\xe7\x6c\xb3\x62\xe9\x93\xa3\x1e\x6b\xa6\xd0\x00\x6f\x26\xb5\x34\xce\x76\xd9\xd0\xaa\x49\xd7\xac\xc9\xd6\xac\x79\x58\xb3\xe6\x71\xcd\x9a\xed\x9a\x35\x4f\x57\xfe\x0b\xde\x76\x9b\xf4\x02\xfc\x08\xfb\x77\x24\x3e\x0a\x69\x6b\xa9\x19\x38\xa5\x21\x94\x0a\x65\x80\x32\x8f\x66\x5c\xdb\x33\xb7\xe1\x74\x97\x56\x7b\xe8\x42\x21\x15\x4c\xd2\x57\x99\x91\x39\x8b\x93\xed\x73\x3a\x2d\xb7\xc9\x3e\x45\xd3\xf8\x29\x7d\xbe\x04\x1f\xee\x82\xd9\x2e\xbb\x04\xef\xc7\xb8\x4f\x1a\x6f\xf7\xaf\x55\x50\xb4\x0a\xa6\x8b\xc7\xce\x83\xb2\xb2\x84\x92\x53\xd3\xea\xbd\x91\x38\x9c\x72\xf2\x8a\x60\x7b\x65\x8b\xf7\x3c\x9a\x39\x1b\x90\xd0\x1a\xc1\x3c\x28\x49\x78\x18\x26\xfa\xb2\xdc\x61\x41\xad\x07\x61\x2c\x2d\xbe\x4a\xe0\xa8\x65\x0d\xcb\x5e\xe6\x57\x57\xb9\x0f\x56\xb5\x04\xbd\x25\xac\x13\xac\xf7\x86\x82\x8a\xc6\xaf\x33\x47\x53\xc2\x49\xb0\xf4\x77\xaa\x63\x53\x86\xba\xee\xfb\xda\xfd\x1b\x14\xc4\x2b\x24\xc1\x0a\x7b\x00\x7f\xb3\x81\xff\x7c\x2d\x0d\x06\x3d\x6d\xc0\xc8\x03\x6b\x87\x99\x9d\x2c\xcb\xe1\x68\x07\xe9\x17\xd7\x17\xb0\xcc\x6f\x5c\xd7\x3b\x42\x61\x20\x1e\xa8\x53\x20\x98\xb1\xa6\x27\xbe\x6e\xab\x52\x70\xca\xa3\xd9\x5b\xef\xfc\xaa\xe3\x85\x35\x04\x86\xc6\xff\x1c\x4c\x39\x60\x4c\x8a\x0a\x6f\x0d\xfd\x59\xf3\xfe\x04\x1f\x0e\x9b\xc4\x7f\xf6\x67\x9d\x29\x20\x02\x7f\xfb\x5a\x93\xdd\x10\x18\xde\x15\x79\x69\x42\x65\xbd\x16\xac\x75\x0e\x7c\x21\xc3\x64\x44\x90\x25\xf8\x0f\x43\xa7\x1e\x34\x2b\xa4\x2a\x16\x1f\x51\xd8\x8a\x65\xcb\xa1\xe8\x67\x00\x00\x00\xff\xff\x8a\xe3\xf6\x01\x8c\x04\x00\x00") +var _sharedCssBaseCss = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x93\xcb\x72\xf3\x36\x0c\x85\xd7\xd6\x53\xb0\x9b\xfa\x32\xa6\x2c\x29\x71\x9c\x52\x93\x69\x56\x5d\xb5\xd3\x4d\xfb\x00\xb4\x04\x49\x48\x78\x1b\x12\xb2\x2d\x77\xfa\xee\x1d\x5d\xec\xda\x71\xfe\x9d\x46\x00\x78\x3e\xe0\x00\xef\xa8\x9d\xf5\xc4\x5a\xaf\x16\xf3\x86\xc8\x05\xb1\xd9\x54\xd6\x50\x88\x6b\x6b\x6b\x05\xd2\x61\x88\x0b\xab\x37\x45\x08\xd9\xaf\x95\xd4\xa8\xba\xb7\xdf\x64\x1b\x08\x8d\x14\xc7\xba\xa1\xf7\xe7\x24\xc9\xb7\xdb\xe4\xe7\x12\x83\x53\xb2\x7b\x0b\x47\xe9\xe6\xcb\x3c\x8a\x36\xab\x88\xad\xd8\xdf\x06\x29\x44\x6c\xb5\x89\x22\xe1\xad\x25\xf6\x4f\x34\xe3\x3c\x38\x59\xa0\xa9\x05\x4b\xe2\xa7\xdd\xd6\x83\xce\xa3\x7f\x2f\x15\x7f\x75\xce\xd6\x5e\xba\xa6\x1b\xcb\x1a\xd2\xaa\xaf\xea\xb9\xf8\x88\x20\xd8\xfc\x02\x31\x5f\xb3\x00\x1e\xab\x7c\x4a\x38\x02\xd6\x0d\x09\xd6\x63\x45\x33\x82\x13\x71\x0f\xa6\x04\x3f\xc8\x59\x47\xa8\xf1\x0c\xbf\x43\x8d\x7b\x54\x48\xdd\x20\xbc\xb7\x65\xd7\x4b\x68\xe9\x6b\x34\x82\x25\x03\xd1\xf4\x62\xc0\x33\x08\x96\x82\xce\xd9\x66\xc5\xd2\x17\x47\x3d\xd6\x4c\xa1\x01\xde\x4c\x6a\x69\x9c\xed\xb2\xe1\xa9\x26\x5d\xb3\x26\x5b\xb3\xe6\x69\xcd\x9a\xe7\x35\x6b\xb6\x6b\xd6\xbc\x5c\xf9\x2f\x78\xdb\x6d\xd2\x0b\xf0\x23\xec\x3f\x91\xf8\x28\xa4\xad\xa5\x66\xe0\x94\x86\x50\x2a\x94\x01\xca\x3c\x9a\x71\x6d\xcf\xdc\x86\xd3\x43\x5a\xed\xa1\x0b\x85\x54\x30\x49\x5f\x65\x46\xe6\x2c\x4e\xb6\xaf\xe9\x34\xdc\x26\xfb\x12\x4d\xe3\x97\xf4\xf5\x12\x7c\x7a\x08\x66\xbb\xec\x12\x7c\x6c\xe3\x31\x69\xf4\xee\x0f\xab\xa0\x68\x15\x4c\x8e\xc7\xce\x83\xb2\xb2\x84\x92\x53\xd3\xea\xbd\x91\x38\x58\x39\xed\x8a\x60\x7b\x65\x8b\xcf\x3c\x9a\x39\x1b\x90\xd0\x1a\xc1\x3c\x28\x49\x78\x18\x3a\xfa\xb6\xdc\x61\x41\xad\x07\x61\x2c\x2d\xbe\x4b\xe0\xa8\x65\x0d\xcb\x5e\xe6\xff\x57\xe5\x3e\x58\xd5\x12\xf4\x2b\x61\x9d\x60\xfd\x6e\x28\xa8\x68\xfc\x3a\x73\x34\x25\x9c\x04\x4b\x7b\x4f\xee\xe1\xd8\x4f\xe3\x8d\x48\x43\x3f\x42\x1a\x15\x19\xea\xba\x17\xb5\xfb\x0f\x28\x88\x57\x48\x82\x15\xf6\x00\xfe\x66\x3c\x7f\xfa\x5a\x1a\x0c\x7a\x1a\x8f\x91\x07\xd6\x0e\x03\x71\xb2\x2c\x07\x47\x0f\xd2\x2f\xae\xe7\xb1\xcc\x6f\x56\xb2\x47\x53\x18\x88\x07\xea\x14\x08\x66\xac\xe9\xdb\xb9\xd2\x56\x0a\x4e\x79\x34\xfb\xe8\xcf\xa2\xea\x78\x61\x0d\x81\xa1\xf1\x3f\x07\x53\x0e\x18\x93\xa2\xc2\xdb\x6d\xff\xaa\xf9\xe8\xcf\x9d\xeb\x49\xfc\x4b\xef\xf9\x4c\x01\x11\xf8\xdb\x53\x4e\x76\x43\x60\x38\x3a\xf2\xd2\x84\xca\x7a\x2d\x58\xeb\x1c\xf8\x42\x86\x69\x4b\x41\x96\xe0\xef\x9a\x4e\x3d\x68\x56\x48\x55\x2c\xee\x51\xd8\x8a\x65\xcb\xa1\xe8\xbf\x00\x00\x00\xff\xff\x65\xca\x95\x15\xa9\x04\x00\x00") func sharedCssBaseCssBytes() ([]byte, error) { return bindataRead( @@ -188,12 +188,12 @@ func sharedCssBaseCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "shared/css/base.css", size: 1164, mode: os.FileMode(420), modTime: time.Unix(1590429739, 0)} + info := bindataFileInfo{name: "shared/css/base.css", size: 1193, mode: os.FileMode(420), modTime: time.Unix(1591002043, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _sharedCssEnlargeCss = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x92\x6f\x8b\xdb\x30\x0c\xc6\x5f\xc7\x9f\x42\x6f\x0e\xda\x51\x97\xec\xa0\x8c\x8b\x3f\x8d\x6b\x2b\x89\x38\xd7\x32\xb6\xfa\xe7\x3a\xf6\xdd\x87\xd3\x76\x47\xda\xb1\x75\x30\x08\x21\x52\xe0\x79\xf4\x7b\xa4\x35\xc6\x60\xf3\x80\xf0\x5d\x35\x89\x0b\x09\x71\xec\xa0\xa7\x13\x7a\xa3\x1a\xe1\xd4\x41\x6b\x54\x13\xb0\x97\xcb\xd7\x91\xbc\x8c\x1d\x7c\x6d\xdb\xc3\xd1\xa8\x66\x44\x1a\x46\xb9\xd4\xa3\x51\xcd\x59\x53\xf4\x78\x9a\x1a\x46\x35\x7c\xc0\xdc\x07\x3e\x76\x30\x92\xf7\x18\x8d\x52\x8d\x64\x1b\x6f\x46\xed\x7a\x53\x80\x93\x75\x24\x1f\x46\x35\x5b\xeb\xde\x87\xcc\xfb\xe8\x3b\xc8\xc3\xd6\x2e\xda\x15\x5c\x9f\xf5\xdb\x66\x69\xd4\x0f\xa5\x6e\x13\x6b\x17\xb8\xe0\x0a\x7e\xd5\x67\xe6\x9d\x76\x1c\x25\x73\x28\x95\xa7\xe7\x28\xba\xd0\x19\xab\xcf\x1b\xee\x26\x0e\x11\xcc\xba\x54\xc7\x38\xd4\x7e\xfb\x6d\xfa\x21\x78\x12\x3d\x4d\xd6\x73\xde\x75\xb0\x4f\x09\xb3\xb3\x05\x7f\xe3\x39\x65\x65\xbd\x9f\x14\x9c\x0d\x6e\x71\xb0\x79\xa1\x6f\xaa\x4b\xf8\x02\xaf\xcb\x4a\xfa\x87\x40\xf3\x25\xb6\xf6\x31\x32\xc7\x81\xf3\x15\xff\x75\xb3\x59\xc1\xe7\xab\x5d\xdf\x67\xf0\xc0\xfc\xd4\x0e\xe7\x8e\x0f\x7a\x14\x57\x77\x1d\xde\xcb\xd3\xd0\x9e\x4a\x0a\xf6\xa3\x03\x8a\x81\x22\xea\x6d\x60\xf7\xfe\xaf\x5c\x15\x09\xa3\xdc\x21\x65\x0c\x56\xe8\x80\xe6\x7a\x44\x75\x55\x9a\x33\x0d\x14\x3b\x10\x4e\x50\x11\xe7\x42\x69\x64\xe1\xb9\x8a\xdd\x16\x0e\x7b\xc1\xbf\xdd\xf7\xcb\xfc\xbc\x5f\xaa\xf0\xa7\x6e\xc6\xc0\xd6\xff\x3f\xe5\x9f\x01\x00\x00\xff\xff\xc3\x89\x55\x44\x89\x03\x00\x00") +var _sharedCssEnlargeCss = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x92\xdd\x8a\x22\x31\x10\x85\xaf\x93\xa7\xc8\xcd\x80\x2e\x46\x7a\x06\x64\x99\xce\xd3\xc4\xa4\xba\xbb\x98\x98\x0a\x49\xf9\x33\x2e\xfb\xee\x4b\xa2\xae\xab\xc2\x8e\x17\x03\xda\x74\x2a\xcd\xa9\xef\x9c\xaa\x25\xc4\x60\xf3\x08\xea\x97\x14\x89\x0a\x32\x52\xec\xd5\x80\x07\xf0\x46\x0a\xa6\xd4\xab\xce\x48\x11\x60\xe0\xd3\xdb\x1e\x3d\x4f\xbd\x7a\xed\xba\xdd\xde\x48\x31\x01\x8e\x13\x9f\xce\x93\x91\xe2\xa8\x31\x7a\x38\xb4\x82\x91\x82\x76\x90\x87\x40\xfb\x5e\x4d\xe8\x3d\x44\x23\xa5\xe0\x6c\xe3\xa5\x51\xb7\x5c\x15\x45\xc9\x3a\xe4\x4f\x23\xc5\xda\xba\x8f\x31\xd3\x36\xfa\x5e\xe5\x71\x6d\x67\xdd\x42\x9d\x7f\xcb\xf7\xd5\xdc\xc8\xdf\x52\x5e\x88\xb5\x0b\x54\x60\xa1\xfe\x9e\x8f\x44\x1b\xed\x28\x72\xa6\x50\xaa\x9f\x81\x22\xeb\x82\x47\xa8\x7d\xde\x61\xd3\x7c\x30\x43\xd6\xa5\x76\x8c\x63\xad\x77\x3f\xdb\x05\xc3\x81\x75\x23\x1b\x28\x6f\x7a\xb5\x4d\x09\xb2\xb3\x05\x1a\x71\xbd\x2c\x93\xf5\xd5\xc8\x6b\x3a\xb4\xff\x3d\x5f\xc5\x13\x8e\x02\xe5\x33\xfb\xdb\x6a\xb5\x50\xd7\xc7\xe9\x8b\x07\x03\x2d\x78\xeb\x7d\xc3\x71\x36\xb8\xd9\xce\xe6\x99\xbe\x20\xce\xd5\x0f\xf5\x36\xaf\x10\xff\x99\x4e\x3e\xcd\xa0\x7b\xc8\xff\xdf\x6e\x0f\xf1\x3c\x35\xee\x2f\xf4\x30\x2e\xee\x2a\xb4\xe5\xa7\x2d\x79\x2c\x29\xd8\xcf\x5e\x61\x0c\x18\x41\xaf\x03\xb9\x8f\x6b\x8a\x18\x27\xc8\xc8\x77\xa1\x51\x64\x88\x7c\xe7\x20\x43\xb0\x8c\x3b\x30\xe7\xf5\xaa\x43\xd4\x94\x71\xc4\xd8\x2b\xa6\xa4\xaa\xa3\x5b\xa1\x34\x11\xd3\xad\x8a\x5d\x17\x0a\x5b\x86\xaf\x36\xff\xe5\x76\xf1\x5f\xaa\xf0\x55\x37\x43\x20\xeb\xbf\x4f\xf9\x4f\x00\x00\x00\xff\xff\x70\x98\x64\x5b\xa3\x03\x00\x00") func sharedCssEnlargeCssBytes() ([]byte, error) { return bindataRead( @@ -208,7 +208,7 @@ func sharedCssEnlargeCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "shared/css/enlarge.css", size: 905, mode: os.FileMode(420), modTime: time.Unix(1590429739, 0)} + info := bindataFileInfo{name: "shared/css/enlarge.css", size: 931, mode: os.FileMode(420), modTime: time.Unix(1591005571, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -228,7 +228,7 @@ func sharedCssGalleryCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "shared/css/gallery.css", size: 750, mode: os.FileMode(420), modTime: time.Unix(1590429739, 0)} + info := bindataFileInfo{name: "shared/css/gallery.css", size: 750, mode: os.FileMode(420), modTime: time.Unix(1591000814, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -253,7 +253,7 @@ func sharedJsBlehJs() (*asset, error) { return a, nil } -var _sharedJsEnlargeJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x59\xdd\x6f\xe3\xb8\x11\x7f\xb6\xff\x8a\x29\xae\x80\xe4\xc4\xb1\x9d\x2d\xf6\x65\x53\x2f\x70\xc8\x06\xb8\x02\x2d\x5a\x6c\xb6\xd8\xdb\x2b\x8a\x0d\x23\x8d\x2d\xf6\x68\x52\x20\xa9\xd8\xde\x85\xff\xf7\x82\x1f\x12\x29\x99\x4e\x9c\x16\x07\xdc\x93\x2d\x72\x3e\x7e\xf3\xc1\x99\xa1\x84\xbb\x5a\x48\x0d\x25\xae\x48\xc3\x34\x14\x8c\x28\x05\x77\x9c\x11\xb9\x46\xf8\x3e\x1e\xcd\x2f\xc6\xa3\x5a\xe2\x8a\xee\x60\x09\xd9\x0f\x4f\x14\xb7\x57\xd9\xcd\x78\x84\x0c\x61\x09\xbc\x61\xec\x66\x3c\x2a\x98\x50\x78\xd7\x5b\x11\x5c\x23\xd7\xaa\xb7\x58\x57\x42\x8b\xfe\x8a\x44\x26\x48\x19\xaf\x8d\x47\xdf\x84\xd8\xc0\x12\x16\x37\xe3\xd1\xce\xff\xee\xdd\xef\x78\xb4\x11\x8d\xc2\x0f\x62\xcb\x61\x09\x2b\xc2\x14\x9a\xc5\x5a\xa2\x42\xf9\x84\xe5\x7d\x21\x05\x63\xb0\x84\xef\x87\x9e\x70\xe5\x97\xc6\x23\x51\x23\xbf\x35\x68\x3f\xd1\x0d\x8a\x46\x07\x28\x17\xf3\xb1\x85\xad\xb4\x6c\x0a\x2d\x64\x8e\x0c\xa7\xe0\x4c\x5f\xb6\x86\x4f\x8c\x4b\x46\xba\xa2\x6a\xd6\x39\xc5\xfd\xb9\x69\xd7\x23\xf4\x6e\x61\xd7\x7b\xda\xf7\x9e\x12\xe6\x04\xf1\x29\x9b\xba\xcd\x23\xcb\xdc\x4e\x67\xc0\x67\x49\xea\x1a\x65\x3e\xe9\x98\x1e\x29\x2f\x7f\x11\x62\x73\x2b\xb8\x96\x82\x29\xb3\x15\xef\xdd\xd3\x6f\x38\x20\xff\x4c\x79\x29\xb6\x43\xc2\x4f\xa2\x29\xaa\x01\xe5\x07\x49\xd6\x83\x25\x07\xdc\x33\x23\xc3\x99\x01\xc4\xcb\xdb\x8a\xb2\x32\xb7\x54\xc8\xd0\xb0\x1c\x62\xc7\x77\xb8\x83\xa7\x5d\xaa\x95\xa2\x68\x36\xc8\xf5\xac\x90\x48\xb4\xc9\x36\xf3\x94\x67\x25\x7d\xca\x82\x62\xa3\xc7\xe6\xf0\x5f\xa9\xd2\x33\x52\x96\x79\x86\x2e\x99\x07\x44\x4a\xef\x19\xce\x4a\xaa\x6a\x46\x4c\x4c\x32\x2e\x38\x66\x09\x12\x51\x93\x82\x6a\x4b\xb2\xc8\x82\x23\xbe\x45\x9e\xbc\x7b\x05\xc0\x01\xdf\x09\xb0\x57\x86\xec\xaa\xf0\x74\x03\xe8\x47\x7e\x1c\xc8\xb4\xd4\xb1\xbe\xbf\xf0\xe7\x11\x92\x01\x3e\x4b\xff\x2c\x32\xca\x93\x2c\x94\x73\x94\x9f\x70\x67\x8e\x55\x66\x72\x0d\x2e\xb3\x04\x59\x25\x71\x65\xab\x49\x76\xd2\x2d\x49\x1b\x2d\xf7\xa4\x1f\x83\xbf\x37\xfa\x75\xc6\x39\x86\x67\xad\x13\x8d\x4e\x33\x1d\xdb\x77\x95\xa5\xe8\xfe\x57\x03\x1d\x7b\x64\x61\x54\x58\xcf\xb1\xaf\x25\x3f\x65\x9d\xdd\x4f\xd1\xf7\x0c\xb3\xf5\x31\x3b\x26\x4a\x58\x95\x4c\xc7\x96\x61\xd2\x2b\x4b\x51\x3b\x38\xef\xa4\x44\x3c\x27\xed\xf1\x24\x2f\x1d\x90\x48\x54\x04\xaa\xd7\x7c\x4e\x61\xa2\x9b\x75\x24\x3d\xb0\x9c\x82\xe4\x29\xd2\x3c\x4a\x16\xc6\x81\x59\xd2\xc6\x23\xd4\x81\x31\x06\x1d\x7a\xe8\x99\x90\x3d\xc3\x49\xc0\x66\x3f\x45\xff\x4a\xb0\x9e\xad\x2d\xe8\xc7\xdd\x26\x14\xf4\x50\x09\x48\x59\xde\x3d\x21\xd7\x06\x16\x72\x94\x79\x56\x30\x5a\xfc\x9a\x4d\x21\xc7\x09\x2c\xdf\x5b\x9e\x11\x1a\x57\x18\xb2\x0f\x6e\x4a\x71\x8d\x26\xc8\xfa\x51\x87\x23\x04\x17\x70\xb9\x98\xbd\x79\x3b\x05\xbb\x64\xda\xb6\x19\x70\x4c\x73\x9b\x6d\x61\x0e\x6f\x52\x1b\x95\xd9\x88\x84\x96\x92\x6c\x9d\x92\xc3\xd4\xf5\xe5\x64\x39\xf8\x4d\xd0\x5f\xfd\x46\xe8\xdb\xa0\xb8\x36\xdf\x9b\x63\xda\xf4\x3c\xb6\xc7\xa6\xb2\xd7\xd9\xd4\x25\xd1\x68\x35\x1a\x39\x16\xf4\xe4\xc8\x3d\x5d\xfa\xfc\x7f\xc2\x5a\xb4\xed\x04\x62\xf1\x6e\xed\x43\x42\xb2\x44\x45\xbf\xe1\x6b\x65\xfb\x39\x06\xbe\x8f\xc3\x9a\x9b\x63\x7a\xb3\x47\x42\x5f\x2d\x28\xd7\x28\x4b\xb1\xe5\x83\x60\x1f\x4d\x75\x5a\x36\x18\x42\x13\x1f\x21\x37\x5e\x14\x8d\x54\x42\x9a\x83\xb6\x96\xe4\xf1\x91\xf2\x75\x96\xce\xbb\x67\x91\x6c\xc4\x13\x9e\x97\x76\x74\x05\x79\x1f\xa4\xb3\xb6\x0d\x1f\xe1\x39\xce\x8c\x38\x53\x4b\x7e\x9e\x42\x78\xf8\xe2\x04\x0c\x73\x6c\x74\x78\x3d\xdc\xa6\x7e\xc9\x6d\xdd\x30\x7c\x9e\xdf\x8e\x7c\xd6\x65\xbb\x1f\x42\x5f\x8a\xe8\xb6\x42\x64\xe7\x79\x70\x3e\x87\x1f\x95\x6a\x36\x08\xab\x86\x31\x50\x85\x44\xe4\xc3\x13\x8d\xb3\x12\x99\x26\x5f\xdc\x81\x5e\x2c\xde\xc0\x05\x74\xfb\xc6\xab\x05\xa3\xad\x83\xdd\xdf\x2f\x67\x9d\x60\x73\x7f\xf9\x89\xa8\xca\x5b\x64\xc7\x66\xa8\x88\xaa\x60\x09\xfe\x78\x30\x51\x10\x4d\x05\x9f\x99\x65\x23\xc3\x84\xfc\x0f\xe6\x61\xa6\x34\x91\x5a\x7d\xa6\xba\xca\xa3\x3b\xcc\x64\x12\x05\xc1\x36\x6f\x6f\xa9\x44\xdd\x48\x6e\x61\x74\xba\x68\x09\x4b\xab\x70\x26\xb1\x66\xa4\xc0\x58\xd2\x14\xb2\xa8\x93\x18\xac\x39\x2d\x5b\xe8\x5b\xa2\x8b\x2a\xc2\x7e\xf2\x34\x1b\xe9\x45\x45\xf8\xba\x3b\xd1\xad\xd5\xcf\x15\x9e\xe0\x19\xaf\x4f\xa1\xfe\x87\xab\x6d\x06\x84\x55\x39\x9f\x43\xa5\x75\xad\xde\xcd\xe7\x05\xe1\xb4\x51\x38\x2b\xc4\x66\xfe\xc3\x0a\x89\x5e\x6e\x4a\x7e\xf5\x1f\xf2\x44\x54\x21\x69\xad\xbf\x8a\x1a\x25\xd1\x42\xaa\xaf\xa2\x36\xee\x24\xec\x6b\x51\x11\xca\x29\x5f\x8f\x47\x23\x86\x1a\x7c\xe5\x0c\x57\xc8\x70\xb8\xa2\x0b\xda\xbf\x68\xf9\x6f\xef\xe0\xc0\x90\x22\x32\x29\x2d\x91\xeb\x7b\x59\x38\x97\x7b\x81\x9e\x2c\x0e\xd2\xd1\x48\xe1\x17\x6e\x52\x14\xd1\x1d\xe7\x91\x89\xe2\x57\x77\x56\x00\x99\xc2\xe7\x44\xba\xc6\xff\x9c\xb4\xee\xc6\x74\x08\x0e\x37\xd5\xbf\x73\xf7\xab\xee\xc3\xc6\x54\xda\xb7\xb2\x3f\x89\xd0\x32\x0d\x3c\x35\xaf\x78\x44\xf3\x39\xfc\xd3\x36\x03\xd0\x15\x82\xe9\x11\x20\x56\xf6\x3f\xdd\x90\x35\x8e\x47\xa1\x55\xc4\x25\xe2\xb8\xda\x6c\x69\xa9\xcd\x11\x7b\xf8\xe3\x77\x4b\xa1\x6c\x43\x3e\xd4\xbb\x87\xe4\x74\xe4\x98\x2a\xa4\xeb\x4a\x0f\xb9\xaa\x96\xcb\x9c\x27\x61\x3c\x8a\x8f\xcd\x3a\x7f\x70\x50\x4a\x87\x52\x0b\xe8\x6b\x9a\x42\x5f\xc6\x43\x48\xfc\xae\x58\x18\x8b\xdd\xc3\x91\xf7\xfd\x0b\x1d\x33\x03\x6e\x6a\x33\x96\xe5\x51\x31\x72\x37\x76\xa2\xf0\xbe\x20\x2c\x3a\x51\xfb\x21\xa3\x63\xda\x27\x67\x10\xbf\xe8\xe0\xc5\xc5\xae\xfd\x9f\x50\xb0\x4b\x2b\xd8\x25\xa7\x9f\x58\xc1\xf6\x4c\x05\xc7\x31\xd1\x92\x70\xb5\x12\xd2\x38\xe5\xc1\x3e\x30\xa2\xf1\x4f\x65\xee\xdd\xbb\x3b\xd4\xbb\xce\xd7\x7b\xfb\xb0\x98\x80\x32\x62\x5b\x92\xa4\xce\xc3\xe4\xc1\x47\xc0\x74\xd0\xdd\x14\xf6\x51\x10\x76\x70\xb9\x84\x5d\xe4\xd7\xcb\x25\xec\x3d\xb9\xef\x17\x8f\xfb\x29\x04\x2e\x57\x6a\x39\x6e\x7f\x79\x31\x7c\x70\x09\x8f\xfb\x64\x0c\xe7\x73\xb8\xb5\x55\x14\xa4\xe9\x07\x9d\x58\x57\x5a\xcb\x8f\x66\xd1\xd4\x2e\xaf\x65\x1e\x3c\xea\xb9\x3f\xa2\xb5\x1b\x70\x47\x95\xa6\x7c\x0d\x62\xb5\x52\xa8\x83\x55\x17\xcb\x9e\xb0\xc8\xc0\xc4\x4e\x24\xd0\xf7\xee\xa1\xb8\xab\x25\xe4\x3d\x70\x57\x70\x3d\x81\x8b\x9e\xe7\x4e\xd1\xec\xbd\x0a\x7f\xdc\x39\x6e\xc1\x58\x32\x38\x06\xde\xd6\xb6\x41\x68\xa2\x69\x01\x3e\xf3\x7c\x2e\x50\xc1\xa7\xd0\x66\xde\xd4\x9e\x46\x17\x13\x53\x9f\xda\x75\x78\x1f\x6d\x18\xb5\x77\x5c\x35\x12\xa1\x40\xae\x25\x96\xa1\x77\x46\x2c\x57\x9e\x65\x0e\x6f\xda\x8e\x6a\xdb\x45\xd0\x0b\xef\x4d\xae\xb5\x22\xef\x4d\xaf\x06\x45\x4b\x8c\xc4\x2d\xa2\x12\x38\xe4\xfe\xf3\xb1\xb2\x18\x60\x39\x94\x35\x20\x1e\x16\x57\x4f\x15\x69\x88\x4b\x7d\xe4\x3a\x9b\x8f\xae\x92\x84\x04\x6c\xdb\xed\x2d\xa9\xa1\xa2\xeb\x0a\x24\x2a\xc1\x1a\x0b\xd4\x25\x01\xd1\x70\x3d\x7b\x1b\xa8\x98\xd8\xc6\x44\x36\x62\x1d\x8d\xcb\xdc\x0d\xd9\xf9\x03\xf1\x37\xa2\xab\xd9\x86\xec\xf2\xeb\xd9\x5b\x98\x07\xbd\x53\x43\x6f\xb3\xdf\xc3\x77\x84\x94\xe7\x1d\x87\x43\x7a\x3d\x99\xb6\xe2\xda\xd2\xb9\x46\x1d\x04\xe5\x21\xe8\x36\x81\x88\xaa\xb1\xd0\x36\xe5\x66\x44\xc2\xfb\x13\xf7\xb3\x44\x61\x0c\x31\xb0\xcd\x11\xa8\x72\x6e\xc3\xd2\x54\x79\xdb\x58\x62\x77\x9f\x16\xeb\x2a\xdf\x30\x4c\x27\xe4\xba\xde\xf3\xac\xe0\xaa\x27\xb8\x8a\xa2\x6b\x3c\x11\x93\x7a\x67\x78\x49\x56\xed\xf6\x1d\x74\xd3\xb4\x3b\xc7\x9f\x8d\x25\x53\xb3\x57\x1d\xed\xfd\x64\xd1\x98\xcd\x43\xe4\xec\xc8\xa7\x09\x0d\x44\xbe\xeb\x55\xfc\x1e\xd8\xa1\x28\x15\x50\x86\x19\xac\x1d\x0c\x38\xd1\x8d\x24\xcc\x02\x8c\xce\x58\xac\xac\xb3\x27\xc9\x64\xad\xea\xcc\x1a\x92\x04\xe3\x2c\xa4\xd4\x21\x1a\xe8\x08\xd3\xd4\x33\x5a\x8e\x88\x8e\xf4\x84\x1b\x41\x7f\xe2\xea\x0f\xbe\x37\xf1\x72\x3b\x9e\x85\xf7\x49\xaa\x12\x61\x7a\xf0\xc3\x7f\x52\x94\x99\x71\x13\xc2\xfc\x72\xbb\x5e\xd1\x12\xc3\x04\x5e\x75\x57\x77\x77\xc8\xb5\x29\x92\xca\x7d\xd0\xa8\x85\xa2\xe6\xa4\x9f\xf8\xe0\x61\x87\x03\x7f\x45\x70\x1c\x3f\x9f\xfa\x36\x62\x07\x95\x1e\xe9\x97\x00\x28\xf9\xae\x3f\xcc\xc1\x03\x1a\x7f\x3f\xb5\x17\x12\x65\x28\x09\x63\x96\xae\x7b\xd7\xf6\x28\xca\x7d\xfb\x65\xe0\x09\xe5\xca\x94\xad\x25\x64\x15\x2d\x4b\xe4\xee\xfb\x40\x97\x81\xc3\x8f\x4d\x3e\xf1\x0a\x86\x44\xfa\xa5\x13\x84\x6d\x87\x48\xee\xc2\x12\x14\xea\x56\x40\x3e\xb8\x45\x27\xbf\x5c\x5c\xcf\x16\xed\x15\xf9\x7a\xb1\x68\xe3\xe3\x82\xd5\xc6\xe7\x23\x2a\x2d\x92\xf1\xe9\xf9\xf6\x93\xc8\xd3\xf1\x9a\x42\x3a\x38\x93\x54\x30\x06\x5f\x55\x5e\x0e\x44\x77\xd9\x78\x29\x12\x4f\x54\xd1\x47\x86\xbf\xaf\x50\x9c\xcc\xab\x73\x3e\x48\xb9\xa0\x75\x51\x93\xb8\x36\x57\x65\x99\xd3\x72\x0a\x18\xf5\xda\x7b\xba\xa9\x19\x42\xdb\x42\xed\x22\x86\xf7\xf6\xd1\x3d\x1d\x2e\xfd\x6d\xca\x70\xe1\x86\x70\xd3\xcc\x7d\xe0\xdc\x30\x11\x09\x49\xbf\x30\x79\xc5\x9b\xce\xd4\x7b\x89\x13\x78\x86\xaf\x3b\x5a\x5b\x43\x3d\x8b\x4c\x4e\x5d\xa2\x61\x69\xf6\x2d\xf7\x61\xfc\xdf\x00\x00\x00\xff\xff\x43\x9a\xed\xd3\xdc\x1e\x00\x00") +var _sharedJsEnlargeJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x59\xdd\x6f\xe3\xb8\x11\x7f\xb6\xff\x8a\x29\xae\x80\xe4\xc4\xb1\x9d\x2d\xee\x65\x53\x2f\x70\xc8\x06\xb8\x02\x2d\x5a\x5c\xb6\xd8\xdb\x2b\x8a\x0d\x23\x8d\x2d\xf6\x68\x52\x20\xa9\xd8\xde\x85\xff\xf7\x82\x1f\x12\x29\x99\xf6\x3a\x57\x1c\xd0\x27\x5b\xe4\x7c\xfc\xe6\x83\x33\x43\x09\x77\xb5\x90\x1a\x4a\x5c\x91\x86\x69\x28\x18\x51\x0a\x1e\x38\x23\x72\x8d\xf0\x75\x3c\x9a\x5f\x8d\x47\xb5\xc4\x15\xdd\xc1\x12\xb2\xef\x5e\x28\x6e\x6f\xb2\xbb\xf1\x08\x19\xc2\x12\x78\xc3\xd8\xdd\x78\x54\x30\xa1\xf0\xa1\xb7\x22\xb8\x46\xae\x55\x6f\xb1\xae\x84\x16\xfd\x15\x89\x4c\x90\x32\x5e\x1b\x8f\xbe\x08\xb1\x81\x25\x2c\xee\xc6\xa3\x9d\xff\xdd\xbb\xdf\xf1\x68\x23\x1a\x85\xef\xc5\x96\xc3\x12\x56\x84\x29\x34\x8b\xb5\x44\x85\xf2\x05\xcb\xc7\x42\x0a\xc6\x60\x09\x5f\x0f\x3d\xe1\xca\x2f\x8d\x47\xa2\x46\x7e\x6f\xd0\x7e\xa0\x1b\x14\x8d\x0e\x50\xae\xe6\x63\x0b\x5b\x69\xd9\x14\x5a\xc8\x1c\x19\x4e\xc1\x99\xbe\x6c\x0d\x9f\x18\x97\x8c\x74\x45\xd5\x4c\x55\x62\x4b\xf9\x3a\xe0\xf0\xeb\x9d\xb3\xdc\x9f\x6e\x3d\xb2\xca\x2d\xec\x7a\x4f\xfb\xde\x53\xc2\xcc\x20\x3e\x65\x6b\xb7\x79\x64\xb1\xdb\xe9\x0c\xfb\x28\x49\x5d\xa3\xcc\x27\x1d\xd3\x33\xe5\xe5\x2f\x42\x6c\xee\x05\xd7\x52\x30\x65\xb6\xe2\xbd\x47\xfa\x05\x07\xe4\x1f\x29\x2f\xc5\x76\x48\xf8\x41\x34\x45\x35\xa0\x7c\x2f\xc9\x7a\xb0\xe4\x80\x7b\x66\x64\x38\x33\x80\x78\x79\x5f\x51\x56\xe6\x96\x0a\x19\x1a\x96\x43\x1c\x90\x0e\x77\x88\x80\x4b\xc1\x52\x14\xcd\x06\xb9\x9e\x15\x12\x89\x36\x59\x68\x9e\xf2\xac\xa4\x2f\x59\x50\x6c\xf4\xd8\xdc\xfe\x2b\x55\x7a\x46\xca\x32\xcf\xd0\x25\xf9\x80\x48\xe9\x3d\xc3\x59\x49\x55\xcd\x88\x89\x49\xc6\x05\xc7\x2c\x41\x22\x6a\x52\x50\x6d\x49\x16\x59\x70\xc4\x97\xc8\x93\x0f\xaf\x00\x38\xe0\x3b\x01\xf6\xc6\x90\xdd\x14\x9e\x6e\x00\xfd\xc8\x8f\x03\x99\x96\x3a\xd6\xf7\x17\x7e\x1e\x21\x19\xe0\xb3\xf4\x67\x91\x51\x9e\x64\xa1\x9c\xa3\xfc\x80\x3b\x73\xdc\x32\x93\x6b\x70\x9d\x25\xc8\x2a\x89\x2b\x5b\x65\xb2\x93\x6e\x49\xda\x68\xb9\x27\xfd\x18\xfc\xbd\xd1\xaf\x33\xce\x31\x9c\xb5\x4e\x34\x3a\xcd\x74\x6c\xdf\x4d\x96\xa2\xfb\xad\x06\x3a\xf6\xc8\xc2\xa8\xe0\x5e\x62\x5f\x4b\x7e\xca\x3a\xbb\x9f\xa2\xef\x19\x66\xeb\x66\x76\x4c\x94\xb0\x2a\x99\x8e\x2d\xc3\xa4\x57\x96\xa2\x36\x71\xd9\x49\x89\x78\x4e\xda\xe3\x49\xbe\x75\x40\x22\x51\x11\xa8\x5e\x53\x3a\x85\x89\x6e\xd6\x91\xf4\xc0\x72\x0a\x92\xa7\x48\xf3\x28\x59\x18\x07\x66\x49\x1b\x8f\x50\x07\xc6\x18\x74\xe8\xad\x17\x42\xf6\x0c\x27\x01\x9b\xfd\x14\xfd\x2b\xc1\x7a\xb6\xb6\xa0\x1f\x77\x9b\x50\xd0\x43\x25\x20\x65\xf9\xf0\x82\x5c\x1b\x58\xc8\x51\xe6\x59\xc1\x68\xf1\x6b\x36\x85\x1c\x27\xb0\x7c\x67\x79\x46\x68\x5c\x61\xc8\xde\xbb\xe9\xc5\x35\x9a\x20\xeb\x07\x1d\x8e\x10\x5c\xc1\xf5\x62\xf6\xe6\xfb\x29\xd8\x25\xd3\xce\xcd\xe0\x63\x9a\xdb\x6c\x0b\x73\x78\x93\xda\xa8\xcc\x46\x24\xb4\x94\x64\xeb\x94\x1c\xa6\xae\x2f\x27\xcb\xc1\xef\x82\xfe\xe6\x77\x42\xdf\x06\xc5\xb5\xf9\x10\x8c\x28\x3d\x8f\xed\xb1\xa9\xec\x75\x36\x75\x49\x34\x5a\x8d\x46\x8e\x05\x3d\x39\x72\x4f\x97\x3e\xff\x9b\xb0\x16\x6d\x3b\x81\x58\xbc\x5b\xfb\x90\x90\x2c\x51\xd1\x2f\x68\xfc\x1e\xdc\x4e\x57\x90\xc7\x03\x9c\x13\xe1\x51\x06\xf5\x3e\x1a\x87\x13\xde\xf2\xb3\x0e\x7c\x1d\x87\x35\x37\xeb\x04\x0f\xf6\xce\xc5\x11\xb6\x5a\x50\xae\x51\x96\x62\xcb\x5f\x91\x18\xf1\x60\xa8\x65\x83\x61\x27\xd6\xe6\x26\x94\xa2\x91\x4a\x48\x73\x56\xd7\x92\x3c\x3f\x53\xbe\xce\xd2\xa9\x7b\x11\xd0\x8d\x78\xc1\xcb\x80\x76\x1e\xee\xc0\xf6\x7c\x5c\x13\x9e\xe3\xcc\x88\x33\x65\xe9\xe7\x29\x84\x87\x4f\x4e\xc0\x30\x5d\x8f\xa2\xf0\x0a\xd8\x4d\xfd\x1b\xbd\xdb\x8d\xdd\x97\xb9\xf7\xc8\xb5\xdd\xb9\xf2\xe3\x6e\x6f\x6e\x4d\xe0\xdd\x56\x88\xec\x32\xac\xf3\x39\xfc\xa0\x54\xb3\x41\x58\x35\x8c\x81\x2a\x24\x22\x1f\xd6\x0e\x9c\x95\xc8\x34\xf9\xe4\x4a\xc7\x62\xf1\x06\xae\xa0\xdb\x37\x4e\x2f\x18\x6d\xfd\xef\xfe\x7e\xba\xa8\x56\x98\x1b\xd4\x8f\x44\x55\xde\x22\x3b\xa0\x43\x45\x54\x05\x4b\xf0\x07\x91\x89\x82\x68\x2a\xf8\xcc\x2c\x1b\x19\x26\x23\xfe\x60\x1e\x66\x4a\x13\xa9\xd5\x47\xaa\xab\x3c\xba\x2d\x4d\x7c\x82\x84\x31\xc1\x5b\x2a\x51\x37\x92\x5b\x18\x9d\x2e\x5a\xc2\xd2\x2a\x9c\x49\xac\x19\x29\x30\x96\x34\x85\x2c\xea\x59\x06\x6b\x4e\xcb\x16\xfa\x96\xe8\xa2\x8a\xb0\x9f\xac\x1b\x46\x7a\x51\x11\xbe\xc6\xb6\x2e\xb5\x56\x9f\x2b\x71\xc1\x33\x5e\x9f\x42\xfd\x0f\x57\x45\x0d\x08\xab\x72\x3e\x87\x4a\xeb\x5a\xbd\x9d\xcf\x0b\xc2\x69\xa3\x70\x56\x88\xcd\xfc\xbb\x15\x12\xbd\xdc\x94\xfc\xe6\x3f\xe4\x85\xa8\x42\xd2\x5a\x7f\x16\x35\x4a\xa2\x85\x54\x9f\x45\x6d\xdc\x49\xd8\xe7\xa2\x22\x94\x53\xbe\x1e\x8f\x46\x0c\x35\xf8\x1a\x1d\x2e\xb1\xe1\xec\x45\x57\xc1\x7f\xd1\xf2\xdf\xde\xc1\x81\x21\x45\x64\x52\x5a\x22\xd7\x8f\xb2\x70\x2e\xf7\x02\x3d\x59\x1c\xa4\xa3\xe1\xc5\x2f\xdc\xa5\x28\xa2\xdb\xd4\x33\x13\xc5\xaf\xee\xac\x00\x32\x85\xe7\x44\xba\x11\xe3\x9c\xb4\xee\x6e\x76\x08\x0e\x37\x7d\xa6\x73\xf7\xab\x6e\xde\xc6\x54\xda\xb7\xb2\x3f\xf3\xd0\x32\x0d\x3c\x35\x19\x79\x44\xf3\x39\xfc\xd3\xf6\x14\xd0\x15\x82\xe9\x46\x20\x56\xf6\x3f\xdd\x90\x35\x8e\x47\x71\xc7\x49\xb7\x0e\x57\x6d\xb6\xb4\xd4\xe6\x88\x3d\xfd\xf1\xab\xeb\x5e\xb6\xf5\x1f\xea\xdd\x53\xb2\x1e\x3a\xa6\x0a\xe9\xba\xd2\x43\xae\xaa\xe5\x32\xe7\x49\x18\x8f\xe2\x73\xb3\xce\x9f\x1c\x94\xd2\xa1\xd4\x02\xfa\x9a\xa6\xd0\x97\xf1\x14\x12\xbf\x2b\x16\xc6\x62\xf7\x70\xe4\x7d\xff\x4a\xc9\x4c\x9b\x9b\xda\x0c\x80\x79\x54\x8c\xdc\xbb\x01\xa2\xf0\xb1\x20\x2c\x3a\x51\xfb\x21\xa3\x63\xda\x27\xa7\x1d\xbf\xe8\xe0\xc5\xc5\xae\xfd\x9f\x50\xb0\x4b\x2b\xd8\x25\xe7\xac\x58\xc1\xf6\x42\x05\xc7\x31\xd1\x92\x70\xb5\x12\xd2\x38\xe5\xc9\x3e\x30\xa2\xf1\x4f\x65\xee\xdd\xbb\x3b\xd4\xbb\xce\xd7\x7b\xfb\xb0\x98\x80\x32\x62\x5b\x92\xa4\xce\xc3\xe4\xc9\x47\xc0\x34\xd8\xdd\x14\xf6\x51\x10\x76\x70\xbd\x84\x5d\xe4\xd7\xeb\x25\xec\x3d\xb9\xef\x17\xcf\xfb\x29\x04\x2e\x57\x6a\x39\x6e\x7f\xf9\x66\xf8\xe0\x1a\x9e\xf7\xc9\x18\xce\xe7\x70\x6f\xab\x28\x48\xd3\x0f\x3a\xb1\xae\xb4\x96\x3f\x99\x45\x53\xbb\xbc\x96\x79\xf0\xa8\xe7\xfe\x09\xad\xdd\x80\x3b\xaa\x34\xe5\x6b\x10\xab\x95\x42\x1d\xac\xba\x5a\xf6\x84\x45\x06\x26\x76\x22\x81\xbe\x77\x0f\xc5\xdd\x2c\x21\xef\x81\xbb\x81\xdb\x09\x5c\xf5\x3c\x77\x8a\x66\xef\x55\xf8\xe3\xce\x71\x0b\xc6\x92\xc1\x31\xf0\xb6\xb6\x0d\x42\x13\x4d\x0b\xf0\x99\xe7\x73\x81\x0a\x3e\x85\x36\xf3\xa6\xf6\x34\xba\x98\x98\xfa\xd4\xae\xc3\xbb\x68\xc3\xa8\x7d\xe0\xaa\x91\x08\x05\x72\x2d\xb1\x0c\xbd\x33\x62\xb9\xf1\x2c\x73\x78\xd3\x76\x54\xdb\x2e\x82\x5e\x78\x67\x72\xad\x15\xf9\x68\x7a\x35\x28\x5a\x62\x24\x6e\x11\x95\xc0\x21\xf7\x9f\x8f\x95\xc5\x00\xcb\xa1\xac\x01\xf1\xb0\xb8\x7a\xaa\x48\x43\x5c\xea\x23\xd7\xd9\x7c\x74\x95\x24\x24\x60\xdb\x6e\xef\x49\x0d\x15\x5d\x57\x20\x51\x09\xd6\x58\xa0\x2e\x09\x88\x86\xdb\xd9\xf7\x81\x8a\x89\x6d\x4c\x64\x23\xd6\xd1\xb8\xcc\xdd\x90\x9d\x3f\x10\x7f\x23\xba\x9a\x6d\xc8\x2e\xbf\x9d\x7d\x0f\xf3\xa0\x77\x6a\xe8\x6d\xf6\x7b\xf8\x8e\x90\xf2\xbc\xe3\x70\x48\x6f\x27\xd3\x56\x5c\x5b\x3a\xd7\xa8\x83\xa0\x3c\x04\xdd\x26\x10\x51\x35\x16\xda\xa6\xdc\x8c\x48\x78\x77\xe2\x26\x98\x28\x8c\x21\x06\xb6\x39\x02\x55\xce\x6d\x58\x9a\x2a\x6f\x1b\x4b\xec\xee\xd3\x62\x5d\xe5\x1b\x86\xe9\x84\x5c\xd7\x7b\xce\x0a\xae\x7a\x82\xab\x28\xba\xc6\x13\x31\xa9\x77\x86\x97\x64\xd5\x6e\xdf\x42\x37\x4d\xbb\x73\xfc\xd1\x58\x32\x35\x7b\xd5\xd1\xde\x8f\x16\x8d\xd9\x3c\x44\xce\x8e\x7c\x9a\xd0\x40\xe4\xdb\x5e\xc5\xef\x81\x1d\x8a\x52\x01\x65\x98\xc1\xda\xc1\x80\x13\xdd\x48\xc2\x2c\xc0\xe8\x8c\xc5\xca\x3a\x7b\x92\x4c\xd6\xaa\xce\xac\x21\x49\x30\xce\x42\x4a\x1d\xa2\x81\x8e\x30\x4d\x9d\xd1\x72\x44\x74\xa4\x27\xdc\x08\xfa\x13\x57\x7f\xf0\xbd\x8b\x97\xdb\xf1\x2c\xbc\xb9\x32\xf7\xf0\x6e\x7a\xf0\xc3\x7f\x52\x94\x99\x71\x13\xc2\xfc\x72\xbb\x5e\xd1\x12\xc3\x04\x5e\x89\xde\x30\x12\x3e\xda\xb8\xcb\x73\x77\xf8\xb5\x29\x9e\xca\x7d\x52\xa9\x85\xa2\xa6\x02\x9c\xf8\xe4\x62\x87\x06\x7f\x75\x70\x1c\x3f\x9f\xfa\x3a\x63\x07\x98\x1e\xe9\xa7\x00\x34\xf9\xb5\x21\xcc\xc7\x03\x1a\x7f\x9d\xb5\x17\x15\x65\x28\x09\x63\x96\xae\x7b\xdb\xf7\x2c\xca\x7d\xfb\x6d\xe2\x05\xe5\xca\x94\xb3\x25\x64\x15\x2d\x4b\xe4\xee\x0b\x45\x97\x99\xc3\xcf\x60\x3e\x21\x0b\x86\x44\xfa\xa5\x13\x84\x6d\xe7\x48\xee\xc2\x12\x14\xea\x56\x40\xf4\xd2\x65\x60\x4c\xf4\xed\xe4\x76\xb6\x68\xaf\xce\xb7\x8b\x45\x1b\x37\x17\xc4\x33\x1f\xdb\xba\x76\xae\x45\x32\x70\x3d\xa7\x7f\x10\x79\x3a\x90\x53\x48\x47\x6d\x92\x8a\xd2\xe0\x83\xcf\xb7\x23\xd4\xdd\x4e\xbe\x15\xa2\x17\xaa\xe8\x33\xc3\xff\xaf\x18\x9d\x4c\xb8\x4b\xbe\x95\xb9\x68\x76\xe1\x94\xb8\x36\x77\x6b\x99\xd3\x72\x0a\x18\x35\xe7\x47\xba\xa9\x19\x42\xdb\x73\xed\x22\x86\x4f\x0a\xd1\xc5\x1e\xae\xfd\xf5\xcb\x70\xe1\x86\x70\xd3\xfd\x7d\xe0\xdc\xf4\x11\x09\x49\xbf\x61\x79\xc5\x4b\xd8\xd4\x8b\x8c\x13\x78\x86\xef\x47\x5a\x5b\x43\x01\x8c\x4c\x4e\xdd\xba\x61\x69\xf6\x2d\xf7\x61\xfc\xdf\x00\x00\x00\xff\xff\xea\x04\x59\xb4\x8f\x1f\x00\x00") func sharedJsEnlargeJsBytes() ([]byte, error) { return bindataRead( @@ -268,12 +268,12 @@ func sharedJsEnlargeJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "shared/js/enlarge.js", size: 7900, mode: os.FileMode(420), modTime: time.Unix(1590429739, 0)} + info := bindataFileInfo{name: "shared/js/enlarge.js", size: 8079, mode: os.FileMode(420), modTime: time.Unix(1591003113, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _sharedJsGalleryJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x57\xdd\x6e\xdb\xb8\x12\xbe\x96\x9e\x62\x0e\x50\xc0\x52\x62\xcb\x49\xce\xb9\x8a\xeb\x02\xa7\xdd\xa0\x0d\xd0\x45\x17\x9b\xb6\x7b\x51\x14\x08\x23\x8d\x25\x62\x29\x52\x4b\x52\xb1\xdd\xd4\xef\xbe\xe0\x8f\x24\x4a\x76\x8a\x62\x81\xbd\x8a\x33\x1c\xce\xcc\x37\xfc\xe6\x47\x39\x23\x4a\xc1\x7b\xb2\x17\xad\xbe\xe1\x25\xe5\x08\x4f\x71\xb4\x3c\x8b\x23\x89\xb9\x56\xb0\x86\x2f\x5f\x57\x71\x1c\x95\xa4\x81\x35\x5c\x5e\xad\xe2\xe8\x81\x28\x7c\x87\xb4\xac\xb4\x91\x5c\x5c\xac\xe2\x68\xb9\x84\x9a\xec\x7a\xe1\x7f\xaf\x8c\xf0\x91\xe2\xb6\x11\x52\xff\x41\x0b\x5d\x59\xd5\xab\xff\xad\xe2\xe8\x6c\x19\x47\x71\x94\x0b\xae\xb4\x6c\x73\x2d\x64\x92\x1a\x97\x91\xae\xa8\xca\x42\xa7\x5e\x14\x78\x76\x82\x13\xfe\xdd\xc1\x33\x0e\x0f\xb1\x0d\xf0\x77\x2c\xa9\xd2\x28\x81\x00\xc7\x2d\x18\x4f\x84\x97\x0c\x61\x4b\x75\x05\x84\x03\x51\x0d\xe6\x1a\x24\xd1\x54\x80\xd8\x00\x91\x40\x34\x50\x5e\xe0\x2e\x8e\x28\x57\x28\x75\x42\xe4\xfa\x72\xee\x64\xeb\xc5\xa5\x0b\xdc\x42\xb1\xf6\x60\x6d\x05\x11\x91\xd7\x40\xe4\x3c\x8e\xa2\x83\x09\x8e\x6e\x20\xb1\x57\x60\xbd\x86\xee\x56\x80\x37\x6b\x5a\x55\x25\xe6\x67\x6a\xd4\x0f\x80\x4c\xe1\x91\x92\x6a\x18\xcd\xd1\x19\x9a\xc3\xc5\x1c\x86\x0b\x3d\xc6\x4f\x5c\x3e\x87\x72\x80\xd2\x88\x26\x19\x23\x58\x2e\xe1\xe3\x87\x5f\x3e\xf4\x66\xde\x22\x47\x49\x34\x02\x01\x46\x95\x36\xc9\x28\x68\x8d\x5c\x51\xc1\x15\x6c\x84\x04\x24\x79\x35\x18\x8f\xa3\x9c\xb0\xbc\x65\x44\xa3\x7f\x4c\x86\x3a\xbc\xd2\xb1\xc8\xca\xf3\x56\x4a\xe4\xfd\x2b\x75\x8f\xbc\x1a\x1f\xdf\xba\x84\xc1\x45\x7f\x8f\x11\xa5\xfb\x77\x9f\x32\xe1\x0c\x2e\xb3\x2b\xab\xba\x5c\xc2\x6b\xac\xc8\x23\x02\xa3\x7f\x1a\x08\x0f\x52\x6c\x15\xca\x6b\xd0\x72\x0f\x5a\xc0\x86\x6a\x20\x0a\x6a\xc2\xf7\x40\x39\x10\x90\x62\xeb\x48\x30\xd8\x8b\xa3\xc8\xc0\x4c\x8c\x5f\xda\x47\xe2\x7f\xbe\x84\xe0\x59\x18\xf2\x52\x57\xfe\xe8\xfc\xdc\x3f\xae\x4d\xa2\x06\x5d\x21\x70\xdc\x69\xd8\x5a\xb0\x5a\x00\x29\x0a\x73\x3e\x70\xa6\x4b\x43\x72\x8c\x68\xf0\xf2\xc5\x5a\xff\x9a\x11\x99\xc2\x79\x90\x31\xef\xea\x76\x33\xf5\x44\x15\x68\x21\xcc\x3f\x68\x88\xa2\x04\x7b\x44\xab\xe3\xb3\x3b\xbc\x9d\x32\x36\x0c\x43\x47\xcf\x72\x1e\xc4\xf6\x0a\x8e\xab\xcb\xc3\xf4\x38\x4a\xd2\x7c\x14\x9a\xb0\xe0\x35\xe1\xac\xe3\xfc\x62\xfc\xa2\xe7\x70\x69\x49\xdb\xdd\x55\x39\x61\xd8\xe3\x1f\x97\xf0\xa2\xb7\x9c\xc2\x72\x12\x61\x70\xe6\xcc\x05\x36\x4d\xec\x3f\x60\x8a\x75\xb9\x02\x7b\x61\x44\xaa\xe1\x9e\x4b\xad\xc9\xed\x9d\x8d\xaf\x6d\x00\x1f\x51\xee\xa1\x91\xf8\x48\x45\xab\x42\xf2\x47\x9e\x2c\xab\x31\xd2\x97\x8e\x13\x63\x69\xcf\x90\x28\x1a\xea\xc3\x35\x00\x2f\x8e\xaa\xeb\x20\x90\xb9\x17\x6e\x43\xe1\x98\x1b\xa1\x79\x43\x11\x7f\xe5\x90\xda\xbf\x07\x97\x97\xe7\x6b\xce\x16\xfd\x44\xe3\x7c\x3d\xbc\xbf\xeb\x30\xae\xb0\xee\xd0\x24\xb7\x26\x06\x98\xb4\x74\x86\x02\x73\xc3\xa7\x6a\x54\x36\x47\x99\x38\x51\x30\x27\xb3\x72\x3a\x27\xd5\x75\x50\xfc\x0e\xde\x36\x14\xfd\x44\x3e\x6c\x36\x2c\x0c\x89\xba\x95\x3c\xe8\x4e\xdd\x88\x38\x83\x38\x82\x33\x78\x23\x0a\xb4\x3d\x8e\xc0\xa6\xd5\xad\x44\xa0\x75\xc3\xb0\x46\xae\xcd\x64\xe0\xa0\x2b\xa2\x01\x6b\xaa\x95\xe1\x04\xd7\xca\xcc\xb3\xb6\x29\x86\xee\x67\x58\x28\x18\x66\x05\x3e\xb4\x65\x32\xb3\x67\x94\x97\xc0\xec\x98\x9d\x59\xc2\xf6\xcd\xf6\x2e\xaf\xb0\x68\x4d\x87\xe6\xe0\xac\x98\x5e\x5d\x93\x1d\xad\xdb\x1a\x2e\x2f\xde\x7d\x8b\x23\xe5\x75\x3e\x85\x5e\x4c\xd1\x5a\xd8\xdd\x69\xe1\x8e\x7d\x2a\x1d\x4e\x3f\x1f\xa2\x53\x8a\xb0\x06\x85\xfa\x23\xad\x51\xb4\x3a\x49\x52\x58\xbf\x0a\xa6\xce\xb1\x32\x6f\x19\x5b\xf5\xe7\x1d\x62\xeb\x61\x6e\x06\x71\x6a\x33\x69\x06\xfc\x21\x8e\x71\x67\xea\x18\x0a\xdc\x90\x96\x69\x70\x7b\xc6\x5b\xc2\x98\xa9\xa2\xa7\xf1\x02\x80\x0c\x83\x1d\x00\x6d\x3f\x40\x86\xfd\x60\x67\xe1\x7a\xb2\xb6\x83\x2d\xdc\x58\x4c\x0c\xfd\xb6\x20\xc9\xc3\x5b\xd2\xb8\xb0\x7a\xc9\xeb\xbe\xfc\x27\x07\x9f\xc3\x7e\x13\xda\xe9\xe6\x68\xa7\x10\xdc\xeb\x8e\x6e\x39\xd5\x94\xb0\xe0\xa4\x90\x64\x9b\xa4\xc3\xca\x71\xb3\xd3\x92\xe4\xb6\x3f\xc2\x23\x61\xad\x69\xb6\x7d\x80\xdd\xe4\xbd\xb3\xf4\x3a\x22\x99\x80\xb2\x45\xa5\x60\x23\x45\x0d\x0d\x29\x0a\x43\xa0\xce\x88\xef\x73\x8d\x19\x4b\x5b\xca\x0b\xb1\xcd\x4a\xd4\x6f\x44\xdd\xb4\x1a\x8b\x3b\xbd\x67\x98\x74\xb9\x4c\xcd\xd1\x6f\x52\x34\x28\xf5\xfe\xb3\x31\x90\xcc\xbc\xbd\x05\xc3\x8d\x9e\xa5\x99\xc4\x86\x91\xdc\xc8\x77\xb3\x39\xcc\x66\xe9\xc9\xcc\xfb\x4d\xac\x21\x52\xe1\x2d\xd7\x49\xb3\x4b\xe1\x0c\xae\xe0\xfb\x77\x33\xa4\xa7\x98\xc3\x59\x3a\x7d\x82\x60\x6d\xfa\xc7\x10\x16\x8b\xd2\x91\x69\x61\x3c\x2d\x5c\xff\xf9\x79\x2c\xa3\x25\x72\x04\xe9\x34\x9c\x6e\x30\xb9\xf9\xea\x20\x4d\xc8\x33\x30\x78\xe4\x69\xba\x95\x7a\xb0\x94\x73\x94\x5d\x83\xf5\xce\x6e\xf9\x46\xc8\x1a\x44\x2b\x01\x1d\xd9\xc5\xe6\xc8\xf3\x31\x33\xad\x63\x6f\x96\x14\xc5\x8d\x69\x4a\xef\x8d\x0e\x47\x99\xcc\x24\x2a\xfa\x0d\x67\x73\x08\x0a\xbc\x6f\x1d\x3f\x8a\xf4\x44\xa8\xdd\xec\x1a\x7a\x8b\x9b\x2f\xcf\x16\xda\x0f\x2a\xcd\x8e\xd7\xe3\x20\xa6\xad\x6e\xb0\xd2\x57\x57\x74\x48\x4f\xac\xf5\xd4\x95\xa3\x69\x1c\xb5\xeb\xca\x47\x85\x1a\xf0\xce\x93\xe7\x56\x63\x7d\xc3\x50\x75\x33\x11\x19\x66\x7f\xb5\x28\xf7\x77\xc8\xd0\xf4\xa6\xff\x33\x96\xcc\xb2\x8e\x6a\x54\x63\xed\x18\x65\xc7\x9c\x33\x65\xfa\x95\xd8\x4c\x2d\xfa\x54\x39\x15\x22\x5d\x47\xcb\x0a\xa2\x89\x42\x9d\x11\x39\xe0\x1a\xc1\xef\xbf\x33\x26\x9b\xfd\x9b\x6e\xc1\x0e\xd7\x6a\xc2\x0b\x30\x59\x31\x9b\x5d\x1d\x47\x2e\x41\x01\xc8\xd1\x06\x7e\xec\x2b\x58\xda\x57\xff\x46\x62\xbe\xf8\x6f\x15\x64\xf8\xf5\x44\x86\x32\xe4\x5a\x52\x54\x49\x3a\xca\x55\x1f\x34\xac\x03\x00\x7e\x03\x5e\x75\xec\xfd\x4f\x7f\x14\xae\xa2\x66\xe8\xa2\x94\x42\x26\xf7\xbf\x52\xa5\x4c\xcb\x9c\x7e\xb8\x38\x76\x98\x11\xfb\xe2\xc9\xda\x3c\xdc\xfb\x05\x72\x4a\xea\x00\x09\xad\xcb\x1b\xf7\xca\xa7\xf3\x40\xeb\x72\xd6\xa1\x88\x9c\x72\xa6\x4c\x0b\xcb\xaa\xae\xc7\xdc\xbf\x78\xea\x43\xc9\xaa\x43\xb3\xbb\x5f\x1d\x6b\x6f\x7d\x8f\x18\x29\x6f\x7b\xe5\x43\x47\x89\x43\xfc\x77\x00\x00\x00\xff\xff\x24\xc0\x4e\x7e\xb8\x0f\x00\x00") +var _sharedJsGalleryJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x57\x5b\x6f\xdb\x3a\x12\x7e\x96\x7e\xc5\x6c\x51\xc0\x72\x6c\xcb\x49\x76\x17\x58\xc4\x75\x17\x6d\x37\x48\x03\xb4\xdb\x45\xd3\x76\x1f\x8a\x02\x61\xa4\xb1\x44\x94\x22\xb5\x24\xe5\x4b\x53\xff\xf7\x05\x2f\x92\x28\xdb\x39\x28\xce\xc1\x79\x31\x64\x72\x38\x97\x6f\x66\x3e\x0e\x33\x46\x94\x82\x77\x64\x27\x1a\x7d\xcd\x0b\xca\x11\x1e\xe3\x68\x7e\x16\x47\x12\x33\xad\x60\x09\x5f\xbf\x2d\xe2\x38\x2a\x48\x0d\x4b\xb8\xb8\x5c\xc4\xd1\x03\x51\xf8\x16\x69\x51\x6a\xb3\x72\x7e\xbe\x88\xa3\xf9\x1c\x2a\xb2\xed\x16\xff\x7a\x69\x16\xd7\x14\x37\xb5\x90\xfa\xbf\x34\xd7\xa5\x15\xbd\xfc\xdb\x22\x8e\xce\xe6\x71\x14\x47\x99\xe0\x4a\xcb\x26\xd3\x42\x26\x63\x63\x32\xd2\x25\x55\x69\x68\xd4\x2f\x05\x96\xdd\xc2\x09\xfb\x6e\xe3\x09\x83\xfb\xd8\x3a\xf8\x11\x0b\xaa\x34\x4a\x20\xc0\x71\x03\xc6\x12\xe1\x05\x43\xd8\x50\x5d\x02\xe1\x40\x54\x8d\x99\x06\x49\x34\x15\x20\x56\x40\x24\x10\x0d\x94\xe7\xb8\x8d\x23\xca\x15\x4a\x9d\x10\xb9\xbc\x98\xba\xb5\xe5\xec\xc2\x39\x6e\x43\xb1\xfa\x60\x69\x17\x22\x22\xaf\x80\xc8\x69\x1c\x45\x7b\xe3\x1c\x5d\x41\x62\x8f\xc0\x72\x09\xed\xa9\x20\xde\xb4\x6e\x54\x99\x98\xcf\xb1\x11\xdf\x03\x32\x85\x47\x42\xaa\x66\x34\x43\xa7\x68\x0a\xe7\x53\xe8\x0f\x74\x31\x7e\xe6\xf2\xa9\x28\xfb\x50\x6a\x51\x27\xc3\x08\xe6\x73\xf8\xf4\xe1\x5f\x1f\x3a\x35\x37\xc8\x51\x12\x8d\x40\x80\x51\xa5\x0d\x18\x39\xad\x90\x2b\x2a\xb8\x82\x95\x90\x80\x24\x2b\x7b\xe5\x71\x94\x11\x96\x35\x8c\x68\xf4\xc9\x64\xa8\xc3\x23\x6d\x15\xd9\xf5\xac\x91\x12\x79\x97\xa5\x36\xc9\x0b\xbf\xad\x34\x91\xfa\xd6\xc1\x05\xe7\xf6\xd4\x7c\x0e\xaf\xb1\x24\x6b\x04\x46\xbf\x1b\xaf\x1e\xa4\xd8\x28\x94\x57\xa0\xe5\x0e\xb4\x80\x15\xd5\x40\x14\x54\x84\xef\x80\x72\x20\x20\xc5\xc6\xe5\xb5\x2f\x96\x38\x8a\x8c\xe7\x89\xb1\x41\x3b\xf5\xfe\xf3\x05\x04\x48\x33\xe4\x85\x2e\xfd\xd6\x64\xe2\xf3\x35\x9f\xc3\xab\x3c\xb7\x72\x83\xe2\xc9\x75\x69\xb6\x5d\x15\xf8\xd8\x3e\x62\xd6\xc5\x97\x1c\x16\xed\x59\x60\xeb\xab\xb5\xf1\x2d\x25\xd2\x66\x32\x1a\x60\x33\x59\x1e\xeb\x9b\x04\x78\x99\x03\xa6\xb6\x06\x87\x5e\xc2\x71\x2f\xf8\x08\xac\x8f\x82\x61\x8a\x52\x0a\x99\x3c\x33\x39\xbf\x82\x15\xdd\x42\x46\x14\x2a\xd8\x94\x28\x11\xda\x93\xa0\x2a\xc2\x18\x4a\xd0\x25\xe1\x40\x2b\x52\xe0\x33\xe7\x64\xf4\x20\x91\x7c\xb7\x9f\xfb\xd8\x43\x73\x83\x1a\x74\x89\xc0\x71\xab\x1d\x28\x26\x2f\x24\xcf\x7b\x6c\x4a\xa2\xfe\x8d\x5b\x1b\x0b\x2c\x3d\xee\x13\xb8\x38\x89\x7d\x7f\x8a\xfb\x23\x2d\x9c\xa1\x96\x7f\xfe\x0a\xb8\x93\x0b\x0b\x2f\x5c\xc1\xf9\x09\xb5\x1f\xd6\x28\x57\x4c\x6c\x60\x39\xac\xcb\xc9\x81\xe1\x1e\xf7\x93\x08\x2f\x5a\x1c\x6e\x57\x87\x30\x50\x05\x5a\x08\xf3\x07\x4d\xcf\x2a\xc1\xd6\x68\x65\xbc\xbd\xbe\x98\x54\x9b\xd0\xbf\x84\x41\xfe\xfc\x79\xe4\x6c\x98\x4f\x0d\x05\xa9\x3f\x09\x4d\x58\xd0\x4b\x70\xd6\x32\xce\x2c\xec\xa7\x09\x5c\xfa\x0c\xda\x46\xcb\x08\xc3\xae\x40\x87\xe4\x39\xeb\xb4\x8e\x61\x7e\x50\x61\xc1\x9e\x53\x76\xe8\x72\xeb\x5e\xd4\x5a\x78\x4f\x74\x99\x56\x94\x27\x17\xe9\x3f\xa6\xce\xae\x3f\xba\x0f\xe2\x30\x38\x74\xbc\x7e\x9c\x57\x7b\x6c\x01\x16\x68\x83\xf4\x9d\x55\xde\xd4\x80\x6b\x94\x3b\xa8\x25\xae\xa9\x68\x54\xc8\x4a\x91\x6f\xf9\x45\x08\xc2\x0b\x5f\x7b\xe1\x62\xd7\xe4\x51\xd4\xb3\x96\xa3\x65\xbf\x1c\x95\x57\x81\x83\x53\xbf\xb8\x09\x17\x87\xb5\xd7\x2b\x37\xe5\xe7\x0f\xec\xc7\x61\xd4\x4f\xf3\xa0\x95\xb0\xbd\x25\x51\x37\x92\x07\x5c\xda\x5e\x68\x67\x10\x47\x70\x06\x6f\x44\x8e\x96\x91\x09\xac\x1a\xdd\x48\x04\x5a\xd5\x0c\x2b\xe4\xda\xdc\x63\xdc\x74\xaf\x06\xac\xa8\x56\x06\x28\xae\x95\xb9\x7d\x9b\x3a\xef\xb9\xba\x65\x85\x1c\x1f\x9a\x22\x19\xd9\x3d\xca\x0b\x60\x76\x28\x18\xd9\x4c\x75\x57\xc3\x5d\x56\x62\xde\x98\xfb\x84\x83\xd3\x62\x6e\x96\x8a\x6c\x69\xd5\x54\x70\x71\xfe\xf6\x47\x1c\x29\x2f\xf3\x39\xb4\x62\x8a\xc4\x86\xd8\xee\xe6\x6e\xdb\x03\xef\xe2\xf4\xb7\x59\x74\x4a\x10\x96\xa0\x50\x7f\xa2\x15\x8a\x46\x27\xc9\x18\x96\x2f\x83\x3b\xf2\x58\x98\x37\x8c\x2d\xba\xfd\x36\x62\x6b\x61\x6a\xc6\x86\xb1\x45\xd2\x8c\x23\xfb\x38\xc6\xad\xa5\xbc\x1c\x57\xa4\x61\x1a\xdc\x54\x74\x63\xf9\x6f\x67\xac\x84\xe3\x0a\x32\x0c\x26\x16\xb4\x15\x8e\x0c\xbb\x31\x84\x85\xc3\xd4\xd2\x5e\xc3\xe1\x7c\x65\x7c\xe8\x66\x1b\x49\x1e\x6e\x48\xed\xdc\xea\x56\x5e\x77\x65\x7f\xb0\xf1\x25\xec\xd1\x50\x4f\x7b\xeb\xb7\x02\xc1\xb9\x76\xeb\x96\x53\x4d\x09\x0b\x76\x72\x49\x36\xc9\xb8\x1f\x90\xae\xb7\x5a\x92\xcc\xf2\x09\xac\x09\x6b\x0c\x1f\x75\x0e\xb6\x73\xc2\x9d\x2d\xaf\xa3\x22\x13\x50\x34\xa8\x14\xac\xa4\xa8\xa0\x26\x79\x6e\x0a\xa8\x55\xe2\xfb\xbb\x36\x37\xee\x86\xf2\x5c\x6c\xd2\x02\xf5\x1b\x51\xd5\x8d\xc6\xfc\x4e\xef\x18\x26\x2d\x96\x63\xb3\xf5\x1f\x29\x6a\x94\x7a\xf7\xc5\x28\x48\x46\x5e\xdf\x8c\xe1\x4a\x8f\xc6\xa9\xc4\x9a\x91\xcc\xac\x6f\x47\x53\x18\x8d\xc6\x27\x91\xf7\x73\x63\x4d\xa4\xc2\x5b\xae\x93\x7a\x3b\x86\x33\xb8\x34\x74\x7a\x7e\x1c\x73\x38\x26\x1c\xa6\x20\x18\xf2\x7e\x77\x08\xb3\x59\xe1\x8a\x69\x66\x2c\xcd\x4a\xab\xfa\xd7\x63\x19\x8c\xbc\x83\x90\x4e\x87\xd3\xdd\xe1\x7e\x3c\x39\x51\x3c\x7d\x05\x0f\x2c\x1d\xce\xd0\x6d\x50\x69\xc6\x68\x4b\x56\xbd\xbd\x5b\xbe\x12\xb2\x02\xd1\x48\x40\x57\xef\x62\x75\x64\xfc\xb8\x38\xad\x6d\x0f\x23\xc9\xf3\x6b\xc3\x4b\xef\x8c\x0c\x47\x99\x8c\x24\x2a\xfa\x03\x47\x53\x08\x7a\xbc\x63\x8f\xdf\x72\xb6\x4b\x0d\xe5\x1c\xe5\x60\xf2\xe9\xe9\xc5\x91\x6f\x4b\xd4\x2e\x81\x9e\x16\xec\xef\x93\x6e\x31\x41\xf2\xa1\x53\x4f\x2b\x51\xa8\x6f\xb9\x46\xb9\x26\x2c\x19\x4a\xa5\x0f\x94\xe7\x76\x6d\x3c\x85\xbf\xb7\x2c\x64\x5f\x5b\xad\x9a\x3e\x33\x7f\x94\x1e\x4c\xc7\x1e\xa3\x76\x48\xcf\x4f\x12\x42\xf7\x62\xa2\x8e\x3b\x0c\xcb\x55\xee\x0a\x39\x62\x95\xa0\x49\x7c\xa5\xdf\x6a\xac\xae\x19\xaa\xb0\x88\xfe\xd7\xa0\xdc\xdd\x21\x43\x43\xa4\xaf\x18\x4b\x46\x69\xdb\x17\x54\x63\xe5\xca\xdf\x5e\xd9\x4e\x95\x21\x57\xb1\x3a\xd4\xe8\x93\xea\x44\x88\x74\xf4\x9b\xe6\x44\x13\x85\x3a\x25\xb2\x67\xfd\x41\xdc\xdd\x13\xee\xe0\xd1\xf4\xa6\x7d\xbb\x84\x2f\x16\xc2\x73\x30\x78\x98\x49\xad\x8a\x23\x07\x4d\x10\xe4\xe0\x71\x73\x6c\x2b\x78\x0f\x2d\xfe\x0c\x60\xbe\xfa\x67\x20\x32\xfc\x76\x02\xa1\x14\xb9\x96\x14\x55\x32\x1e\x60\xd5\x39\x0d\xcb\x20\x00\xff\x06\x59\x74\xd3\x67\xb7\x75\xfa\xdd\x70\xff\x9e\x2a\x65\xf8\xfd\xf0\x4d\xe8\xaa\xc3\xcc\x03\xcf\x1f\xad\xce\xfd\xbd\x1f\xf3\x0e\xdb\x2f\x88\x84\x56\xc5\xb5\xcb\xf2\x69\x1c\x68\x55\x8c\xda\x28\x22\x27\x9c\x2a\xc3\xb7\x69\xd9\x12\xe2\xfd\xf3\x47\x3b\x61\xae\x98\x10\x32\xe9\xbc\x4a\xcb\xf1\xbe\xde\xde\x2f\x8e\x4f\x6e\x3c\xb9\xdd\x3f\x7f\xec\xa5\x37\x9d\xf0\xbe\x2d\x8f\x7d\xfc\xff\x00\x00\x00\xff\xff\xe9\x8c\x26\xb5\x1f\x11\x00\x00") func sharedJsGalleryJsBytes() ([]byte, error) { return bindataRead( @@ -288,7 +288,7 @@ func sharedJsGalleryJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "shared/js/gallery.js", size: 4024, mode: os.FileMode(420), modTime: time.Unix(1590429739, 0)} + info := bindataFileInfo{name: "shared/js/gallery.js", size: 4383, mode: os.FileMode(420), modTime: time.Unix(1591005342, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -308,12 +308,12 @@ func sharedJsViewJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "shared/js/view.js", size: 643, mode: os.FileMode(420), modTime: time.Unix(1590429739, 0)} + info := bindataFileInfo{name: "shared/js/view.js", size: 643, mode: os.FileMode(420), modTime: time.Unix(1591002757, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _viewIndexTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x56\x4d\x6f\xdb\x38\x10\x3d\xdb\xbf\x62\xc2\xbd\xec\x02\x91\x64\x27\x41\x76\x37\xa0\x04\x14\x4d\x7b\x28\x10\x34\x40\xdd\x43\x8f\x63\x69\x22\x31\xa1\x28\x81\xa4\xbf\xea\xea\xbf\x17\x24\x65\xc7\x71\x9d\xc0\x29\xd2\x93\xcc\xe1\xcc\xbc\x99\xc7\xc7\xa1\xf9\xc9\xf5\xe7\xf7\x93\x6f\xb7\x1f\xa0\xb2\xb5\xcc\x86\xdc\x7d\x40\xa2\x2a\x53\x46\x8a\x39\x03\x61\x91\x0d\x07\xbc\x26\x8b\x90\x57\xa8\x0d\xd9\x94\x7d\x9d\x7c\x8c\xfe\x63\x5b\xbb\xc2\x9a\x52\x36\x17\xb4\x68\x1b\x6d\x19\xe4\x8d\xb2\xa4\x6c\xca\x16\xa2\xb0\x55\x5a\xd0\x5c\xe4\x14\xf9\xc5\x29\x08\x25\xac\x40\x19\x99\x1c\x25\xa5\xe3\x78\xe4\xf3\x58\x61\x25\x65\xeb\x35\xc4\x37\x64\xb1\x40\x8b\xf1\xc4\x99\xa0\xeb\x78\x12\x36\x87\x03\x2e\x85\x7a\x00\x4d\x32\x65\xc6\xae\x24\x99\x8a\xc8\x32\xa8\x34\xdd\xa5\xcc\xc5\xbe\x33\x86\xac\x81\xae\xcb\x8d\x49\xa6\x68\x28\xce\x8d\x61\xaf\x8e\x2c\x51\x4a\xd2\xab\xdf\x0b\x26\x25\x51\x97\x1b\x64\x9e\x04\x06\xf9\xb4\x29\x56\x2e\x97\xc2\x79\x36\x1c\x0c\xf8\x4c\xba\x8f\xcb\x9d\x71\xec\x73\xfd\x55\x34\x0b\x25\x1b\x2c\x58\x76\xdd\xff\xe2\x09\x66\x3c\x91\xe2\x57\xe7\x1a\x15\x96\xc4\xb2\x1b\xff\xdd\xf5\xe3\x89\x4f\xce\x93\x80\xe5\xcf\x90\xb4\xdf\xa9\xc6\xcf\x71\x5c\x8d\x7d\xc8\xd6\x97\xd7\x28\x14\xe4\x12\x8d\x49\x59\x4f\x88\x23\x63\xb0\x5e\x83\x46\x55\x12\xc4\xb7\x55\x63\x1b\xd7\xb6\xcb\x5c\x88\xf9\x9e\x77\x24\x2c\xd5\xd0\x6a\x72\x7d\x50\x11\xd9\x6a\x56\x4f\x15\x0a\xc9\xc0\x61\x47\xa8\x3d\x7b\xa8\x21\x86\xae\x63\xa1\x43\xdc\xa1\xd5\x59\x83\x6b\xcf\xe9\xa3\x39\x38\xb7\x22\xb7\x33\x4d\x7e\x31\xe0\xa6\x99\xe9\x9c\xc0\xe8\xdc\x6b\x74\xbd\x76\xd8\x4e\x94\x10\xc3\xf9\xd9\x08\x98\xa8\xb1\xa4\x64\x41\xd3\x96\xc1\xbf\x23\xe8\x3a\x38\x5b\x9e\xc2\x13\xbf\xf1\xe5\x41\xbf\xf1\x92\x81\x5d\xb5\x94\x3e\xd9\xab\xa9\x10\x98\xb2\xbf\x6b\x5c\x06\x71\x5f\xc1\xff\xa3\x51\xbb\xfc\x87\x1d\x51\xd1\xe5\xc5\x71\x15\x3d\x53\xf9\xc1\x8a\x5e\x47\xc4\x7d\x4b\xe5\x31\x44\xec\xfa\xed\xc3\x86\xbd\xb7\x22\xe2\xc5\x8a\x9e\xa9\xfc\x60\x45\x3d\xac\xa8\x4b\x87\x79\x14\x05\x0c\x7c\xcc\x00\xa5\x4d\xd9\x66\x11\xe6\xd7\x56\xa5\x3f\xa0\x9e\x49\x1f\xdf\x75\x2c\x78\x54\x24\xca\xca\xa6\xec\xfc\x6c\xd4\x5b\x9c\xda\x85\x1b\xa0\x12\xbf\xaf\x7a\xdb\xae\x88\xa3\xfe\x46\x44\x77\x8d\xde\x17\x74\xb2\xab\xe8\x8d\xbc\x37\xd7\xea\xc0\x4d\x8a\x7c\x1b\x47\x9d\xfb\x9e\x8a\xce\x2f\xfe\x94\xae\x8f\x07\x7a\x55\xd9\xe1\xa8\x0e\x67\x7b\x0b\x15\x1e\x0f\xf4\xb2\xb8\x0e\xe5\x79\x03\x6d\x1d\xd2\x47\x82\x61\xda\x17\x62\xde\x0f\x66\x52\x85\x1f\xc7\x3c\x71\xd3\xdb\x4d\xf1\x93\x28\x82\x49\x25\x0c\xf4\x43\x19\x16\x8d\x7e\x30\xb0\x10\xb6\x6a\x66\x16\x3e\xe1\x1c\xbf\xe4\x5a\xb4\xf6\x04\xa2\xc8\x05\x18\xbf\xea\xbb\xae\x9b\x62\x26\x89\x6d\xfb\x7c\x7c\xe9\xee\x4d\xe2\x3a\x8e\xef\x0d\x03\x34\x2b\x95\x67\x3c\x09\xa1\xee\xcd\x0b\x8f\x1d\x4f\xfa\x7f\x15\xae\x88\xb9\xa8\xaf\xc0\x90\x85\x3b\x9b\x3a\xf3\x95\xc7\xfb\x19\x00\x00\xff\xff\x7e\x6f\x73\xd7\x81\x08\x00\x00") +var _viewIndexTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x56\xcd\x6e\xe3\x36\x10\x3e\xdb\x4f\x31\x61\x2f\x2d\x10\x49\x76\x12\xa4\xad\x4b\x09\x28\x9a\xf6\x50\x20\x68\x80\x7a\x0f\x7b\x1c\x4b\x63\x89\x09\x45\x09\x24\xfd\xb7\x5e\xbd\xfb\x82\xa4\xe2\x38\x5e\x27\xeb\x2c\xb2\x27\x8b\xc3\xf9\xe6\xf7\x9b\xa1\xf9\xd9\xcd\x7f\x7f\x4d\x3f\xde\xfd\x0d\x95\xad\x65\x36\xe4\xee\x07\x24\xaa\x32\x65\xa4\x98\x13\x10\x16\xd9\x70\xc0\x6b\xb2\x08\x79\x85\xda\x90\x4d\xd9\x87\xe9\x3f\xd1\x6f\x6c\x27\x57\x58\x53\xca\x96\x82\x56\x6d\xa3\x2d\x83\xbc\x51\x96\x94\x4d\xd9\x4a\x14\xb6\x4a\x0b\x5a\x8a\x9c\x22\x7f\x38\x07\xa1\x84\x15\x28\x23\x93\xa3\xa4\x74\x1c\x8f\xbc\x1d\x2b\xac\xa4\x6c\xbb\x85\xf8\x96\x2c\x16\x68\x31\x9e\x3a\x11\x74\x1d\x4f\xc2\xe5\x70\xc0\xa5\x50\x0f\xa0\x49\xa6\xcc\xd8\x8d\x24\x53\x11\x59\x06\x95\xa6\x79\xca\x1c\xf6\x4f\x63\xc8\x1a\xe8\xba\xdc\x98\x64\x86\x86\xe2\xdc\x18\xf6\x66\x64\x89\x52\x92\xde\x7c\x1f\x98\x94\x44\x5d\x3e\x79\x3e\x8b\x22\x98\x56\xc2\x40\x6f\x15\x56\x8d\x7e\x30\xb0\x12\xb6\x6a\x16\x16\xfe\xc5\x25\xfe\x9f\x6b\xd1\xda\x33\x88\x22\x07\x30\xfe\x04\x76\xd3\x52\xca\xea\xa6\x58\x48\x62\x60\x74\x7e\xe0\xeb\xde\x24\xae\xe2\xf1\xbd\x61\x50\xd0\x9c\x34\xa0\xd9\xa8\x3c\xe3\x49\x30\x90\x0d\x79\x12\xba\xc7\x67\x4d\xb1\x71\x96\x15\x2e\xb3\xe1\x60\xc0\x17\xd2\xfd\xb8\xbc\x32\x8e\x7d\x1e\x3f\x15\xcd\x4a\xc9\x06\x0b\x96\xdd\xf4\x5f\x3c\xc1\x8c\x27\x52\x7c\xad\x5c\xa3\xc2\x92\x12\x96\xdd\xfa\x8f\x7d\x45\x9e\x78\xeb\x3c\x09\xce\x3c\x81\x48\xfb\x9b\x6a\xfc\x52\x83\xab\xb1\x87\xec\x74\x79\x8d\x42\x41\x2e\xd1\x98\x94\xf5\x75\x73\xc5\x1c\x6c\xb7\xa0\x51\x95\x04\xf1\x5d\xd5\xd8\xc6\xd5\xc1\x59\x2e\xc4\xf2\x40\x3b\x12\x96\x6a\x68\x35\xb9\x44\xa8\x88\x6c\xb5\xa8\x67\x0a\x85\x64\xe0\x7c\x47\xa8\x7d\x39\x51\x43\x0c\x5d\xc7\x42\x8a\xf8\xd4\xd3\xd6\x99\x0f\x77\x01\xd0\xb7\xf5\xf0\x32\x00\x5b\x91\xdb\x85\x26\xf0\xf4\x48\x59\x21\x4c\x2b\x71\x33\x01\xd5\x28\xfa\x23\xe8\x0c\xb8\x69\x16\x3a\x27\xd7\x49\x3f\x43\xce\x8e\x26\xd7\x42\x88\xe1\xf2\x62\x04\x4c\xd4\xae\xa8\x2b\x9a\xb5\x0c\x7e\x1d\x41\xd7\xc1\xc5\xfa\x1c\x9e\xe9\x8d\xaf\x8f\xea\x8d\xd7\xac\xe7\xcb\xfe\x5d\x4d\x85\xc0\x94\xfd\x5c\xe3\x3a\x0c\xdf\x04\x7e\x1f\x8d\xda\xf5\x2f\xa7\x44\x74\x7d\x75\x5a\x44\x2f\x44\x7e\x34\xa2\xb7\x15\xe2\xbe\xa5\xf2\x94\x42\xec\xeb\x39\xb7\xef\x95\xf6\xab\xfe\x5f\x88\x73\xbc\x7e\x74\x22\xea\x72\x37\xb4\xdf\x82\x31\xf0\x98\x01\x4a\x9b\xb2\xc7\x43\xd8\x9d\x3b\x92\x7e\x86\x7a\x21\x3d\xbe\xeb\x58\xd0\xa8\x48\x94\x95\x4d\xd9\xe5\xc5\xa8\x97\x38\xb2\x0b\xb7\xbc\x25\x7e\xda\xf4\xb2\x7d\xf6\x46\xfd\x40\x44\xf3\x46\x1f\x67\x72\xd2\x53\xf9\x39\xaf\xfb\xd9\x3a\x32\x4e\x91\x4f\xe6\xa4\xce\x1e\xf0\xe4\xf2\xea\x47\x31\xf7\x74\x47\x6f\x0a\x3b\x34\xec\xc9\xda\x3b\x05\x79\x60\xf6\x75\xfa\x1c\x43\xbd\x03\x7b\x8e\xf5\x3e\xc1\xb0\xce\x0b\xb1\xec\x37\x2f\xa9\xc2\xef\x5b\x9e\xb8\xf5\xec\xde\x97\xf0\xb0\xf0\xa4\xff\xf7\xe0\x9e\xba\xa5\xa8\x27\x60\xc8\xc2\xdc\xa6\x4e\x3c\xf1\xaf\xda\x97\x00\x00\x00\xff\xff\x44\x53\xd9\x00\x69\x08\x00\x00") func viewIndexTmplBytes() ([]byte, error) { return bindataRead( @@ -328,7 +328,7 @@ func viewIndexTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "view/index.tmpl", size: 2177, mode: os.FileMode(420), modTime: time.Unix(1590932953, 0)} + info := bindataFileInfo{name: "view/index.tmpl", size: 2153, mode: os.FileMode(420), modTime: time.Unix(1591005610, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/cmd/web/templates.go b/cmd/web/templates.go index 581ff76..4ee7830 100644 --- a/cmd/web/templates.go +++ b/cmd/web/templates.go @@ -2,6 +2,7 @@ package main import ( "html/template" + "strings" lib "git.makerforce.io/photos/photos/pkg/bucket" ) @@ -9,6 +10,7 @@ import ( var funcs = template.FuncMap{ "ar": func(p Photo) float64 { return float64(p.Width) / float64(p.Height) }, "mul": func(a, b float64) float64 { return a * b }, + "photo": photo, "preview": preview, } @@ -35,11 +37,16 @@ func mustTemplateAsset(name string) *template.Template { ) } +func photo(p Photo) template.URL { + return template.URL(p.Path()) +} + func preview(p Photo, height int, format lib.PhotoFormat, quality int) template.Srcset { preview := p.GetPreview(lib.PreviewOption{ Height: height, Format: format, Quality: quality, }) - return template.Srcset(preview.String()) + path := strings.ReplaceAll(preview.Path(), ",", "%2C") + return template.Srcset(path) } diff --git a/cmd/web/web.go b/cmd/web/web.go index cfecb6c..91de486 100644 --- a/cmd/web/web.go +++ b/cmd/web/web.go @@ -14,6 +14,7 @@ import ( ) var client *lib.Client +var sharedFileServer http.Handler var endpoint string @@ -28,12 +29,14 @@ func main() { panic(err) } + sharedFileServer = http.FileServer(AssetFile()) + server := &http.Server{ Addr: ":8004", ReadTimeout: 5 * time.Second, WriteTimeout: 10 * time.Second, } - http.Handle("/shared/", http.FileServer(AssetFile())) + http.HandleFunc("/shared/", shared) http.HandleFunc("/update", update) err = server.ListenAndServe() if err != nil { @@ -41,6 +44,14 @@ func main() { } } +func shared(w http.ResponseWriter, req *http.Request) { + // For static files, allow all CORS + w.Header().Add("Access-Control-Allow-Origin", "*") + + sharedFileServer.ServeHTTP(w, req) + return +} + func update(w http.ResponseWriter, req *http.Request) { if req.Method != http.MethodPost { err := fmt.Errorf("%w: %v", httphelpers.ErrorMethodNotAllowed, req.Method) diff --git a/pkg/bucket/photo.go b/pkg/bucket/photo.go index f028b4a..a5f4cca 100644 --- a/pkg/bucket/photo.go +++ b/pkg/bucket/photo.go @@ -3,6 +3,7 @@ package bucket import ( "errors" "fmt" + "net/url" "strings" ) @@ -24,7 +25,10 @@ func (p Photo) String() string { } func (p Photo) Path() string { - return "/" + string(p) + u := url.URL{ + Path: string(p), + } + return u.String() } const photoMetadataPrefix = "photometa/" diff --git a/pkg/bucket/photopreview.go b/pkg/bucket/photopreview.go index 9b08c24..4f4aa16 100644 --- a/pkg/bucket/photopreview.go +++ b/pkg/bucket/photopreview.go @@ -4,6 +4,8 @@ import ( "errors" "fmt" "mime" + "net/url" + "sort" "strings" ) @@ -24,6 +26,13 @@ func (p Preview) String() string { return string(p) } +func (p Preview) Path() string { + u := url.URL{ + Path: string(p), + } + return u.String() +} + func (p Preview) Format() PhotoFormat { extIndex := strings.LastIndex(string(p), ".") return PhotoFormat(mime.TypeByExtension(string(p)[extIndex:])) @@ -88,10 +97,11 @@ func (p Photo) GetPreview(option PreviewOption) Preview { if err != nil { panic(err) } + sort.Strings(exts) if len(exts) < 1 { panic("missing MIME type to extension mapping, please configure within your operating system") } - return Preview(base + res + exts[0]) + return Preview(base + res + exts[len(exts)-1]) } var defaultSizes = []int{640, 320, 160, 80} diff --git a/pkg/bucket/signer.go b/pkg/bucket/signer.go index 7be4c77..c2ce2de 100644 --- a/pkg/bucket/signer.go +++ b/pkg/bucket/signer.go @@ -66,7 +66,7 @@ func (s *Signer) baseBucket(b Bucket) url.URL { url := url.URL{ Scheme: "http", Host: b.String(), - Path: "", + Path: "/", } if s.bucketSecure { url.Scheme = "https" @@ -174,3 +174,25 @@ func (s *Signer) PutPhoto(b Bucket, p Photo) (string, error) { signedReq := signer.PreSignV4(*req, s.accessKey, s.secretKey, "", "sgp1", int64(s.expirations.Write/time.Second)) return signedReq.URL.String(), nil } + +func (s *Signer) GetPreview(b Bucket, p Preview) (string, error) { + err := b.Validate() + if err != nil { + return "", err + } + err = p.Validate() + if err != nil { + return "", err + } + + url := s.baseBucket(b) + url.Path += p.Path() + + req, err := http.NewRequest("GET", url.String(), nil) + if err != nil { + return "", err + } + + signedReq := signer.PreSignV4(*req, s.accessKey, s.secretKey, "", "sgp1", int64(s.expirations.Read/time.Second)) + return signedReq.URL.String(), nil +} diff --git a/web/shared/css/base.css b/web/shared/css/base.css index d9a2069..447903f 100644 --- a/web/shared/css/base.css +++ b/web/shared/css/base.css @@ -61,6 +61,8 @@ h4, h5, h6 { top: 0; left: 0; z-index: 1; + + display: block !important; } .preloaded-thumbnail-image img { object-fit: cover; diff --git a/web/shared/css/enlarge.css b/web/shared/css/enlarge.css index e4def00..f4c33d3 100644 --- a/web/shared/css/enlarge.css +++ b/web/shared/css/enlarge.css @@ -15,6 +15,9 @@ font-size: 0.9em; letter-spacing: 0.07em; text-transform: uppercase; + + text-shadow: 1px 1px rgba(0, 0, 0, 0.5); + color: rgba(255, 255, 255, 0.5); } .enlarge-close { @@ -24,7 +27,6 @@ top: 0; right: 0; z-index: 100; - color: rgba(255, 255, 255, 0.5); } .enlarge-zoom-controls { @@ -39,7 +41,7 @@ padding: calc(var(--spacing) * 2); display: inline-block; - color: rgba(255, 255, 255, 0.5); + color: inherit; } .enlarge-contents { diff --git a/web/shared/js/enlarge.js b/web/shared/js/enlarge.js index 718d0fa..d9b97ac 100644 --- a/web/shared/js/enlarge.js +++ b/web/shared/js/enlarge.js @@ -20,6 +20,7 @@ export default class Enlarge { */ constructor(ele, prefix='#view-') { + this.showing = false; this.prefix = prefix; this.zoom = 0; this.x = 0; @@ -103,7 +104,11 @@ export default class Enlarge { } bindWindow() { - window.addEventListener('resize', this.updateSize.bind(this), false); + window.addEventListener('resize', () => { + if (this.showing) { + this.updateSize(); + } + }, false); } bindTouch() { @@ -111,18 +116,20 @@ export default class Enlarge { } bindDrag() { - this.ele.addEventListener('pointerdown', (e) => { + this.contentsEle.addEventListener('pointerdown', (e) => { + e.preventDefault(); this.mouseDown = true; this.contentsEle.style.cursor = 'grabbing'; }, false); - this.ele.addEventListener('pointermove', (e) => { + this.contentsEle.addEventListener('pointermove', (e) => { e.preventDefault(); if (this.mouseDown) { this.pan(e.movementX, e.movementY); this.draw(); } }, false); - this.ele.addEventListener('pointerup', (e) => { + this.contentsEle.addEventListener('pointerup', (e) => { + e.preventDefault(); this.mouseDown = false; this.contentsEle.style.cursor = 'grab'; }, false); @@ -288,6 +295,8 @@ export default class Enlarge { } show() { + this.showing = true; + // Capture scroll position this.preservedScroll.x = window.scrollX; this.preservedScroll.y = window.scrollY; @@ -305,6 +314,8 @@ export default class Enlarge { } hide() { + this.showing = false; + // Restore scroll position window.scrollTo(this.preservedScroll.x, this.preservedScroll.y); diff --git a/web/shared/js/gallery.js b/web/shared/js/gallery.js index 13a0ea8..4061add 100644 --- a/web/shared/js/gallery.js +++ b/web/shared/js/gallery.js @@ -37,42 +37,42 @@ class LayoutEngine { let dimensions = []; let currentWidth = this.gap; - let currentIndex = 0; - - let lastHeight = this.baseHeight * 1.2; + let startIndex = 0; // Behave like a browser: try to fit as many in a row with baseHeight for (let index = 0; index < this.rects.length; index++) { + // Add this rectangle width + const currentRectWidth = (this.baseHeight * this.rects[index].ar); + currentWidth += currentRectWidth + this.gap; + + if (currentWidth > this.viewportWidth) { + console.error("TODO: fix cases where viewport smaller than image"); + break; + } + // Get the next width to add - const rectWidth = (this.baseHeight * this.rects[index].ar) + this.gap; + const hasNextRect = index + 1 < this.rects.length; + const nextRectWidth = hasNextRect ? (this.baseHeight * this.rects[index+1].ar) : 0; + const nextRectOverflow = currentWidth + nextRectWidth + this.gap > this.viewportWidth; // If the next width is too wide, resolve the current rectangles - if (currentWidth + rectWidth > this.viewportWidth) { - const gapTotal = this.gap * (index - currentIndex + 1); - const scale = (this.viewportWidth - gapTotal) / (currentWidth - gapTotal); - + if (!hasNextRect || nextRectOverflow) { + const gapTotal = this.gap * (index - startIndex + 2); + let scale = (this.viewportWidth - gapTotal) / (currentWidth - gapTotal); + if (!hasNextRect) { + scale = Math.min(1.8, scale); + } const rectHeight = this.baseHeight * scale; - lastHeight = rectHeight; // Scale up every previous rectangle - for (; currentIndex < index; currentIndex++) { + for (; startIndex <= index; startIndex++) { dimensions.push({ h: rectHeight, - w: rectHeight * this.rects[currentIndex].ar, + w: rectHeight * this.rects[startIndex].ar, }) } currentWidth = this.gap; } - - currentWidth += rectWidth; - } - - // Set remainder to a decent height - for (; currentIndex < this.rects.length; currentIndex++) { - dimensions.push({ - h: lastHeight, - w: lastHeight * this.rects[currentIndex].ar, - }) } return dimensions; @@ -128,7 +128,7 @@ export default class Gallery { // Extract viewport width grabViewportWidth() { - this.layoutEngine.viewportWidth = window.innerWidth; + this.layoutEngine.viewportWidth = this.ele.clientWidth; } // Inform our engine of viewport width @@ -137,11 +137,20 @@ export default class Gallery { if (this.layoutEngine.viewportWidth == window.innerWidth) { return; } - this.grabBaseHeight(); - this.grabViewportWidth(); - //this.layoutEngine.scheduleUpdate(); - this.draw(); + this.recompute(); }); + window.addEventListener('load', () => { + this.recompute(); + }); + setInterval(this.recompute.bind(this), 500); + } + + recompute() { + this.grabGap(); + this.grabBaseHeight(); + this.grabViewportWidth(); + //this.layoutEngine.scheduleUpdate(); + this.draw(); } // Register initial elements @@ -164,7 +173,7 @@ export default class Gallery { return; } for (const imgEle of ele.querySelectorAll('img')) { - imgEle.style.height = `${dimension.h}px`; + imgEle.style.height = `${Math.floor(dimension.h)}px`; imgEle.style.width = `${dimension.w}px`; } } diff --git a/web/view/index.tmpl b/web/view/index.tmpl index 2defd90..e83ad30 100644 --- a/web/view/index.tmpl +++ b/web/view/index.tmpl @@ -7,12 +7,14 @@ + +
@@ -21,24 +23,24 @@
{{ range .Photos }}
- -