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