Move to leafbox
This commit is contained in:
		
					parent
					
						
							
								ab08bd2e1c
							
						
					
				
			
			
				commit
				
					
						fa010e1807
					
				
			
		
					 1 changed files with 30 additions and 15 deletions
				
			
		|  | @ -5,21 +5,43 @@ | |||
| {{ $imagethumbnail := $image.Resize $options }} | ||||
| 
 | ||||
| <figure{{ with .Get "class" }} class="{{ . }}"{{ end }}> | ||||
|         <a href="#{{ $image.RelPermalink | md5 }}-lightbox"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}> | ||||
| 
 | ||||
|     <a href="#{{ $image.RelPermalink | md5 }}-img"> | ||||
|     <img src="{{ $imagethumbnail.RelPermalink }}" | ||||
|          {{- if or (.Get "alt") (.Get "caption") }} | ||||
|     {{- if or (.Get "alt") (.Get "caption") }} | ||||
|     alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}" | ||||
|     {{- end -}} | ||||
|     /> | ||||
|     </a> | ||||
| 
 | ||||
|     <figure id="{{ $image.RelPermalink | md5 }}-img" class="lbox fade"> | ||||
|         <img src="{{ $image.RelPermalink }}"  {{- if or (.Get "alt") (.Get "caption") }} | ||||
|          alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}" | ||||
|          {{- end -}} | ||||
|          {{- with .Get "width" }} width="{{ . }}"{{ end -}} | ||||
|          {{- with .Get "height" }} height="{{ . }}"{{ end -}} | ||||
|     /> <!-- Closing img tag --> | ||||
|     </a> | ||||
|     {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} | ||||
|          /> | ||||
|          <a href="#_"></a> | ||||
|         {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} | ||||
|         <figcaption> | ||||
|             {{ with (.Get "title") -}} | ||||
|                 <h5>{{ . }}</h5> | ||||
|             {{- end -}} | ||||
|             {{- if or (.Get "caption") (.Get "attr") -}}<p class="f5 center"> | ||||
|                 {{- .Get "caption" | markdownify -}} | ||||
|                 {{- with .Get "attrlink" }} | ||||
|                     <a href="{{ . }}"> | ||||
|                 {{- end -}} | ||||
|                 {{- .Get "attr" | markdownify -}} | ||||
|                 {{- if .Get "attrlink" }}</a>{{ end }}</p> | ||||
|             {{- end }} | ||||
|         </figcaption> | ||||
|     {{- end }} | ||||
|     </figure> | ||||
|     {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} | ||||
|         <figcaption class="center"> | ||||
|             {{ with (.Get "title") -}} | ||||
|                 <h4>{{ . }}</h4> | ||||
|             {{- end -}} | ||||
|             {{- if or (.Get "caption") (.Get "attr") -}}<p> | ||||
|             {{- if or (.Get "caption") (.Get "attr") -}}<p class="f5 lh-copy center"> | ||||
|                 {{- .Get "caption" | markdownify -}} | ||||
|                 {{- with .Get "attrlink" }} | ||||
|                     <a href="{{ . }}"> | ||||
|  | @ -30,11 +52,4 @@ | |||
|         </figcaption> | ||||
|     {{- end }} | ||||
| </figure> | ||||
| <a href="#_" class="lightbox" id="{{ $image.RelPermalink | md5 }}-lightbox"> | ||||
|     <img src="{{ $image.RelPermalink }}" | ||||
|     {{- if or (.Get "alt") (.Get "caption") }} | ||||
|          alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}" | ||||
|          {{- end -}} | ||||
|     > | ||||
| </a> | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue