parent
1e3af32706
commit
3faff8264f
27
main.tpl
27
main.tpl
|
@ -67,19 +67,22 @@
|
||||||
({{ . }})
|
({{ . }})
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ if index . "Description" }}
|
{{ with index . "Description" }}
|
||||||
{{ excerpt 384 (index . "Description") }}
|
{{ excerpt 384 . }}
|
||||||
{{ else }}
|
{{ end }}
|
||||||
{{ with index . "ImageType" }}
|
{{ end }}
|
||||||
{{ . }} image,
|
|
||||||
|
{{ if index . "ImageType" }}
|
||||||
|
{{ if index . "Title" }}
|
||||||
|
·
|
||||||
|
{{ end }}
|
||||||
|
{{ .ImageType }} image,
|
||||||
|
{{ if (index . "ImageSize") (index . "Size") }}
|
||||||
|
{{ with index . "ImageSize" }}
|
||||||
|
{{ .X }}×{{ .Y }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if (index . "ImageSize") (index . "Size") }}
|
{{ with index . "Size" }}
|
||||||
{{ with index . "ImageSize" }}
|
({{ size . }})
|
||||||
{{ .X }}×{{ .Y }}
|
|
||||||
{{ end }}
|
|
||||||
{{ with index . "Size" }}
|
|
||||||
({{ size . }})
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -133,6 +133,7 @@ func (p *Parser) Parse(u *url.URL, referer *url.URL) (result parsers.ParseResult
|
||||||
"IsUpload": true,
|
"IsUpload": true,
|
||||||
"ImageSize": image.Point{X: m.Width, Y: m.Height},
|
"ImageSize": image.Point{X: m.Width, Y: m.Height},
|
||||||
"ImageType": strings.ToUpper(imgType),
|
"ImageType": strings.ToUpper(imgType),
|
||||||
|
"Title": u.Path[strings.LastIndex(u.Path, "/")+1:],
|
||||||
}
|
}
|
||||||
if resp.ContentLength > 0 {
|
if resp.ContentLength > 0 {
|
||||||
info["Size"] = uint64(resp.ContentLength)
|
info["Size"] = uint64(resp.ContentLength)
|
||||||
|
|
Loading…
Reference in New Issue