|
8 | 8 | {{ end }} |
9 | 9 |
|
10 | 10 | {{ if gt (len $related) 0 }} |
11 | | -<h3 id="o-related__title-{{ .identifier }}">{{ .title }}</h3> |
12 | | -<ul |
13 | | - class="o-related__list" |
14 | | - aria-labelledby="o-related__title-{{ .identifier }}" |
15 | | -> |
16 | | - {{ range $related }} |
17 | | - <li class="o-related__item"> |
18 | | - {{ $text := .LinkTitle }} |
19 | | - {{ if eq .Page.Type "news" }} |
20 | | - {{ $text = print (partial "icon" "newspaper") $text }} |
21 | | - {{ else if or (eq .Page.Type "operator") (eq .Page.Type "booking") }} |
22 | | - {{ $text = print (partial "operator-logo" (dict "operator" .File.ContentBaseName)) $text }} |
23 | | - {{ else if eq .Page.Type "country" }} |
24 | | - {{ $text = print (partial "flag" (dict "country" .File.ContentBaseName)) $text }} |
25 | | - {{ end }} |
| 11 | + <h3 id="o-related__title-{{ .identifier }}">{{ .title }}</h3> |
| 12 | + <ul |
| 13 | + class="o-related__list" |
| 14 | + aria-labelledby="o-related__title-{{ .identifier }}" |
| 15 | + > |
| 16 | + {{ range $related }} |
| 17 | + <li class="o-related__item"> |
| 18 | + {{ $text := .LinkTitle }} |
| 19 | + {{ if eq .Page.Type "news" }} |
| 20 | + {{ $text = print (partial "icon" "newspaper") $text }} |
| 21 | + {{ else if or (eq .Page.Type "operator") (eq .Page.Type "booking") }} |
| 22 | + {{ $text = print (partial "operator-logo" (dict "operator" .File.ContentBaseName)) $text }} |
| 23 | + {{ else if eq .Page.Type "country" }} |
| 24 | + {{ $text = print (partial "flag" (dict "country" .File.ContentBaseName)) $text }} |
| 25 | + {{ end }} |
26 | 26 |
|
27 | | - {{ partial "internal_link" ( |
28 | | - dict |
29 | | - "Destination" .RelPermalink |
30 | | - "Text" ($text | .Page.RenderString) |
31 | | - ) |
32 | | - }} |
| 27 | + {{ partial "internal_link" ( |
| 28 | + dict |
| 29 | + "Destination" .RelPermalink |
| 30 | + "Text" ($text | .Page.RenderString) |
| 31 | + ) |
| 32 | + }} |
33 | 33 |
|
34 | | - {{ if eq .Page.Type "news" }} |
35 | | - <span class="o-related__date" |
36 | | - >{{ .Date | time.Format ":date_long" }}</span |
37 | | - > |
| 34 | + {{ if eq .Page.Type "news" }} |
| 35 | + <span class="o-related__date" |
| 36 | + >{{ .Date | time.Format ":date_long" }}</span |
| 37 | + > |
| 38 | + {{ end }} |
| 39 | + </li> |
38 | 40 | {{ end }} |
39 | | - </li> |
40 | | - {{ end }} |
41 | | -</ul> |
| 41 | + </ul> |
42 | 42 | {{ end }} |
0 commit comments