local_backend: true

backend:
  name: git-gateway
  repo: julesjung/ilsuffitdepasserlepont
  branch: main
  commit_messages:
    create: "chore: create {{slug}} in {{collection}}"
    update: "chore: update {{slug}} in {{collection}}"
    delete: "chore: delete {{slug}} from {{collection}}"
    uploadMedia: "chore: upload {{path}}"
    deleteMedia: "chore: upload {{path}}"
    openAuthoring: "{{message}}"

locale: "fr"

slug:
  encoding: "ascii"
  clean_accents: true

collections:
  - name: "editions"
    label: "Editions"
    label_singular: "Edition"
    folder: "src/content/editions"
    create: true
    identifier_field: "year"
    path: "{{slug}}/index"
    fields:
      - label: "Année"
        name: "year"
        widget: "number"
      - label: "Affiche"
        name: "poster"
        widget: "image"
        choose_url: false
      - label: "Bannière"
        name: "banner"
        widget: "image"
        choose_url: false
      - label: "Artistes"
        name: "artists"
        widget: "relation"
        collection: "artists"
        search_fields: ["fullname"]
        value_field: "{{slug}}"
        display_fields: ["fullname"]
        options_length: 50
        multiple: true
      - label: "Evénements"
        label_singular: "Evénement"
        name: "events"
        widget: "list"
        fields:
          - label: "Nom"
            name: "name"
            widget: "string"
          - label: "Artistes"
            name: "artists"
            widget: "relation"
            collection: "artists"
            search_fields: ["fullname"]
            value_field: "{{slug}}"
            display_fields: ["fullname"]
            required: false
            multiple: true
          - label: "Description"
            name: "description"
            widget: "text"
          - label: "Prix"
            name: "price"
            widget: "number"
            value_type: "float"
            required: false
          - label: "Lieu"
            name: "location"
            widget: "string"
            required: false
          - label: "Horaires"
            name: "schedule"
            widget: "list"
            fields:
              - label: "Début"
                name: "start"
                widget: "datetime"
              - label: "Fin"
                name: "end"
                widget: "datetime"
                required: false
          - label: "Image"
            name: "image"
            widget: "image"
            choose_url: false
            media_folder: "events"
      - label: "Partenaires"
        name: "partners"
        widget: "relation"
        collection: "partners"
        search_fields: ["name"]
        value_field: "{{slug}}"
        display_fields: ["name"]
        required: false
        multiple: true
      - label: "Texte"
        name: "body"
        widget: "markdown"
        required: false
      - label: "Photos"
        name: "photos"
        widget: "image"
        required: false
        choose_url: false
        media_folder: "photos"
        media_library:
          config:
            multiple: true
  - name: "artists"
    label: "Artistes"
    label_singular: "Artiste"
    folder: "src/content/artists"
    create: true
    identifier_field: "fullname"
    path: "{{slug}}/index"
    fields:
      - label: "Nom complet"
        name: "fullname"
        widget: "string"
      - label: "Nom"
        name: "name"
        widget: "object"
        required: false
        fields:
          - label: "Prénom"
            name: "first"
            widget: "string"
            required: false
          - label: "Nom"
            name: "last"
            widget: "string"
            required: false
      - label: "Informations"
        name: "infos"
        widget: list
        fields:
          - label: "Pictogramme"
            name: "icon"
            widget: "select"
            options:
              - { label: "Lien", value: "link" }
              - { label: "Instagram", value: "brand-instagram" }
              - { label: "Facebook", value: "brand-facebook" }
              - { label: "YouTube", value: "brand-youtube" }
              - { label: "Spotify", value: "brand-spotify" }
              - { label: "Téléphone", value: "phone" }
              - { label: "E-mail", value: "mail" }
              - { label: "Lieu", value: "map-pin" }
          - label: "Texte"
            name: "text"
            widget: "string"
          - label: "URL"
            name: "url"
            widget: "string"
            required: false
        required: false
      - label: "Photo de profil"
        name: "portrait"
        widget: "image"
        choose_url: false
        required: false
      - label: "Bannière"
        name: "banner"
        widget: "image"
        choose_url: false
        required: false
      - label: "Photos"
        name: "photos"
        widget: "image"
        choose_url: false
        required: false
        media_folder: "photos"
        media_library:
          config:
            multiple: true
      - label: "Présentation"
        name: "body"
        widget: "markdown"
        required: false
  - name: "partners"
    label: "Partenaires"
    label_singular: "Partenaire"
    folder: "src/content/partners"
    create: true
    identifier_field: "name"
    path: "{{slug}}/index"
    fields:
      - label: "Nom"
        name: "name"
        widget: "string"
      - label: "Photo"
        name: "picture"
        widget: "image"
        choose_url: false
  - label: "Revue de presse"
    label_singular: "Article"
    name: "press"
    create: true
    folder: "src/content/press"
    identifier_field: "title"
    path: "{{slug}}/index"
    fields:
      - label: "Titre"
        name: "title"
        widget: "string"
      - label: "Photo"
        name: "photo"
        widget: "image"
        choose_url: false
      - label: "Journal"
        name: "newspaper"
        widget: "string"
      - label: "Date"
        name: "date"
        widget: "datetime"
        date_format: "L"
        required: false

media_folder: "src/assets/uploads"
public_folder: "src/assets/uploads"
