backend:
  name: git-gateway
  branch: content
# backend:
#   name: proxy
#   proxy_url: http://localhost:8081/api/v1
#   branch: content

site_url: https://api-v1--the-walks.netlify.app/admin/
media_folder: /static/medias/
editor:
  preview: false
show_preview_links: false


collections:
  - name: languages
    label: "Languages"
    folder: static/texts/
    slug: languageCode
    identifier_field: languageCode
    media_folder: /static/medias/
    fields:
      - label: Id
        name: id
        widget: string
      - label: Language Code
        name: languageCode
        widget: string
      - label: About
        name: body
        widget: markdown
        required: false
      - label: Credits
        name: credits
        widget: markdown
        required: false
      - label: Medias
        name: medias
        widget: list
        collapsed: false
        add_to_top: true
        required: false
        field:
          name: walk
          widget: relation
          collection: walks
          search_fields: [language, title, preTitle, afterTitle, shortTitle, body]
          value_field: "{{language}}_{{id}}"
          display_fields: ["{{language}} {{preTitle}} {{title}} {{afterTitle}} ({{language}}_{{id}})"]
  - name: walks
    label: "Walks"
    folder: static/texts/medias/
    slug: "{{language}}_{{id}}"
    identifier_field: id
    summary: "{{language}} {{preTitle}} {{title}} {{afterTitle}} ({{language}}_{{id}})"
    fields:
      - label: Id
        name: id
        widget: string
      - label: Listed
        name: listed
        widget: boolean
        default: true
      - label: Language
        name: language
        widget: relation
        collection: languages
        search_fields: [languageCode, title]
        value_field: languageCode
        display_fields: ["{{languageCode}} {{title}}"]
      - label: Short Title
        name: shortTitle
        widget: string
      - label: Pre Title
        name: preTitle
        widget: string
        required: false
      - label: Title
        name: title
        widget: string
      - label: After Title
        name: afterTitle
        widget: string
        required: false
      - label: Body
        name: body
        widget: markdown
        required: false
      - label: Two person
        name: twoPerson
        widget: boolean
        required: false
      - label: Pen and Paper
        name: penPaper
        widget: boolean
        required: false
      - duration: Duration
        name: duration
        widget: string
        required: false
      - label: Audio File
        name: srcUri
        widget: string
        required: false
      - label: Walk icon
        name: iconUri
        widget: image
        required: false
        media_library:
          config:
            multiple: false
            media_folder: /static/icons
      - label: Credits
        name: credits
        widget: markdown
        required: false
      - label: User Prompts
        name: userPrompt
        widget: list
        required: false
        collapsed: false
        fields:
          - label: Title
            name: title
            widget: text
          - label: Trigger Time (seconds)
            name: triggerTime
            widget: number
          - label: Loop Audio File
            name: srcUri
            widget: string
          - label: Actions
            name: actions
            widget: list
            required: false
            fields:
              - label: Title
                name: title
                widget: string
              - label: Action
                name: action
                widget: string
              - label: Post Action
                name: postAction
                widget: string
                required: false


        
  - name: news-index
    label: "News Index"
    folder: static/
    file: static/news_index.md
    identifier_field: news
    summary: Published news
    fields:
      - label: Published news
        name: news
        widget: list
        collapsed: false
        add_to_top: true
        summary: Post
        field:
          name: post
          widget: relation
          collection: news
          search_fields: [title, date, body]
          value_field: id
          display_fields: ["{{title}} - {{date}}"]
  - name: news
    label: News
    summary: "{{title}} - {{date}}"
    sortable_fields: ['date']
    folder: static/news
    create: true
    media_folder: /static/news/media/
    identifier_field: id
    slug: id
    fields:
      - {label: "Id", name: "id", widget: "string"}
      - label: "Title"
        name: "title"
        widget: "string"
      - label: "Place"
        name: "place"
        widget: "string"
        required: false
      - label: "Language"
        name: "language"
        widget: "string"
      - label: "Date"
        name: "date"
        widget: "string"
      - label: "Link"
        name: "linkUri"
        widget: "string"
  - name: imprint
    identifier_field: languageCode
    label: Imprint
    summary: "{{languageCode}}"
    folder: static/imprint
    create: true
    slug: "{{languageCode}}"
    fields:
      - label: Language
        name: languageCode
        widget: relation
        collection: languages
        search_fields: [languageCode, title]
        value_field: languageCode
        display_fields: ["{{languageCode}} {{title}}"]
      - label: "Body"
        name: body
        widget: markdown
  - name: legal
    identifier_field: languageCode
    label: Data Protection & Legal notices
    summary: "{{languageCode}}"
    folder: static/legal
    create: true
    slug: "{{languageCode}}"
    fields:
      - label: Language
        name: languageCode
        widget: relation
        collection: languages
        search_fields: [languageCode, title]
        value_field: languageCode
        display_fields: ["{{languageCode}} {{title}}"]
      - label: "Agreements"
        name: agreements
        widget: object
        fields:
          - {label: First, name: one, widget: string}
          - {label: Second, name: two, widget: string}
          - {label: Third, name: three, widget: string}
          - {label: Fourth, name: four, widget: string}
      - label: "Body"
        name: body
        widget: markdown

