| ... | ... | | @@ -1,51 +1,72 @@ |
| 1 | 1 | | {{define "list"}} |
| 2 | | - | {{$indent := 0}} |
| 3 | | - | {{$mod := 0}} |
| 4 | | - | <ul style="list-style-type: {{.ListType}};"> |
| 5 | | - | {{range .Items}} |
| 6 | | - | {{if lt $indent .Indent}} |
| 7 | | - | <ul> |
| 8 | | - | {{else if gt $indent .Indent}} |
| 9 | | - |
|
| 10 | | - | {{$mod = minus $indent .Indent}} |
| 11 | | - | {{range $y := intRange 1 $mod}} |
| 12 | | - | </li></ul> |
| 13 | | - | {{end}} |
| 14 | | - |
|
| 15 | | - | {{else}} |
| 16 | | - | </li> |
| 17 | | - | {{end}} |
| 18 | | - | {{$indent = .Indent}} |
| 19 | | - |
|
| 20 | | - | {{if .IsText}} |
| 21 | | - | {{if .Value}} |
| 22 | | - | <li>{{.Value}} |
| 23 | | - | {{end}} |
| 24 | | - | {{end}} |
| 25 | | - |
|
| 26 | | - | {{if .IsURL}} |
| 27 | | - | <li><a href="{{.URL}}">{{.Value}}</a> |
| 28 | | - | {{end}} |
| 29 | | - |
|
| 30 | | - | {{if .IsImg}} |
| 31 | | - | <li><img src="{{.URL}}" alt="{{.Value}}" /> |
| 32 | | - | {{end}} |
| 33 | | - |
|
| 34 | | - | {{if .IsBlock}} |
| 35 | | - | <li><blockquote>{{.Value}}</blockquote> |
| 36 | | - | {{end}} |
| 37 | | - |
|
| 38 | | - | {{if .IsHeaderOne}} |
| 39 | | - | </ul><h2 class="text-xl font-bold">{{.Value}}</h2><ul style="list-style-type: {{$.ListType}};"> |
| 40 | | - | {{end}} |
| 41 | | - |
|
| 42 | | - | {{if .IsHeaderTwo}} |
| 43 | | - | </ul><h3 class="text-lg font-bold">{{.Value}}</h3><ul style="list-style-type: {{$.ListType}};"> |
| 44 | | - | {{end}} |
| 45 | | - |
|
| 46 | | - | {{if .IsPre}} |
| 47 | | - | <li><pre>{{.Value}}</pre> |
| 48 | | - | {{end}} |
| 49 | | - | {{end}} |
| 50 | | - | </ul> |
| 2 | + | {{$indent := 0}} |
| 3 | + | {{$mod := 0}} |
| 4 | + |
|
| 5 | + | <div role="list"> |
| 6 | + | {{range .Items}} |
| 7 | + | {{if lt $indent .Indent}} |
| 8 | + | <div role="list"> |
| 9 | + | {{else if gt $indent .Indent}} |
| 10 | + | {{$mod = minus $indent .Indent}} |
| 11 | + | {{range $y := intRange 1 $mod}} |
| 12 | + | </div> |
| 13 | + | {{end}} |
| 14 | + | {{end}} |
| 15 | + |
|
| 16 | + | {{$indent = .Indent}} |
| 17 | + |
|
| 18 | + | {{if .IsText}} |
| 19 | + | <div role="listitem"> |
| 20 | + | <div class="listitem-bullet">•</div> |
| 21 | + | <div class="listitem-text">{{.Value}}</div> |
| 22 | + | </div> |
| 23 | + | {{end}} |
| 24 | + |
|
| 25 | + | {{if .IsURL}} |
| 26 | + | <div role="listitem"> |
| 27 | + | <div class="listitem-bullet">•</div> |
| 28 | + | <a class="listitem-text" href="{{.URL}}">{{.Value}}</a> |
| 29 | + | </div> |
| 30 | + | {{end}} |
| 31 | + |
|
| 32 | + | {{if .IsImg}} |
| 33 | + | <div role="listitem"> |
| 34 | + | <div class="listitem-bullet">•</div> |
| 35 | + | <img class="listeitem-text" src="{{.URL}}" alt="{{.Value}}" /> |
| 36 | + | </div> |
| 37 | + | {{end}} |
| 38 | + |
|
| 39 | + | {{if .IsBlock}} |
| 40 | + | <div role="listitem"> |
| 41 | + | <div class="listitem-bullet">•</div> |
| 42 | + | <blockquote class="listitem-text">{{.Value}}</blockquote> |
| 43 | + | </div> |
| 44 | + | {{end}} |
| 45 | + |
|
| 46 | + | {{if .IsPre}} |
| 47 | + | <div role="listitem"> |
| 48 | + | <div class="listitem-bullet">•</div> |
| 49 | + | <pre class="listitem-text">{{.Value}}</pre> |
| 50 | + | </div> |
| 51 | + | {{end}} |
| 52 | + |
|
| 53 | + | {{if .IsHeaderOne}} |
| 54 | + | </div> |
| 55 | + | <h2 class="text-xl font-bold">{{.Value}}</h2> |
| 56 | + | <div role="list" aria-label="{{.Value}}"> |
| 57 | + | {{end}} |
| 58 | + |
|
| 59 | + | {{if .IsHeaderTwo}} |
| 60 | + | </div> |
| 61 | + | <h3 class="text-lg font-bold">{{.Value}}</h3> |
| 62 | + | <div role="list" aria-label="{{.Value}}"> |
| 63 | + | {{end}} |
| 64 | + |
|
| 65 | + | {{if .IsHr}} |
| 66 | + | </div> |
| 67 | + | <hr /> |
| 68 | + | <div role="list" aria-label="{{.Value}}"> |
| 69 | + | {{end}} |
| 70 | + | {{end}} |
| 71 | + | </div> |
| 51 | 72 | | {{end}} |