| {{/* This doc template is given to the present tool to format articles. */}} |
| {{with .Subtitle}}<h2>{{.}}</h2>{{end}} |
| {{with index .Sections 0}} |
| <li><a href="#TOC_{{.FormattedNumber}}">{{.Title}}</a></li> |
| {{with .Sections}}{{template "TOC" .}}{{end}} |
| {{/* No automatic line break. Paragraphs are free-form. */}} |
| <h4 id="TOC_{{.FormattedNumber}}">{{.Title}}</h4> |
| {{range .Elem}}{{elem $.Template .}}{{end}} |
| <div class="code"><pre>{{range .Lines}}{{.}}{{end}}</pre></div> |
| {{range $i, $l := .Lines}}{{if $i}}{{template "newline"}} |
| {{end}}{{style $l}}{{end}} |
| <div class="playground">{{.Text}}</div> |
| <div class="code">{{.Text}}</div> |
| <img src="{{.URL}}"{{with .Height}} height="{{.}}"{{end}}{{with .Width}} width="{{.}}"{{end}}> |
| <figcaption>{{style .Text}}</figcaption> |
| <iframe src="{{.URL}}"{{with .Height}} height="{{.}}"{{end}}{{with .Width}} width="{{.}}"{{end}} frameborder="0" allowfullscreen mozallowfullscreen webkitallowfullscreen></iframe> |
| {{define "link"}}<p class="link"><a href="{{.URL}}" target="_blank">{{style .Label}}</a></p>{{end}} |
| {{define "html"}}{{.HTML}}{{end}} |