Skip to content

Commit

Permalink
Nettoyage du partiel de logo des formations et diplômes (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisben authored Oct 23, 2024
1 parent 13a9acf commit 37153ad
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
3 changes: 1 addition & 2 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,8 @@ params:
truncate_description: 200 # Set to 0 to disable truncate
single:
options:
logo: true
diploma: true # option qui n'a pas de raison d'etre utilisée dans le single
diploma_certification: true
logo: true
website_link: true
# share_links: # Optional
# enabled: true
Expand Down
17 changes: 9 additions & 8 deletions layouts/partials/diplomas/certification-logo.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{{- $diploma := site.GetPage (printf "/diplomas/%s" .) -}}
{{- with $diploma -}}
{{ $diploma_id := .Params.certification }}
{{ if fileExists (printf "themes/osuny/static/assets/images/certifications/diplomas/%s.svg" $diploma_id)}}
<picture class="diploma-certification">
<img src="/assets/images/certifications/diplomas/{{$diploma_id}}.svg" alt="logo {{$diploma_id}} ">
</picture>
{{end}}

{{- with site.GetPage (printf "/diplomas/%s" .) -}}
{{ with .Params.certification }}
{{ if fileExists (printf "themes/osuny/static/assets/images/certifications/diplomas/%s.svg" .) }}
<picture class="diploma-certification">
<img src="/assets/images/certifications/diplomas/{{- . -}}.svg" alt="logo {{ . }}">
</picture>
{{ end }}
{{ end }}
{{ end }}
16 changes: 8 additions & 8 deletions layouts/partials/programs/hero-logos.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{{ if (or site.Params.programs.single.options.logo site.Params.programs.single.options.diploma_certification)}}
{{ if or site.Params.programs.single.options.logo site.Params.programs.single.options.diploma_certification }}
<div class="hero-logos">
{{- if and site.Params.programs.single.options.logo .Params.logo -}}
{{ if and site.Params.programs.single.options.logo .Params.logo }}
<div class="logo">
{{ partial "commons/image.html"
(dict
"image" .Params.logo
"lazy" false
) }}
(dict
"image" .Params.logo
"lazy" false
) }}
</div>
{{ end }}
{{ end }}
{{ if site.Params.programs.single.options.diploma_certification }}
{{ partial "diplomas/certification-logo.html" .Params.diplomas }}
{{end}}
{{ end }}
</div>
{{ end }}

0 comments on commit 37153ad

Please sign in to comment.