feat: Modification des images dans les actualités
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -1,5 +1,17 @@
|
||||
{{ define "main" }}
|
||||
<div class="container">
|
||||
{{ $headless := site.GetPage "/" }}
|
||||
{{ $imageSize := "1208x459 Center webp" }}
|
||||
{{ $image := default ($headless.Resources.GetMatch "**.jpg") (.Resources.GetMatch (default "**.jpg" .Params.image)) }}
|
||||
{{ if $image }}
|
||||
{{ $resized := $image.Fill $imageSize }}
|
||||
<img
|
||||
class="hero no-print"
|
||||
src="{{ $resized.RelPermalink }}"
|
||||
alt="{{ or .Params.image_ .Params.image_credit }}"
|
||||
title="{{ or .Params.image_ .Params.image_credit }}"
|
||||
/>
|
||||
{{ end }}
|
||||
<h1>{{ .RenderString .Title }}</h1>
|
||||
<div class="container news md">
|
||||
<small>
|
||||
|
Reference in New Issue
Block a user