<div class="grid actualites -middle">
{{ if .Page.IsHome }}
  {{ $pages := first 4 (where .Site.RegularPages "Type" "projets") }}
  {{ range $pages }}
    {{ partial "projet" . }}
  {{ end }}
{{ else }}
  {{ $pages := where .Site.RegularPages "Type" "projets" }}
  {{ range $pages }}
    {{ partial "projet" . }}
  {{ end }}
{{ end }}
</div>
