website

Repositório website
git clone git://git.sivaldodavi.com/website.git
Log | Files | Refs

img.html (832B)


      1 <!--
      2 	class: class of figure
      3 	link: url of image
      4 	id: id of image
      5 	alt: alt text
      6 	caption: caption
      7 	mouse: text when moused over
      8 	width: fixed width (ex: 600px, 80%)
      9 	maxwidth: max width (ex: 800px)
     10 -->
     11 
     12 <figure {{ with .Get "class" }}class="{{.}}"{{ end -}}>
     13 	{{- with .Get "link"}}<a href="{{.}}">{{ end -}}
     14 		<img
     15 			src="{{ .Get "src" }}"
     16 			{{- with .Get "mouse" }} title="{{.}}"{{ end -}}
     17 			{{- with .Get "id" }} id="{{.}}"{{ end -}}
     18 			{{- with .Get "alt" }} alt="{{.}}"{{ end -}}
     19 			{{- if or (.Get "width") (.Get "maxwidth") }}
     20 			style="
     21 				{{- with .Get "width" }}width: {{.}};{{ end -}}
     22 				{{- with .Get "maxwidth" }}max-width: {{.}};{{ end -}}
     23 				height: auto;
     24 			"
     25 			{{- end -}}
     26 		>
     27 	{{- if .Get "link"}}</a>{{ end -}}
     28 
     29 	{{- with .Get "caption" -}}
     30 	<figcaption>
     31 		{{- . -}}
     32 	</figcaption>
     33 	{{- end -}}
     34 </figure>