


local_backend: true



backend:

  name: git-gateway
  repo: platoniq/platoniq.net
  branch: main
  squash_merges: true

locale: es

media_folder: "media"

# publish_mode: editorial_workflow # Enable drafts

i18n:
  # Required and can be one of multiple_folders, multiple_files or single_file
  # multiple_folders - persists files in `<folder>/<locale>/<slug>.<extension>`
  # multiple_files - persists files in `<folder>/<slug>.<locale>.<extension>`
  # single_file - persists a single file in `<folder>/<slug>.<extension>`
  structure: multiple_folders

  # Required - a list of locales to show in the editor UI
  locales: &locales [es, en, cat]

  # Optional, defaults to the first item in locales.
  # The locale to be used for fields validation and as a baseline for the entry.
  default_locale: es


collections:

  

  
  - name: Pages 
    label: Pages
    label_singular: Page
    folder: "_pages"
    i18n:
      structure: multiple_folders
      locales: *locales
    fields:
      - label: Layout
        name: layout
        widget: hidden
        default: common_pages 
        i18n: duplicate
      - label: Slug
        name: slug
        hint: "Identificador único, compartido entre los distintos idiomas"
        widget: string
        i18n: duplicate
      - label: Título
        name: title
        widget: string
        i18n: translate
      - label: Descripción
        name: description
        widget: markdown
        i18n: translate
      - label: Subtitle
        name: subtitle
        widget: string
        i18n: translate
      - label: Image
        name: Image
        widget: object
        i18n: true
        fields:
          - label: Imagen
            name: path
            widget: image
            choose_url: false
            default: "/media/pages/photo-1452745872182-022042dead8f.jpg"
            media_library: { config: { multiple: false } }
            media_folder: "/media/pages"
            i18n: duplicate
          - label: Texto alternativo a la imagen
            name: alt
            widget: string
            i18n: translate
      - label: Contenido de la página
        name: body
        widget: markdown
        i18n: true



  

  
  - name: projects
    label: Proyectos
    label_singular: Proyecto
    folder: "_projects"
    i18n:
      structure: multiple_folders
      locales: *locales
    create: true
    editor:
      preview: true
    sortable_fields: ["date", "state"]
    fields:

      - label: Layout
        name: layout
        widget: hidden
        default: project
        i18n: duplicate

      - label: Slug
        name: slug
        hint: "Identificador único, compartido entre los distintos idiomas"
        widget: string
        i18n: duplicate

      - label: Estado
        name: state
        widget: relation
        collection: states
        search_fields: [title]
        value_field: slug
        i18n: duplicate

      - label: Título
        name: title
        widget: string
        i18n: translate

      - label: Subtítulo
        name: subtitle
        widget: markdown
        i18n: translate

      - label: Banner image
        name: banner_image
        widget: object
        i18n: true
        fields:
          - label: Imagen
            name: path
            widget: image
            choose_url: false
            default: "/media/projects/photo-1452745872182-022042dead8f.jpg"     
            media_library: { config: { multiple: false } }
            media_folder: "/media/projects"                
            i18n: duplicate
          - label: Texto alternativo a la imagen
            name: alt
            widget: string
            i18n: translate

      - label: Fecha inicio
        name: date_start
        widget: datetime
        i18n: duplicate

      - label: Fecha fin
        name: date_end
        widget: datetime
        i18n: duplicate

      - label: Descripción
        name: description
        widget: markdown
        i18n: translate

      - label: Presupuesto
        name: budget
        widget: string 
        i18n: duplicate

      - label: Porcentaje privado
        name: private_percentage
        widget: string 
        i18n: duplicate

      - label: Porcentaje público
        name: public_percentage
        widget: string 
        i18n: duplicate

      - label: Porcentaje en busca de financiación
        name: looking_finance_percentage
        widget: string 
        i18n: duplicate

      - label: Servicios
        name: services
        widget: relation
        collection: services
        search_fields: [title]
        value_field: slug
        multiple: true
        i18n: duplicate

      - label: Categorías
        name: categories
        widget: relation
        collection: categories
        search_fields: [title]
        value_field: slug
        multiple: true
        i18n: duplicate

      - label: Miembros
        name: members
        widget: relation
        collection: members
        search_fields: [title]
        value_field: slug
        multiple: true
        i18n: duplicate

      - label: Colaboradores
        name: collaborators
        widget: relation
        collection: collaborators
        search_fields: [title]
        value_field: slug
        multiple: true
        i18n: duplicate

      - label: Call To Action
        name: call_to_action 
        widget: object
        i18n: true
        fields:
          - label: Imagen
            name: image_path
            widget: image
            choose_url: false
            default: "/media/site-symbols/info.png"
            media_library: { config: { multiple: false } }
            media_folder: "/media/projects"
            i18n: duplicate
          - label: Texto alternativo a la imagen
            name: image_alt 
            widget: string
            i18n: translate
          - label: Text
            name: text
            widget: string
            i18n: translate
          - label: Url
            name: url
            widget: string
            i18n: duplicate
          - label: Url Text
            name: url_text
            i18n: translate

      - label: Contenido de la página
        name: body
        widget: markdown
        editor_components: ["metrics-tag"]
        i18n: true






  

  
  - name: services
    label: Services
    label_singular: Service
    folder: "_services"
    i18n:
      structure: multiple_folders
      locales: *locales
    create: true
    editor:
      preview: true
    fields:
      - label: Layout
        name: layout
        widget: hidden
        default: service
        i18n: duplicate

      - label: Slug
        name: slug
        hint: "Identificador único, compartido entre los distintos idiomas"
        widget: string
        i18n: duplicate

      - label: Título
        name: title
        widget: string
        i18n: translate

      - label: Descripción
        name: description
        widget: markdown
        i18n: translate

      - label: Image
        name: image
        widget: object
        i18n: true
        fields:
          - label: Imagen
            name: path
            widget: image
            choose_url: false
            default: "/media/projects/photo-1452745872182-022042dead8f.jpg"
            media_library: { config: { multiple: false } }
            media_folder: "/media/services"
            i18n: duplicate
          - label: Texto alternativo a la imagen
            name: alt
            widget: string
            i18n: translate

      - label: Contenido de la página
        name: body
        widget: markdown
        i18n: true

      - label: Colaboradores
        name: collaborators
        widget: relation
        collection: collaborators
        search_fields: [title]
        value_field: slug
        multiple: true
        i18n: duplicate

      - label: Call To Action
        name: call_to_action 
        widget: object
        i18n: true
        fields:
          - label: Imagen
            name: image_path
            widget: image
            choose_url: false
            default: "/media/site-symbols/info.png"
            media_library: { config: { multiple: false } }
            media_folder: "/media/services"
            i18n: duplicate
          - label: Texto alternativo a la imagen
            name: image_alt 
            widget: string
            i18n: translate
          - label: Text
            name: text
            widget: string
            i18n: translate
          - label: Url
            name: url
            widget: string
            i18n: duplicate
          - label: Url Text
            name: url_text
            i18n: translate



  

  
  - name: categories
    label: Categories
    label_singular: Category
    folder: "_categories"
    i18n:
      structure: multiple_folders
      locales: *locales
    create: true
    editor:
      preview: true
    fields:

      - label: Layout
        name: layout
        widget: hidden
        default: category
        i18n: duplicate

      - label: Call to action
        name: call_to_action
        widget: hidden
        default: cta-contact-service
        i18n: duplicate

      - label: Slug
        name: slug
        hint: "Identificador único, compartido entre los distintos idiomas"
        widget: string
        i18n: duplicate

      - label: Título
        name: title
        widget: string
        i18n: translate

      - label: Subtítulo
        name: subtitle
        widget: markdown
        i18n: translate

      - label: Banner symbol
        name: symbol
        widget: object
        i18n: true
        fields:
          - label: Imagen
            name: path
            widget: image
            choose_url: false
            default: "/media/categories/symbol_cultura.png"            
            media_library: { config: { multiple: false } }
            media_folder: "/media/categories"                 
            i18n: duplicate
          - label: Texto alternativo a la imagen
            name: alt
            widget: string
            i18n: translate

      - Label: Servicios
        name: services
        widget: relation
        collection: services
        search_fields: [title]
        value_field: slug
        multiple: true
        i18n: duplicate



  

  
  - name: members
    label: Member
    label_singular: Member
    folder: "_members"
    i18n:
      structure: multiple_folders
      locales: *locales
    create: true
    editor:
      preview: true
    fields:

      - label: Slug
        name: slug
        hint: "Identificador único, compartido entre los distintos idiomas"
        widget: string
        i18n: duplicate

      - label: Nombre
        name: title
        widget: string
        i18n: duplicate
      
      - label: type
        name: type
        widget: select
        options: [author, colaborator]
        i18n: duplicate

      - label: Image
        name: image
        widget: object
        i18n: true
        fields:
          - label: Imagen
            name: path
            widget: image
            choose_url: false
            default: "/media/members/heart.png"            
            media_library: { config: { multiple: false } }
            media_folder: "/media/members"                 
            i18n: duplicate
          - label: Texto alternativo a la imagen
            name: alt
            widget: string
            i18n: translate

      - label: Cargo
        name: position
        widget: string
        i18n: translate

      - label: Descripción
        name: description
        widget: markdown
        i18n: translate

      - label: Email
        name: email
        widget: string
        i18n: duplicate

      - label: Facebook
        name: facebook
        widget: string
        i18n: duplicate
        required: false
      
      - label: X (Twitter)
        name: twitter
        widget: string
        i18n: duplicate
        required: false

      - label: LinkedIn
        name: linkedin
        widget: string
        i18n: duplicate
        required: false




  

  
  - name: collaborators
    label: Collaborators
    label_singular: Collaborator
    folder: "_collaborators"
    i18n:
      structure: multiple_folders
      locales: *locales
    create: true
    editor:
      preview: true
    sortable_fields: ["date"]
    fields:

    - label: Slug
      name: slug
      hint: "Identificador único, compartido entre los distintos idiomas"
      widget: string
      i18n: duplicate

    - label: Nombre
      name: title
      widget: string
      i18n: duplicate

    - label: Logo
      name: logo
      widget: object
      i18n: true
      fields:
        - label: Imagen
          name: path
          widget: image
          choose_url: false
          default: "/media/collaborators/greenpeace.png"
          media_library: { config: { multiple: false } }
          media_folder: "/media/collaborators"
          i18n: duplicate
        - label: Texto alternativo a la imagen
          name: alt
          widget: string
          i18n: translate
    - label: Web
      name: web
      widget: string
      i18n: duplicate



  

  
  - name: states
    label: States
    label_singular: State
    folder: "_states"
    i18n:
      structure: multiple_folders
      locales: *locales
    create: true
    editor:
      preview: false
    fields:

      - label: Slug
        name: slug
        hint: "Identificador único, compartido entre los distintos idiomas"
        widget: string
        i18n: duplicate

      - label: Título
        name: title
        widget: string
        i18n: translate

      - label: Color
        name: color
        widget: string
        i18n: duplicate



  

  
  - name: offers
    label: Offers
    label_singular: Offer
    folder: "_offers"
    i18n:
      structure: multiple_folders
      locales: *locales
    create: true
    editor:
      preview: false
    fields:

      - label: Offer
        name: layout
        widget: hidden
        default: offer
        i18n: duplicate

      - label: Call to action
        name: call_to_action
        widget: hidden
        default: cta-contact-offer
        i18n: duplicate

      - label: Slug
        name: slug
        hint: "Identificador único, compartido entre los distintos idiomas"
        widget: string
        i18n: duplicate

      - label: Título
        name: title
        widget: string
        i18n: translate

      - label: Subtítulo
        name: subtitle
        widget: string
        i18n: translate

      - label: Contenido de la página
        name: body
        widget: markdown
        i18n: true





