github.com/spotify/syslog-redirector-golang@v0.0.0-20140320174030-4859f03d829a/misc/tour/template/action.tmpl (about)

     1  {{/*{
     2  This is the action template.
     3  It determines how the formatting actions are rendered.
     4  */}}
     5  
     6  {{define "section"}}
     7    <h2>{{.Title}}</h2>
     8    {{range .Elem}}{{elem $.Template .}}{{end}}
     9  {{end}}
    10  
    11  {{define "list"}}
    12    <ul>
    13    {{range .Bullet}}
    14      <li>{{style .}}</li>
    15    {{end}}
    16    </ul>
    17  {{end}}
    18  
    19  {{define "text"}}
    20    {{if .Pre}}
    21    <pre>{{range .Lines}}{{.}}{{end}}</pre>
    22    {{else}}
    23    <p>
    24      {{range $i, $l := .Lines}}{{if $i}}{{template "newline"}}
    25      {{end}}{{style $l}}{{end}}
    26    </p>
    27    {{end}}
    28  {{end}}
    29  
    30  {{define "code"}}
    31    <div{{if .Play}} class="source"{{end}}>{{.Text}}</div>
    32  {{end}}
    33  
    34  {{define "image"}}
    35    <img src="{{.URL}}"{{with .Height}} height="{{.}}"{{end}}{{with .Width}} width="{{.}}"{{end}}>
    36  {{end}}
    37        
    38  {{define "link"}}
    39    <p class="link"><a href="{{.URL}}" target="_blank">{{style .Label}}</a></p>
    40  {{end}}
    41  
    42  {{define "html"}}{{.HTML}}{{end}}