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 }} | {{ $imagethumbnail := $image.Resize $options }} | ||||||
| 
 | 
 | ||||||
| <figure{{ with .Get "class" }} class="{{ . }}"{{ end }}> | <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 }}" |     <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 }}" |          alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}" | ||||||
|          {{- end -}} |          {{- end -}} | ||||||
|          {{- with .Get "width" }} width="{{ . }}"{{ end -}} |          /> | ||||||
|          {{- with .Get "height" }} height="{{ . }}"{{ end -}} |          <a href="#_"></a> | ||||||
|     /> <!-- Closing img tag --> |         {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} | ||||||
|     </a> |  | ||||||
|     {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} |  | ||||||
|         <figcaption> |         <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") -}} |             {{ with (.Get "title") -}} | ||||||
|                 <h4>{{ . }}</h4> |                 <h4>{{ . }}</h4> | ||||||
|             {{- end -}} |             {{- end -}} | ||||||
|             {{- if or (.Get "caption") (.Get "attr") -}}<p> |             {{- if or (.Get "caption") (.Get "attr") -}}<p class="f5 lh-copy center"> | ||||||
|                 {{- .Get "caption" | markdownify -}} |                 {{- .Get "caption" | markdownify -}} | ||||||
|                 {{- with .Get "attrlink" }} |                 {{- with .Get "attrlink" }} | ||||||
|                     <a href="{{ . }}"> |                     <a href="{{ . }}"> | ||||||
|  | @ -30,11 +52,4 @@ | ||||||
|         </figcaption> |         </figcaption> | ||||||
|     {{- end }} |     {{- end }} | ||||||
| </figure> | </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