backend:
  name: git-gateway
  repo: indevitus/fermented-film
  branch: main
  squash_merges: true
local_backend: true
media_folder: public/images
public_folder: /images
site_url: "https://fermented-film.netlify.app/"

publish_mode: editorial_workflow

collections:
  - label: "Site settings"
    name: settings
    summary: "Settings: Fermented Film"
    create: false
    delete: false
    editor:
      preview: false
    format: json
    folder: src/content/settings
    fields:
      - label: "SEO: Site title"
        name: title
        widget: string

      - label: "SEO: Site description"
        name: description
        widget: string

      - label: "SEO: Image"
        name: ogImage
        widget: image

      - label: "Custom copy text"
        name: bottomCopy
        hint: "The text above the large logo on footer and the mobile navigation."
        widget: string

      - label: "Featured projects"
        name: featuredProjects
        widget: "relation"
        collection: "projects"
        search_fields: ["title"]
        value_field: "title"
        display_fields: ["title"]
        hint: "At least 3 items for the stack to display."
        min: 3
        multiple: true
        required: false

  - label: "Navigation"
    name: navigation
    create: false
    delete: false
    editor:
      preview: false
    folder: src/content/navigation
    format: json
    identifier_field: name
    fields:
      - {label: "Name", name: name, widget: string}
      - label: "Items"
        label_singular: "Item"
        name: items
        widget: list
        allow_add: true
        collapsed: false
        fields:
          - {name: title, label: "Title", widget: string}
          - {name: path, label: "Path", widget: string}

  - label: "Pages"
    label_singular: "Page"
    name: "pages"
    create: true
    format: json
    folder: src/content/pages
    summary: "{{title}}"
    nested: { depth: 100 }
    fields:
      - label: "Title"
        name: "title"
        widget: string
        required: true
        hint: "This title is shown in the browser window."

      - label: "Path"
        name: "path"
        required: true
        widget: string

      - label: "Search engine optimization"
        name: "seo"
        widget: object
        collapsed: false
        required: false
        fields:
          - { label: "title", name: "title", widget: "string", required: false }
          - { label: "description", name: "description", widget: "string", required: false }
          - { label: "og:image", name: "ogImage", widget: "image", required: false }

      - label: "Sections"
        label_singular: "Section"
        name: "sections"
        collapsed: true
        required: true
        widget: list
        types:
          - label: "Hero section"
            name: "sections:hero"
            widget: object
            fields:
              - { label: "Section ID", name: "sid", widget: string, required: false }
              - { label: "Teaser Vimeo video ID", name: "vid", widget: number, required: false }
              - { label: "Reel Vimeo video ID", name: "rid", widget: number, required: false }
              - { label: "Image", name: image, widget: image, required: false}
              - { label: "Text", name: "text", widget: markdown, required: false }
              - label: "Call to action"
                name: "cta"
                widget: object
                required: false
                fields:
                  - { label: "Text", name: "text", widget: string, required: false }
                  - { label: "Icon", name: "icon", widget: select, options: ["earth", "email", "film"], required: false }
                  - { label: "Action", name: "action", widget: select, options: ["Play", "URL", "mailto"], required: false }
                  - { label: "Action meta", name: "actionMeta", widget: string, required: false, hint: "Note: Only enter this value if the action is >>NOT<< Play." }

          - label: "Animated section"
            name: "sections:animated"
            widget: object
            fields:
              - { label: "Section ID", name: "sid", widget: string, required: false }
              - { label: "Parentheses text", name: "ptext", widget: string, required: true, hint: "Note: The parentheses are added automatically." }
              - { label: "Animated text", name: "text", widget: string, required: true }
              - { label: "Description", name: "description", widget: string, required: true }
              - { label: "Picture", name: "img", widget: image, required: false }
              - { label: "Show lava lamp", name: "showLavaLamp", widget: boolean, required: false, default: true}

              - label: "Call to action"
                name: "cta"
                widget: object
                required: false
                fields:
                  - { label: "Text", name: "text", widget: string, required: false }
                  - { label: "Icon", name: "icon", widget: select, options: ["earth", "email", "film"], required: false }
                  - { label: "Action", name: "action", widget: select, options: ["URL", "mailto"], required: false }
                  - { label: "Action meta", name: "actionMeta", widget: string, required: false }

          - label: "Simple section"
            name: "sections:simple"
            widget: object
            fields:
              - { label: "Section ID", name: "sid", widget: string, required: false }
              - { label: "Parentheses text", name: "ptext", widget: string, required: true, hint: "Note: The parentheses are added automatically." }
              - { label: "Text", name: "text", widget: markdown, required: true }
              - { label: "Description", name: "description", widget: string, required: true }
              - { label: "Picture", name: "img", widget: image, required: true }

              - label: "Call to action"
                name: "cta"
                widget: object
                required: false
                fields:
                  - { label: "Text", name: "text", widget: string, required: false }
                  - { label: "Icon", name: "icon", widget: select, options: ["earth", "email", "film"], required: false }
                  - { label: "Action", name: "action", widget: select, options: ["URL", "mailto"], required: false }
                  - { label: "Action meta", name: "actionMeta", widget: string, required: false }

          - label: "Map section"
            name: "sections:map"
            widget: object
            fields:
              - { label: "Section ID", name: "sid", widget: string, required: false }
              - { label: "Parentheses text", name: "ptext", widget: string, required: true, hint: "Note: The parentheses are added automatically." }
              - { label: "Text", name: "text", widget: markdown, required: true }
              - { label: "Description", name: "description", widget: string, required: true }

              - label: "Call to action"
                name: "cta"
                widget: object
                required: false
                fields:
                  - { label: "Text", name: "text", widget: string, required: false }
                  - { label: "Icon", name: "icon", widget: select, options: ["earth", "email", "film"], required: false }
                  - { label: "Action", name: "action", widget: select, options: ["URL", "mailto"], required: false }
                  - { label: "Action meta", name: "actionMeta", widget: string, required: false}

          - label: "Project stack section"
            name: "sections:stack"
            widget: object
            fields:
              - { label: "Section ID", name: "sid", widget: string, required: false }
              - { label: "Leading text", name: "leading", widget: string, required: true }
              - { label: "Text", name: "text", widget: string, required: true }

              - label: "Call to action"
                name: "cta"
                widget: object
                required: true
                fields:
                  - { label: "Text", name: "text", widget: string, required: true }
                  - { label: "Icon", name: "icon", widget: select, options: ["earth", "email", "film"], required: true }
                  - { label: "Action", name: "action", widget: select, options: ["URL", "mailto"], required: true }
                  - { label: "Action meta", name: "actionMeta", widget: string, required: true }

          - label: "Slider section"
            name: "sections:slider"
            widget: object
            fields:
              - { label: "Section ID", name: "sid", widget: string, required: false }
              - { label: "Parentheses text", name: "ptext", widget: string, required: true, hint: "Note: The parentheses are added automatically." }
              - { label: "Text", name: "text", widget: markdown, required: true }
              - { label: "Description", name: "description", widget: string, required: true }

              - label: "Slides"
                label_singular: "Slide"
                name: slides
                widget: list
                required: true
                min: 4
                fields:
                  - { label: "Title", name: "title", widget: string, required: true }
                  - { label: "Description", name: "description", widget: string, required: true }

          - label: "Marquee section"
            name: "sections:marquee"
            widget: object
            fields:
              - { label: "Section ID", name: "sid", widget: string, required: false }
              - { label: "Text", name: "text", widget: string, required: true }

              - label: "Call to action"
                name: "cta"
                widget: object
                required: true
                fields:
                  - { label: "Icon", name: "icon", widget: select, options: ["earth", "email", "film"], required: true }
                  - { label: "Action", name: "action", widget: select, options: ["URL", "mailto"], required: true }
                  - { label: "Action meta", name: "actionMeta", widget: string, required: true }

          - label: "Picture showcase section"
            name: "sections:showcase"
            widget: object
            fields:
              - { label: "Section ID", name: "sid", widget: string, required: false }
              - label: "Parentheses Title"
                name: ptitle
                widget: object
                required: false
                fields:
                  - { label: "Parentheses text", name: "ptext", widget: string, required: false, hint: "Note: The parentheses are added automatically." }
                  - { label: "Text", name: "text", widget: markdown, required: false }

              - label: "Title & description"
                name: content
                widget: object
                required: false
                fields:
                  - { label: "Title", name: "title", widget: string, required: false }
                  - { label: "Description", name: "description", widget: string, required: false }

              - label: "Picture"
                name: "img"
                widget: list
                fields:
                  - { label: "Url", name: "url", widget: image, required: true }
                  - { label: "Alt", name: "alt", widget: string, required: false }

          - label: "Projects showcase section"
            name: "sections:projects"
            widget: object
            fields:
              - { label: "Section ID", name: "sid", widget: string, required: false }
              - { label: "Parentheses text", name: "ptext", widget: string, required: true, hint: "Note: The parentheses are added automatically." }
              - { label: "Text", name: "text", widget: string, required: true }

          - label: "Project contact us section"
            name: "sections:contact"
            widget: object
            fields:
              - { label: "Section ID", name: "sid", widget: string, required: false }
              - { label: "Parentheses text", name: "ptext", widget: string, required: true, hint: "Note: The parentheses are added automatically." }
              - { label: "Text", name: "text", widget: markdown, required: true }
              - { label: "Description", name: "description", widget: string, required: true }

              - label: "Locations"
                name: locations
                widget: list
                required: true
                fields:
                  - { label: "Country", name: "country", widget: string, required: true }
                  - { label: "Address", name: "address", widget: string, required: true }
                  - { label: "City", name: "city", widget: markdown, required: true }
                  - { label: "Phone number", name: "phoneNumber", widget: string, required: true, hint: "Note: '+' sign will be added automatically" }

              - label: "Call to action"
                name: "cta"
                widget: object
                required: false
                fields:
                  - { label: "Text", name: "text", widget: string, required: false }
                  - { label: "Icon", name: "icon", widget: select, options: ["earth", "email", "film"], required: false }
                  - { label: "Action", name: "action", widget: select, options: ["URL", "mailto"], required: false }
                  - { label: "Action meta", name: "actionMeta", widget: string, required: false }

  - label: "Custom pages"
    label_singular: "Custom page"
    name: "custom-pages"
    create: true
    folder: src/content/custom-pages
    nested: { depth: 100 }
    meta: { path: { widget: string, label: 'Path', index_file: 'index' } }
    fields:
      - label: "Page title"
        name: title
        widget: string

      - label: "Body"
        name: body
        widget: markdown


  - label: "Projects"
    label_singular: "Project"
    name: projects
    create: true
    delete: true
    editor:
      preview: false
    format: json
    folder: src/content/projects
    nested: { depth: 100 }
    fields:
      - label: "Title"
        name: title
        widget: string

      - label: "Description"
        name: description
        widget: markdown
        required: false

      - label: "Cover Image"
        name: coverImage
        widget: image

      - label: "Vimeo video ID"
        name: vid
        widget: number

      - label: "Client"
        name: client
        widget: string
        required: false

      - label: "Director"
        name: director
        widget: string
        required: false

      - label: "Service"
        name: service
        hint: "This value is shown in the project preview, along the title and cover image."
        widget: string

      - label: "Agency"
        name: agency
        widget: string
        required: false

      - label: "Production"
        name: production
        widget: string

      - label: "Year"
        name: year
        widget: string
        required: false

      - label: "Disclaimer"
        name: disclaimer
        widget: string
        required: false

      - label: "Call to action"
        name: "cta"
        widget: object
        required: false
        fields:
          - { label: "Text", name: "text", widget: string, required: false }
          - { label: "Icon", name: "icon", widget: select, options: ["earth", "email", "film"], required: false }
          - { label: "Action", name: "action", widget: select, options: ["URL", "mailto"], required: false }
          - { label: "Action meta", name: "actionMeta", widget: string, required: false }

      - label: "Published date"
        name: publishedDate
        widget: datetime
        default: '{{now}}'
