Skip to content

Commit fecf36a

Browse files
authored
Merge pull request #32 from fipguide/feat/lennart
fix: implement custom logos
2 parents b4a95a1 + c77f23f commit fecf36a

File tree

7 files changed

+29
-9
lines changed

7 files changed

+29
-9
lines changed

assets/svg/logos/eurostar.svg

Lines changed: 3 additions & 0 deletions
Loading

assets/svg/logos/ns.svg

Lines changed: 3 additions & 0 deletions
Loading

assets/svg/logos/sncb.svg

Lines changed: 3 additions & 0 deletions
Loading

assets/svg/logos/zsr.svg

Lines changed: 3 additions & 0 deletions
Loading

content/news/2/image.webp

2.67 MB
Binary file not shown.

layouts/operator/list.html

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,18 @@ <h2 data-pagefind-meta="title">{{ i18n $key }}</h2>
1010
<a href="https://github.com/orgs/fipguide/projects/3">{{ T "list-disclaimer-link"}}</a>.
1111
</p>
1212
</div>
13-
<ul>
14-
{{ .Content }} {{ range .Pages }}
15-
<li>
16-
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
17-
</li>
18-
{{ end }}
19-
</ul>
13+
<div class="row">
14+
{{ .Content }} {{ range .Pages }}
15+
<a href="{{ .RelPermalink }}" class="col-12 col-lg-4 col-sm-6 o-list__link">
16+
<div class="o-list__picture">
17+
{{ $object := replace .Path (printf "/%s/" .Page.Type) "" }}
18+
{{ partial "ico" (dict "icon" $object "theme" "logos" "size" "50") }}
19+
</div>
20+
<div>
21+
{{ .Title }}
22+
</div>
23+
</a>
24+
{{ end }}
25+
</div>
2026
</div>
2127
{{ end }}

layouts/partials/sidemenu.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ <h3 id="related">{{ T "_operator__list_title"}}</h3>
3333
{{ $related := .Site.RegularPages.RelatedIndices . "country" }}
3434
{{ with $related }}
3535
{{ range . }}
36+
{{ $object := replace .Path (printf "/%s/" .Page.Type) "" }}
3637
<li>
3738
<a id="{{ .LinkTitle }}" href="{{ .RelPermalink }}">
38-
{{ partial "ico" (dict "icon" "view_cozy" ) }}
39+
{{ partial "ico" (dict "icon" $object "theme" "logos" "size" "35" ) }}
3940
{{ .LinkTitle }}
4041
</a>
4142
</li>
@@ -52,9 +53,10 @@ <h3 id="related">{{ T "_operator__nearby"}}</h3>
5253
<ul aria-labelledby="related">
5354
{{ range . }}
5455
{{ if eq .Page.Type "operator" }}
56+
{{ $object := replace .Path (printf "/%s/" .Page.Type) "" }}
5557
<li>
5658
<a id="{{ .LinkTitle }}" href="{{ .RelPermalink }}">
57-
{{ partial "ico" (dict "icon" "view_cozy" ) }}
59+
{{ partial "ico" (dict "icon" $object "theme" "logos" "size" "35") }}
5860
{{ .LinkTitle }}
5961
</a>
6062
</li>

0 commit comments

Comments
 (0)