# Each page blueprint must have a title, the title may be different from the file name
title: Card

# Page status can be limited, here to `draft` and `listed`.
# More about page status: https://getkirby.com/docs/reference/panel/blueprints/page#statuses
status:
  draft: true
  listed: true

# Define the form layout with two columns
# Columns are optional but help structure the form layout
# The first column defines an files section, the second a set of fields
# More about different types of sections: https://getkirby.com/docs/reference/panel/sections
# More about columns: https://getkirby.com/docs/guide/blueprints/layout#defining-columns

# The first column contains a set of fields to store
# information about the album.
#
# List of all available field types:
# https://getkirby.com/docs/reference/panel/fields
  # If you need the same field in multiple locations, you can define them once and reuse whereever needed.
  # Here we use a files field defined in `/site/blueprints/field/cover.yml`


columns:
  - width: 1/2
    fields:
      imageCover:
          label: Image de la Card
          extends: fields/cover
          layout: cards
          size: large
          image:
            ratio: 5/4
            cover: false
            back: white
  - width: 1/2
    fields:
      published:
        label: Publié en
        type: date
        default: today
        display: MMMM YYYY
      tags: true
      Home:
        label: Inclure à l'accueil?
        type: toggle
        width: 1/3
        text: 
          - "no"
          - "yes"
      macaron:
        label: Macaron ?
        width: 1/3
        type: select
        placeholder: Aucun
        options:
          nouveau: Nouveau
          avendre: À vendre
          personnalise: Personnalisé
      macaronPosition:
        label: Position du macaron
        width: 1/3
        type: select
        default: hautgauche
        options:
          hautgauche: en haut à gauche
          hautdroite: en haut à droite
          basgauche: en bas à gauche
          basdroite: en bas à droite
                  
      macaronPersonnalise:
        label : Macaron personnalisé
        type: files
        layout: cards
        template: blocks/image
        when:
          macaron: personnalise

  - width: 1/1
    fields:
      subheadline:
        label: Sous-titre
        type: writer
        marks:
          - bold
          - italic
          - strike
          - link
      Layout:
        type: layout
        label: Mise en page
        layouts:
          - "1/1"
          - "1/2, 1/2"
          - "1/3, 1/3, 1/3"
          - "1/3, 2/3"
          - "2/3, 1/3"
          - "1/4, 1/4, 1/4, 1/4"
          - "1/4, 1/4, 1/2"
          - "1/4, 1/2, 1/4"
          - "1/2, 1/4, 1/4"
        fieldsets:
          text:
            label: Text
            type: group
            fieldsets:
              - heading
              - text
              - list
          media:
            label: Media
            type: group
            fieldsets:
              - image
              - video
  - width: 1/1
    sections:
      fichiers:
        type: files