title: Article
num: '{{ page.date.toDate("Ymd") }}'
icon: 📖

status:
  draft:
    label: Draft
    text: The article is still in draft mode. It can only be seen by editors with panel access.
  unlisted:
    label: In Review
    text: The article is online and can be visited with the direct URL. The team must still give the final go to publish it.
  listed:
    label: Published
    text: The article is online and listed in the blog

columns:
  main:
    width: 2/3
    fields:
      text:
        label: Texte de preview
        type: writer
        marks:
          - sup
      blocks:
        label: Contenu du blog
        type: blocks
      resultats:
        label: Résultats
        type: structure
        fields:
          image:
            extends: files/cover
            label: Image
            max: 1
          resultatMedia:
            label: Media
            type: text
          resultatDate:
            label: Date
            type: date
            display: DD/MM/YYYY
          resultatTitreArticle:
            label: Titre Article
            type: text
          resultatDescription:
            label: Description
            type: text
          resultatLienExterne:
            label: Lien externe
            type: link
          pdfFile:
            label: Fichier PDF
            type: files
            accept: document/pdf

  sidebar:
    width: 1/3
    # here we add two sections: a meta fields section and a files section to upload files we can select from in the heroImage field
    sections:
      meta:
        type: fields
        fields:
          heroImage:
            type: files
            max: 1
            label: Image de couverture
          date:
            type: date
            display: DD/MM/YYYY
            default: now
          dateComplement:
            type: text
            label: Complément de date
          role:
            label: Missions
            type: text
          filters:
              label: Domaine d'activités
              type: tags
              max: 1
              options:
                type: query
                query: site.find("categories").children
          clients:
            label: Client (Référence)
            type: tags
            options:
              type: query
              query: site.find("clients").children

