backend:
  name: github
  repo: elastx/elastx-web
  branch: master
  base_url: https://cms-auth.elastx.se/
  auth_endpoint: /auth/github

local_backend: true

publish_mode: editorial_workflow

media_folder: 'src/assets/uploads'
public_folder: '/assets/uploads'

i18n:
  structure: multiple_folders
  locales: [se, en]
  default_locale: se

collections:
  - name: pages
    label: 'Pages'
    i18n:
      structure: single_file
    format: 'json'
    files:
      - label: 'Start Page'
        name: start
        file: '_data/pages/start.json'
        i18n: true
        preview_path: /
        fields:
          - { label: 'Site title', name: siteTitle, widget: string, i18n: true }
          - label: 'Hero section'
            name: hero
            i18n: true
            widget: object
            collapsed: false
            fields:
              - { label: 'Title', name: title, widget: string, i18n: true }
              - { label: 'Subtitle', name: subtitle, widget: text, i18n: true }
              - label: 'Testimonials'
                name: testimonials
                widget: list
                i18n: true
                fields:
                  - { label: 'Quote', name: quote, widget: text, i18n: true }
                  - {
                      label: 'Quote source',
                      name: quote_source,
                      widget: string,
                      i18n: true,
                    }
              - {
                  label: 'Button text',
                  name: primary_button_text,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Button link',
                  name: primary_button_href,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Secondary button text',
                  name: secondary_button_text,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Secondary button link',
                  name: secondary_button_href,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Open link in a new tab',
                  name: 'targetBlank',
                  widget: 'boolean',
                  hint: 'Check this box if the link leads to an external page',
                  default: false,
                  required: false,
                }
              - label: 'Subtitle links'
                name: subtitle_links
                widget: list
                i18n: true
                required: false
                hint: 'Links to be displayed under the text on the left.'
                fields:
                  - {
                      label: 'Link image',
                      name: link_image,
                      widget: image,
                      i18n: true,
                    }
                  - {
                      label: 'Link URL',
                      name: link_url,
                      widget: string,
                      i18n: true,
                    }
              - { label: 'Background image', name: hero_image, widget: image }
              - {
                  label: 'Background mobile image',
                  name: hero_mobile_image,
                  widget: image,
                }
              - {
                  label: 'Background video',
                  name: hero_video,
                  widget: file,
                  required: false,
                }
          - label: 'Banner'
            name: banner
            i18n: true
            widget: object
            collapsed: false
            required: false
            fields:
              - label: 'Quote'
                name: quote
                widget: object
                i18n: true
                required: false
                fields:
                  - { label: 'Text', name: text, widget: string, il8n: true }
                  - {
                      label: 'Source',
                      name: source,
                      widget: string,
                      il8n: true,
                    }
              - label: 'Content'
                name: content
                widget: object
                i18n: true
                required: false
                fields:
                  - { label: 'Text', name: text, widget: string, il8n: true }
                  - label: 'Icons'
                    name: banner_icons
                    widget: list
                    max: 3
                    i18n: true
                    fields:
                      - { label: 'Image', name: src, widget: image }
                      - {
                          label: 'Link to',
                          name: href,
                          widget: string,
                          i18n: true,
                          required: false,
                        }
                      - {
                          label: 'External link',
                          name: external_link,
                          widget: 'boolean',
                          hint: 'Check this box if the link leads to an external page',
                          default: false,
                        }
          - label: 'Content Blocks'
            label_singular: 'Content Block'
            name: body
            i18n: true
            widget: list
            types:
              - label: 'Ingress'
                name: body_ingress
                widget: object
                summary: '{{field.text}}'
                fields:
                  - { label: 'Ingress text', name: text, widget: text }
              - label: 'Body text'
                name: body_text
                widget: object
                summary: '{{fields.text}}'
                fields:
                  - {
                      label: 'Body text',
                      name: text,
                      widget: markdown,
                      buttons:
                        [
                          bold,
                          italic,
                          link,
                          heading-three,
                          bulleted-list,
                          numbered-list,
                          code,
                        ],
                      editor_components: [code-block],
                      minimal: true,
                    }
              - label: 'Image'
                name: body_image
                widget: object
                fields:
                  - {
                      label: 'Image',
                      name: src,
                      widget: image,
                      hint:
                        'Remember to adjust the image size. The width of the image should be maximum
                        1500px. And remember to compress the image. If the file size is too large it
                        will slow down the page.',
                    }
                  - {
                      label: 'Image alt text',
                      name: alt,
                      widget: string,
                      required: false,
                      hint: 'Will be used as description of the image for screen readers etc',
                    }
              - label: 'Video'
                name: body_video
                widget: object
                fields:
                  - { label: 'Video file', name: video_src, widget: file }
                  - {
                      label: 'Video poster image',
                      name: poster_image,
                      widget: image,
                    }
              - label: 'CTA (Call to action text and button)'
                name: body_cta
                widget: object
                fields:
                  - { label: 'Text', name: cta_text, widget: text }
                  - { label: 'Button label', name: cta_label, widget: string }
                  - { label: 'Button link', name: cta_link, widget: string }
                  - {
                      label: 'Open link in a new tab',
                      name: 'targetBlank',
                      widget: 'boolean',
                      hint: 'Check this box if the link leads to an external page',
                      default: false,
                      required: false,
                    }
          - label: 'Tell Me More section'
            name: tell_me_more_section
            i18n: true
            widget: list
            collapsed: false
            fields:
              - { label: 'Title', name: title, widget: string, i18n: true }
              - { label: 'Text', name: text, widget: text, i18n: true }
              - {
                  label: 'Icon',
                  name: icon,
                  widget: image,
                  hint: 'Should be in SVG format',
                }
              - {
                  label: 'Form ingress text',
                  name: form_ingress_text,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Close button text',
                  name: close_button_text,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Open button text',
                  name: tell_me_more_button_text,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Primary button label',
                  name: primary_button_label,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Primary button link',
                  name: primary_button_link,
                  widget: string,
                  i18n: true,
                }
          - label: 'Features section'
            name: features_section
            i18n: true
            widget: object
            collapsed: false
            fields:
              - label: 'Hero background'
                name: heroBg
                widget: list
                i18n: true
                fields:
                  - {
                      label: 'Hero background',
                      name: image,
                      widget: image,
                      hint: 'Background image for card section on desktop',
                      required: false,
                    }
              - label: 'Hero cards'
                name: heroCards
                widget: list
                i18n: true
                fields:
                  - { label: 'Title', name: title, widget: string, i18n: true }
                  - {
                      label: 'Text',
                      name: body,
                      widget: markdown,
                      i18n: true,
                      buttons: [bold, italic, link],
                      editor_components: [],
                      minimal: true,
                    }
                  - {
                      label: 'Icon',
                      name: icon,
                      widget: image,
                      hint: 'Should be in SVG format',
                    }
                  - {
                      label: 'Feature Card',
                      name: isFeatureCard,
                      widget: 'boolean',
                      hint: 'True sets this card as first in line',
                    }
                  - {
                      label: 'Full width',
                      name: isFullWidth,
                      widget: 'boolean',
                      hint: 'Sets full width on card. Use with Feature card',
                    }
                  - {
                      label: 'Section id',
                      name: section_id,
                      widget: string,
                      i18n: false,
                      hint: 'This id is used to link the Read more button to corresponding service page',
                    }
          - label: 'Image and text section'
            name: image_and_text_section
            i18n: true
            widget: object
            collapsed: false
            fields:
              - {
                  label: 'Title',
                  name: title,
                  widget: string,
                  i18n: true,
                  required: false,
                }
              - {
                  label: 'Text',
                  name: text,
                  widget: text,
                  i18n: true,
                  required: false,
                }
              - {
                  label: 'Image',
                  name: image,
                  widget: image,
                  hint: '',
                  required: false,
                }
              - {
                  label: 'Image alt text',
                  name: image_alt,
                  widget: string,
                  i18n: true,
                  required: false,
                  hint: 'Will be used as description of the image for screen readers etc',
                }
              - label: 'Buttons'
                name: buttons
                i18n: true
                widget: object
                collapsed: false
                required: false
                fields:
                  - {
                      label: 'Primary button label',
                      name: primary_button_label,
                      widget: string,
                      i18n: true,
                    }
                  - {
                      label: 'Primary button link',
                      name: primary_button_link,
                      widget: string,
                      i18n: true,
                    }
                  - {
                      label: 'Secondary button label',
                      name: secondary_button_label,
                      widget: string,
                      i18n: true,
                    }
                  - {
                      label: 'Secondary button link',
                      name: secondary_button_link,
                      widget: string,
                      i18n: true,
                    }
          - label: 'Latest articles and events section'
            name: latest_articles_section
            i18n: true
            widget: object
            collapsed: false
            fields:
              - {
                  label: 'Title',
                  name: title,
                  widget: string,
                  i18n: true,
                  required: false,
                }
          - label: 'Contact section'
            name: contact_section
            i18n: true
            widget: object
            collapsed: false
            fields:
              - {
                  label: 'Title',
                  name: title,
                  widget: string,
                  i18n: true,
                  required: false,
                }
              - {
                  label: 'Background image',
                  name: background_image,
                  widget: image,
                  required: false,
                }
              - label: 'Contact boxes'
                name: contact_boxes
                i18n: true
                widget: object
                collapsed: false
                required: false
                fields:
                  - {
                      label: 'Address',
                      name: address,
                      widget: string,
                      i18n: true,
                    }
                  - {
                      label: 'Map URL',
                      name: map_url,
                      widget: string,
                      i18n: true,
                    }
                  - {
                      label: 'Email address',
                      name: email,
                      widget: string,
                      i18n: true,
                    }
                  - {
                      label: 'Email button label',
                      name: email_label,
                      widget: string,
                      i18n: true,
                    }
                  - {
                      label: 'Phone number',
                      name: phone,
                      widget: string,
                      i18n: true,
                      hint: 'Must be in complete format with land code, for example +46-08-1234567',
                    }
                  - {
                      label: 'Phone button label',
                      name: phone_label,
                      widget: string,
                      i18n: true,
                    }
          - label: 'Client section'
            name: client_section
            i18n: true
            widget: object
            collapsed: false
            fields:
              - {
                  label: 'Title',
                  name: title,
                  widget: string,
                  i18n: true,
                  required: false,
                }
              - label: 'Clients'
                name: 'clients'
                widget: list
                fields:
                  - {
                      label: 'Logotype',
                      name: logo,
                      widget: image,
                      hint: 'Should be in SVG or PNG format',
                    }
                  - label: 'News Item'
                    name: case
                    widget: relation
                    collection: 'news'
                    search_fields: ['title']
                    value_field: '{{slug}}'
                    display_fields: ['title']
      - label: 'About Page'
        name: about
        file: '_data/pages/about.json'
        i18n: true
        preview_path: /about-elastx
        fields:
          - { label: 'Site title', name: siteTitle, widget: string, i18n: true }
          - label: 'Hero section'
            name: hero
            i18n: true
            widget: object
            collapsed: false
            fields:
              - label: 'Background'
                name: hero_bg
                widget: list
                max: 1
                i18n: true
                fields:
                  - { label: 'Image', name: image, widget: image }
                  - {
                      label: 'Image alt text',
                      name: image_alt,
                      widget: string,
                      i18n: true,
                      required: false,
                      hint: 'Will be used as description of the image for screen readers etc',
                    }
          - label: 'Content Blocks'
            label_singular: 'Content Block'
            name: body
            i18n: true
            widget: list
            types:
              - label: 'Ingress'
                name: body_ingress
                widget: object
                summary: '{{field.text}}'
                fields:
                  - { label: 'Ingress text', name: text, widget: text }
              - label: 'Body text'
                name: body_text
                widget: object
                summary: '{{fields.text}}'
                fields:
                  - {
                      label: 'Body text',
                      name: text,
                      widget: markdown,
                      buttons:
                        [
                          bold,
                          italic,
                          link,
                          heading-three,
                          bulleted-list,
                          numbered-list,
                          code,
                        ],
                      editor_components: [code-block],
                      minimal: true,
                    }
              - label: 'Image'
                name: body_image
                widget: object
                fields:
                  - {
                      label: 'Image',
                      name: src,
                      widget: image,
                      hint:
                        'Remember to adjust the image size. The width of the image should be maximum
                        1500px. And remember to compress the image. If the file size is too large it
                        will slow down the page.',
                    }
                  - {
                      label: 'Image alt text',
                      name: alt,
                      widget: string,
                      required: false,
                      hint: 'Will be used as description of the image for screen readers etc',
                    }
              - label: 'Video'
                name: body_video
                widget: object
                fields:
                  - { label: 'Video file', name: video_src, widget: file }
                  - {
                      label: 'Video poster image',
                      name: poster_image,
                      widget: image,
                    }
              - label: 'CTA (Call to action text and button)'
                name: body_cta
                widget: object
                fields:
                  - { label: 'Text', name: cta_text, widget: text }
                  - { label: 'Button label', name: cta_label, widget: string }
                  - { label: 'Button link', name: cta_link, widget: string }
                  - {
                      label: 'Open link in a new tab',
                      name: 'targetBlank',
                      widget: 'boolean',
                      hint: 'Check this box if the link leads to an external page',
                      default: false,
                      required: false,
                    }
          - label: 'FAQ section'
            name: faq
            i18n: true
            widget: object
            collapsed: false
            fields:
              - label: 'Hero items'
                name: hero_items
                widget: list
                max: 3
                i18n: true
                fields:
                  - { label: 'Title', name: title, widget: string, i18n: true }
                  - {
                      label: 'Text',
                      name: body,
                      widget: markdown,
                      i18n: true,
                      buttons: [bold, italic, link],
                      editor_components: [],
                      minimal: true,
                    }
                  - {
                      label: 'Section id',
                      name: section_id,
                      widget: string,
                      i18n: false,
                    }
                  - {
                      label: 'Hero card',
                      name: isHeroCard,
                      widget: 'boolean',
                      hint: 'This must be checked for the item to be displayed on the top of the page',
                      default: true,
                    }
              - label: 'Card items'
                name: card_items
                widget: list
                max: 3
                i18n: true
                fields:
                  - { label: 'Title', name: title, widget: string, i18n: true }
                  - {
                      label: 'Text',
                      name: body,
                      widget: markdown,
                      i18n: true,
                      buttons: [bold, italic, link],
                      editor_components: [],
                      minimal: true,
                    }
                  - {
                      label: 'Section id',
                      name: section_id,
                      widget: string,
                      i18n: false,
                    }
              - label: 'Full width item'
                name: full_width_item
                widget: list
                max: 1
                i18n: true
                fields:
                  - { label: 'Title', name: title, widget: string, i18n: true }
                  - {
                      label: 'Text',
                      name: body,
                      widget: markdown,
                      i18n: true,
                      buttons: [bold, italic, link],
                      editor_components: [],
                      minimal: true,
                    }
                  - {
                      label: 'Text',
                      name: desc,
                      widget: markdown,
                      i18n: true,
                      buttons: [bold, italic, link],
                      editor_components: [],
                      minimal: true,
                    }
                  - {
                      label: 'Section id',
                      name: section_id,
                      widget: string,
                      i18n: false,
                    }
          - label: 'Sponsorships section'
            name: sponsorships_section
            i18n: true
            widget: object
            collapsed: false
            fields:
              - { label: 'Title', name: title, widget: string, i18n: true }
              - label: 'Sponsorships'
                name: sponsorships
                widget: list
                i18n: true
                fields:
                  - { label: 'Title', name: title, widget: string, i18n: true }
                  - { label: 'Image', name: image, widget: image }
                  - { label: 'Text', name: text, widget: text, i18n: true }
                  - { label: 'Link', name: link, widget: string, i18n: true }
          - label: 'Banner'
            name: banner
            i18n: true
            widget: object
            collapsed: false
            required: false
            fields:
              - { label: 'Text', name: text, widget: string, il8n: true }
              - label: 'Icons'
                name: banner_icons
                widget: list
                max: 3
                i18n: true
                fields:
                  - { label: 'Src', name: image, widget: image }
                  - {
                      label: 'Link to',
                      name: href,
                      widget: string,
                      i18n: true,
                      required: false,
                    }
                  - {
                      label: 'External link',
                      name: external_link,
                      widget: 'boolean',
                      hint: 'Check this box if the link leads to an external page',
                      default: false,
                    }
      - label: 'Contact Page'
        name: contact
        file: '_data/pages/contact.json'
        i18n: true
        preview_path: /contact-us
        fields:
          - { label: 'Site title', name: siteTitle, widget: string, i18n: true }
          - label: 'Hero section'
            name: hero
            i18n: true
            widget: object
            collapsed: false
            fields:
              - { label: 'Title', name: title, widget: string, i18n: true }
              - {
                  label: 'Company name',
                  name: company_name,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Company info',
                  name: company_info,
                  widget: markdown,
                  i18n: true,
                }
              - {
                  label: 'Address',
                  name: address,
                  widget: markdown,
                  i18n: true,
                }
              - {
                  label: 'Background image',
                  name: hero_image,
                  widget: image,
                  required: false,
                }
              - {
                  label: 'Button text',
                  name: primary_button_text,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Button link',
                  name: primary_button_href,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Open link in a new tab',
                  name: 'targetBlank',
                  widget: 'boolean',
                  hint: 'Check this box if the link leads to an external page',
                  default: false,
                  required: false,
                }
          - label: 'Team section'
            name: team
            i18n: true
            widget: object
            collapsed: false
            fields:
              - { label: 'Title', name: title, widget: string, i18n: true }
              - label: 'Team members'
                name: team_members
                widget: list
                i18n: false
                collapsed: true
                fields:
                  - { label: Name, name: name, widget: string, i18n: false }
                  - { label: Title, name: role, widget: string }
                  - { label: Email, name: email, widget: string }
                  - { label: Image, name: image, widget: image }

      - label: 'Pricing Page'
        name: pricing
        file: '_data/pages/pricingOverview.json'
        i18n: true
        widget: object
        fields:
          - {
              label: 'Body content',
              name: text,
              widget: markdown,
              buttons:
                [
                  bold,
                  italic,
                  link,
                  heading-two,
                  heading-three,
                  heading-four,
                  bulleted-list,
                  numbered-list,
                ],
              editor_components: [image],
              minimal: true,
              i18n: true,
            }
          - label: 'Content Blocks'
            label_singular: 'Content Block'
            name: body
            i18n: true
            widget: list
            types:
              - label: 'Ingress'
                name: body_ingress
                widget: object
                summary: '{{field.text}}'
                fields:
                  - { label: 'Ingress text', name: text, widget: text }
              - label: 'Body text'
                name: body_text
                widget: object
                summary: '{{fields.text}}'
                fields:
                  - {
                      label: 'Body text',
                      name: text,
                      widget: markdown,
                      buttons:
                        [
                          bold,
                          italic,
                          link,
                          heading-three,
                          bulleted-list,
                          numbered-list,
                          code,
                        ],
                      editor_components: [code-block],
                      minimal: true,
                    }
              - label: 'Image'
                name: body_image
                widget: object
                fields:
                  - {
                      label: 'Image',
                      name: src,
                      widget: image,
                      hint:
                        'Remember to adjust the image size. The width of the image should be maximum
                        1500px. And remember to compress the image. If the file size is too large it
                        will slow down the page.',
                    }
                  - {
                      label: 'Image alt text',
                      name: alt,
                      widget: string,
                      required: false,
                      hint: 'Will be used as description of the image for screen readers etc',
                    }
              - label: 'Video'
                name: body_video
                widget: object
                fields:
                  - { label: 'Video file', name: video_src, widget: file }
                  - {
                      label: 'Video poster image',
                      name: poster_image,
                      widget: image,
                    }
              - label: 'CTA (Call to action text and button)'
                name: body_cta
                widget: object
                fields:
                  - { label: 'Text', name: cta_text, widget: text }
                  - { label: 'Button label', name: cta_label, widget: string }
                  - { label: 'Button link', name: cta_link, widget: string }
                  - {
                      label: 'Open link in a new tab',
                      name: 'targetBlank',
                      widget: 'boolean',
                      hint: 'Check this box if the link leads to an external page',
                      default: false,
                      required: false,
                    }
      - label: 'Services Page'
        name: services
        file: '_data/pages/services.json'
        i18n: true
        preview_path: /services
        fields:
          - { label: 'Site title', name: siteTitle, widget: string, i18n: true }
          - { label: 'Hero title', name: heroTitle, widget: string, i18n: true }
          - label: 'Service Categories'
            label_singular: 'Service Category'
            name: tabs
            i18n: true
            widget: list
            types:
              - label: 'Page Content'
                name: page_content
                widget: object
                fields:
                  - label: 'Title'
                    name: title
                    widget: string
                  - label: 'Slug'
                    name: slug
                    hint: 'Use the same slug in both languages'
                    widget: string
                    i18n: false
                  - label: 'Category description'
                    name: tab_desc
                    widget: string
                    i18n: true
                    hint: 'The description will be displayed over the list of services.'
                  - label: 'Content Blocks'
                    label_singular: 'Content Block'
                    name: content
                    i18n: true
                    widget: list
                    types:
                      - label: 'Ingress'
                        name: body_ingress
                        widget: object
                        summary: '{{field.text}}'
                        fields:
                          - { label: 'Ingress text', name: text, widget: text }
                      - label: 'Body text'
                        name: body_text
                        widget: object
                        summary: '{{fields.text}}'
                        fields:
                          - {
                              label: 'Body text',
                              name: text,
                              widget: markdown,
                              buttons:
                                [
                                  bold,
                                  italic,
                                  link,
                                  heading-three,
                                  bulleted-list,
                                  numbered-list,
                                  code,
                                ],
                              editor_components: [code-block],
                              minimal: true,
                            }
                      - label: 'Image'
                        name: body_image
                        widget: object
                        fields:
                          - {
                              label: 'Image',
                              name: src,
                              widget: image,
                              hint:
                                'Remember to adjust the image size. The width of the image should be
                                maximum 1500px. And remember to compress the image. If the file size
                                is too large it will slow down the page.',
                            }
                          - {
                              label: 'Image alt text',
                              name: alt,
                              widget: string,
                              required: false,
                              hint: 'Will be used as description of the image for screen readers etc',
                            }
                      - label: 'Video'
                        name: body_video
                        widget: object
                        fields:
                          - {
                              label: 'Video file',
                              name: video_src,
                              widget: file,
                            }
                          - {
                              label: 'Video poster image',
                              name: poster_image,
                              widget: image,
                            }
                      - label: 'CTA (Call to action text and button)'
                        name: body_cta
                        widget: object
                        fields:
                          - { label: 'Text', name: cta_text, widget: text }
                          - {
                              label: 'Button label',
                              name: cta_label,
                              widget: string,
                            }
                          - {
                              label: 'Button link',
                              name: cta_link,
                              widget: string,
                            }
                          - {
                              label: 'Open link in a new tab',
                              name: 'targetBlank',
                              widget: 'boolean',
                              hint: 'Check this box if the link leads to an external page',
                              default: false,
                              required: false,
                            }
              - label: 'Service List'
                name: service_list
                widget: object
                fields:
                  - label: 'Title'
                    name: title
                    widget: string
                  - label: 'Services'
                    label_singular: 'Service'
                    name: content
                    widget: list
                    i18n: true
                    fields:
                      - { label: 'Icon', name: icon, widget: image }
                      - {
                          label: 'Title',
                          name: title,
                          widget: string,
                          i18n: true,
                        }
                      - {
                          label: 'Subtitle',
                          name: subtitle,
                          widget: string,
                          i18n: true,
                          required: false,
                        }
                      - { label: 'Text', name: text, widget: text, i18n: true }
                      - {
                          label: 'Links to',
                          name: link,
                          widget: string,
                          required: false,
                        }
      - label: 'Solutions Page'
        name: solutions
        file: '_data/pages/solutions.json'
        i18n: true
        preview_path: /solutions
        fields:
          - { label: 'Site title', name: siteTitle, widget: string, i18n: true }
          - { label: 'Hero title', name: heroTitle, widget: string, i18n: true }
          - label: 'Solution Categories'
            label_singular: 'Solution Category'
            name: tabs
            i18n: true
            widget: list
            types:
              - label: 'Page Content'
                name: page_content
                widget: object
                fields:
                  - label: 'Title'
                    name: title
                    widget: string
                  - label: 'Slug'
                    name: slug
                    hint: 'Use the same slug in both languages'
                    widget: string
                    i18n: false
                  - label: 'Category description'
                    name: tab_desc
                    widget: string
                    i18n: true
                    hint: 'The description will be displayed over the list of solutions.'
                  - label: 'Content Blocks'
                    label_singular: 'Content Block'
                    name: content
                    i18n: true
                    widget: list
                    types:
                      - label: 'Ingress'
                        name: body_ingress
                        widget: object
                        summary: '{{field.text}}'
                        fields:
                          - { label: 'Ingress text', name: text, widget: text }
                      - label: 'Body text'
                        name: body_text
                        widget: object
                        summary: '{{fields.text}}'
                        fields:
                          - {
                              label: 'Body text',
                              name: text,
                              widget: markdown,
                              buttons:
                                [
                                  bold,
                                  italic,
                                  link,
                                  heading-three,
                                  bulleted-list,
                                  numbered-list,
                                  code,
                                ],
                              editor_components: [code-block],
                              minimal: true,
                            }
                      - label: 'Image'
                        name: body_image
                        widget: object
                        fields:
                          - {
                              label: 'Image',
                              name: src,
                              widget: image,
                              hint:
                                'Remember to adjust the image size. The width of the image should be
                                maximum 1500px. And remember to compress the image. If the file size
                                is too large it will slow down the page.',
                            }
                          - {
                              label: 'Image alt text',
                              name: alt,
                              widget: string,
                              required: false,
                              hint: 'Will be used as description of the image for screen readers etc',
                            }
                      - label: 'Video'
                        name: body_video
                        widget: object
                        fields:
                          - {
                              label: 'Video file',
                              name: video_src,
                              widget: file,
                            }
                          - {
                              label: 'Video poster image',
                              name: poster_image,
                              widget: image,
                            }
                      - label: 'CTA (Call to action text and button)'
                        name: body_cta
                        widget: object
                        fields:
                          - { label: 'Text', name: cta_text, widget: text }
                          - {
                              label: 'Button label',
                              name: cta_label,
                              widget: string,
                            }
                          - {
                              label: 'Button link',
                              name: cta_link,
                              widget: string,
                            }
                          - {
                              label: 'Open link in a new tab',
                              name: 'targetBlank',
                              widget: 'boolean',
                              hint: 'Check this box if the link leads to an external page',
                              default: false,
                              required: false,
                            }
              - label: 'Solution List'
                name: solution_list
                widget: object
                fields:
                  - label: 'Title'
                    name: title
                    widget: string
                  - label: 'Solutions'
                    label_singular: 'Solution'
                    name: content
                    widget: list
                    i18n: true
                    fields:
                      - { label: 'Icon', name: icon, widget: image }
                      - {
                          label: 'Title',
                          name: title,
                          widget: string,
                          i18n: true,
                        }
                      - {
                          label: 'Subtitle',
                          name: subtitle,
                          widget: string,
                          i18n: true,
                          required: false,
                        }
                      - { label: 'Text', name: text, widget: text, i18n: true }
                      - {
                          label: 'Links to',
                          name: link,
                          widget: string,
                          required: false,
                        }
      - label: 'Article List Page'
        name: articleList
        file: '_data/pages/articleList.json'
        i18n: true
        preview_path: /news
        fields:
          - { label: 'Site title', name: siteTitle, widget: string, i18n: true }
          - { label: 'Hero title', name: heroTitle, widget: string, i18n: true }
          - {
              label: 'Top image',
              name: image,
              widget: image,
              hint: 'Will be used in list views and in top of Article page. The image should be in format 3:2, and at least 1500px wide. The image should be compressed to a file size of less than 200kb.',
            }
          - {
              label: 'Top image alt text',
              name: image_alt,
              widget: string,
              i18n: true,
              required: false,
              hint: 'Will be used as description of the image for screen readers etc',
            }
          - label: 'Tab labels'
            name: tabLabels
            i18n: true
            widget: object
            collapsed: false
            fields:
              - { label: 'News', name: news, widget: string, i18n: true }
              - { label: 'Events', name: events, widget: string, i18n: true }
      - label: 'Login Page'
        name: login
        file: '_data/pages/login.json'
        i18n: true
        preview_path: /login
        fields:
          - { label: 'Site title', name: siteTitle, widget: string, i18n: true }
          - { label: 'Hero title', name: heroTitle, widget: string, i18n: true }
          - label: 'Login box'
            name: login
            i18n: true
            widget: list
            collapsed: false
            fields:
              - { label: 'Icon', name: image, widget: image }
              - { label: 'Title', name: title, widget: string, i18n: true }
              - {
                  label: 'Subtitle',
                  name: subtitle,
                  widget: string,
                  i18n: true,
                  required: false,
                }
              - {
                  label: 'Button label',
                  name: label,
                  widget: string,
                  i18n: true,
                }
              - { label: 'Button link', name: link, widget: string, i18n: true }
              - {
                  label: 'Open link in a new tab',
                  name: 'targetBlank',
                  widget: 'boolean',
                  hint: 'Check this box if the link leads to an external page',
                  default: false,
                  required: false,
                }
      - label: 'Signup Form Page'
        name: signup
        file: '_data/pages/signup.json'
        i18n: true
        preview_path: /signup
        fields:
          - { label: 'Site title', name: siteTitle, widget: string, i18n: true }
          - { label: 'Hero title', name: heroTitle, widget: string, i18n: true }

  - name: partners
    label: Partners
    label_singular: Partner
    format: 'json'
    i18n: true
    folder: '_data/partners'
    slug: '{{slug}}'
    create: true
    delete: true
    summary: '{{fields.type}}: {{fields.title}}, {{fields.slug}}'
    fields:
      - {
          label: 'Type',
          name: type,
          widget: select,
          options: ['Solution', 'Platform', 'Consulting'],
        }
      - {
          label: 'Name',
          name: title,
          widget: string,
          i18n: true,
          required: false,
        }
      - {
          label: 'Slug',
          name: slug,
          widget: string,
          hint: 'Used in the URL of the partner type. Must be in lowercase.',
        }
      - {
          label: 'Logo',
          name: logo,
          widget: image,
          hint: 'Should be in SVG or PNG format',
        }
      - {
          label: 'Weight',
          name: weight,
          widget: number,
          min: 0,
          default: 0,
          hint: 'Used to sort the partners. Higher weight means lower in the list',
        }
      - { label: 'Intro', name: intro, widget: text, i18n: true }
      - label: 'Hero background image'
        name: hero_image
        widget: object
        required: false
        fields:
          - {
              label: 'Image',
              name: src,
              widget: image,
              hint: 'Will be used in Article Series Page as a hero background image. The image should be in format 3:2, and at least 1500px wide. The image should be compressed to a file size of less than 200kb.',
              i18n: false,
              required: false,
            }
          - {
              label: 'Image alt text',
              name: alt,
              widget: string,
              required: false,
              hint: 'Will be used as description of the image for screen readers etc',
              i18n: true,
            }
      - { label: 'Ingress', name: ingress, widget: text, i18n: true }
      - name: news_feed
        label: 'News feed'
        widget: object
        hint: 'The URL to the RSS feed for news about this partner'
        required: false
        i18n: true
        fields:
          - name: rss_feed_url
            label: 'RSS feed URL'
            widget: string
            hint: 'The URL to the RSS feed for news about this partner'
            i18n: true
            required: false
          - name: tab_section_title
            label: 'Tab Section Title'
            widget: string
            i18n: true
            required: false
      - label: 'Content Blocks'
        label_singular: 'Content Block'
        name: body
        i18n: true
        widget: list
        types:
          - label: 'Ingress'
            name: body_ingress
            widget: object
            summary: '{{field.text}}'
            fields:
              - { label: 'Ingress text', name: text, widget: text }
          - label: 'Body text'
            name: body_text
            widget: object
            summary: '{{fields.text}}'
            fields:
              - {
                  label: 'Body text',
                  name: text,
                  widget: markdown,
                  buttons:
                    [
                      bold,
                      italic,
                      link,
                      heading-three,
                      bulleted-list,
                      numbered-list,
                      code,
                    ],
                  editor_components: [code-block],
                  minimal: true,
                }
          - label: 'Image'
            name: body_image
            widget: object
            fields:
              - {
                  label: 'Image',
                  name: src,
                  widget: image,
                  hint:
                    'Remember to adjust the image size. The width of the image should be maximum
                    1500px. And remember to compress the image. If the file size is too large it
                    will slow down the page.',
                }
              - {
                  label: 'Image alt text',
                  name: alt,
                  widget: string,
                  required: false,
                  hint: 'Will be used as description of the image for screen readers etc',
                }
          - label: 'Video'
            name: body_video
            widget: object
            fields:
              - { label: 'Video file', name: video_src, widget: file }
              - {
                  label: 'Video poster image',
                  name: poster_image,
                  widget: image,
                }
          - label: 'CTA (Call to action text and button)'
            name: body_cta
            widget: object
            fields:
              - { label: 'Text', name: cta_text, widget: text }
              - { label: 'Button label', name: cta_label, widget: string }
              - { label: 'Button link', name: cta_link, widget: string }
              - {
                  label: 'Open link in a new tab',
                  name: 'targetBlank',
                  widget: 'boolean',
                  hint: 'Check this box if the link leads to an external page',
                  default: false,
                  required: false,
                }
  - name: standardContentPages
    label: 'Policys and agreements'
    format: 'json'
    i18n: true
    preview_path: '/{{slug}}'
    folder: '_data/standardPages'
    create: true
    delete: true
    slug: '{{slug}}'
    fields:
      - { label: 'Site title', name: siteTitle, widget: string, i18n: true }
      - { label: 'Title', name: title, widget: string, i18n: true }
      - {
          label: 'Slug',
          name: slug,
          widget: string,
          hint:
            'Will be used as slug (the last part in URL to the page), for example type in
            "page-name" for www.elastx.se/se/page-name',
        }
      - {
          label: 'Intro',
          name: intro,
          widget: text,
          i18n: true,
          required: false,
        }
      - label: 'Content Blocks'
        label_singular: 'Content Block'
        name: body
        i18n: true
        widget: list
        types:
          - label: 'Ingress'
            name: body_ingress
            widget: object
            summary: '{{field.text}}'
            fields:
              - { label: 'Ingress text', name: text, widget: text }
          - label: 'Body text'
            name: body_text
            widget: object
            summary: '{{fields.text}}'
            fields:
              - {
                  label: 'Body text',
                  name: text,
                  widget: markdown,
                  buttons:
                    [
                      bold,
                      italic,
                      link,
                      heading-three,
                      bulleted-list,
                      numbered-list,
                      code,
                    ],
                  editor_components: [code-block],
                  minimal: true,
                }
          - label: 'Image'
            name: body_image
            widget: object
            fields:
              - {
                  label: 'Image',
                  name: src,
                  widget: image,
                  hint:
                    'Remember to adjust the image size. The width of the image should be maximum
                    1500px. And remember to compress the image. If the file size is too large it
                    will slow down the page.',
                }
              - {
                  label: 'Image alt text',
                  name: alt,
                  widget: string,
                  required: false,
                  hint: 'Will be used as description of the image for screen readers etc',
                }
          - label: 'Video'
            name: body_video
            widget: object
            fields:
              - { label: 'Video file', name: video_src, widget: file }
              - {
                  label: 'Video poster image',
                  name: poster_image,
                  widget: image,
                }
          - label: 'CTA (Call to action text and button)'
            name: body_cta
            widget: object
            fields:
              - { label: 'Text', name: cta_text, widget: text }
              - { label: 'Button label', name: cta_label, widget: string }
              - { label: 'Button link', name: cta_link, widget: string }
              - {
                  label: 'Open link in a new tab',
                  name: 'targetBlank',
                  widget: 'boolean',
                  hint: 'Check this box if the link leads to an external page',
                  default: false,
                  required: false,
                }

  - name: servicePages
    label: 'Service pages'
    format: 'json'
    i18n: true
    preview_path: '/{{slug}}'
    folder: '_data/servicePages'
    create: true
    delete: true
    slug: '{{slug}}'
    fields:
      - { label: 'Site title', name: siteTitle, widget: string, i18n: true }
      - { label: 'Hero title', name: title, widget: string, i18n: true }
      - {
          label: 'Subtitle',
          name: subtitle,
          widget: string,
          i18n: true,
          required: false,
        }
      - {
          label: 'Icon',
          name: icon,
          widget: image,
          hint: 'Should be in SVG format',
        }
      - {
          label: 'Slug',
          name: slug,
          widget: string,
          hint:
            'Will be used as slug (the last part in URL to the page), for example type in
            "page-name" for www.elastx.se/se/page-name',
        }
      - {
          label: 'Intro',
          name: intro,
          widget: text,
          i18n: true,
          required: false,
        }

      - label: 'Tabs'
        label_singular: 'Tab'
        name: 'tabs'
        i18n: true
        widget: list
        fields:
          - label: 'Title'
            name: title
            widget: string
          - label: 'Subtitle'
            name: subtitle
            widget: string
            required: false
          - label: 'Slug'
            name: slug
            hint: 'Use the same slug in both languages'
            widget: string
            i18n: false
          - label: 'Content Blocks'
            label_singular: 'Content Block'
            name: content
            widget: list
            types:
              - label: 'CSV Table'
                name: body_csv_table
                widget: object
                fields:
                  - label: 'Table CSV file'
                    name: table_data_file
                    widget: file
                    required: false
                    i18n: true
              - label: 'Pricing Calculator'
                name: body_pricing_calculator
                widget: object
                fields:
                  - label: 'Calculator Type'
                    name: calculator_type
                    widget: select
                    options: ['OpenStack', 'Virtuozzo']
                  - label: 'Pricing Model'
                    name: pricing_model
                    widget: select
                    options:
                      [
                        'openstack',
                        'mariadb',
                        'mssql',
                        'mysql',
                        'postgresql',
                        'valkey',
                      ]
                    required: false
              - label: 'Ingress'
                name: body_ingress
                widget: object
                summary: '{{field.text}}'
                fields:
                  - { label: 'Ingress text', name: text, widget: text }
              - label: 'Body text'
                name: body_text
                widget: object
                summary: '{{fields.text}}'
                fields:
                  - {
                      label: 'Body text',
                      name: text,
                      widget: markdown,
                      buttons:
                        [
                          bold,
                          italic,
                          link,
                          heading-three,
                          bulleted-list,
                          numbered-list,
                          code,
                        ],
                      editor_components: [code-block],
                      minimal: true,
                    }
              - label: 'Image'
                name: body_image
                widget: object
                fields:
                  - {
                      label: 'Image',
                      name: src,
                      widget: image,
                      hint:
                        'Remember to adjust the image size. The width of the image should be maximum
                        1500px. And remember to compress the image. If the file size is too large it
                        will slow down the page.',
                    }
                  - {
                      label: 'Image alt text',
                      name: alt,
                      widget: string,
                      required: false,
                      hint: 'Will be used as description of the image for screen readers etc',
                    }
              - label: 'Video'
                name: body_video
                widget: object
                fields:
                  - { label: 'Video file', name: video_src, widget: file }
                  - {
                      label: 'Video poster image',
                      name: poster_image,
                      widget: image,
                    }
              - label: 'CTA (Call to action text and button)'
                name: body_cta
                widget: object
                fields:
                  - { label: 'Text', name: cta_text, widget: text }
                  - { label: 'Button label', name: cta_label, widget: string }
                  - { label: 'Button link', name: cta_link, widget: string }
                  - {
                      label: 'Open link in a new tab',
                      name: 'targetBlank',
                      widget: 'boolean',
                      hint: 'Check this box if the link leads to an external page',
                      default: false,
                      required: false,
                    }

  - name: news
    label: 'News articles'
    format: 'json'
    i18n: true
    preview_path: '/news/{{slug}}'
    folder: '_data/news'
    create: true
    delete: true
    slug: '{{slug}}'
    fields:
      - {
          label: 'Name',
          name: title,
          widget: string,
          i18n: true,
          hint: 'Will be used as header in article list views and article page',
        }
      - {
          label: 'Slug',
          name: case_slug,
          widget: string,
          i18n: true,
          hint:
            'Slug must be in english without any punctuation marks and the same for both languages. For example: "this is an article
            headline" will result in "www.elastx.se/se/news/this-is-an-article-headline"',
        }
      - {
          label: 'Publish Date',
          name: date,
          widget: datetime,
          date_format: 'YYYY-MM-DD',
          time_format: false,
          format: 'YYYY-MM-DD',
        }
      - {
          label: 'Top image',
          name: image,
          widget: image,
          hint: 'Will be used in list views and in top of Article page. The image should be in format 3:2, and at least 1500px wide. The image should be compressed to a file size of less than 200kb.',
        }
      - {
          label: 'Top image alt text',
          name: image_alt,
          widget: string,
          i18n: true,
          required: false,
          hint: 'Will be used as description of the image for screen readers etc',
        }
      - label: 'Tags'
        name: tags
        widget: relation
        i18n: true
        collection: 'tags'
        multiple: true
        required: false
        search_fields: ['title']
        value_field: '{{slug}}'
        display_fields: ['title']
        hint: 'Will be used to filter articles in list views. Use existing tags first, create new ones sparingly. Tags should be in english and the same for both languages.'
      - {
          label: 'Intro',
          name: intro,
          widget: text,
          i18n: true,
          hint: 'Will be used as excerpt in list views and preamble in Article page',
        }
      - label: 'Content Blocks'
        label_singular: 'Content Block'
        name: body
        i18n: true
        widget: list
        types:
          - label: 'Ingress'
            name: body_ingress
            widget: object
            summary: '{{field.text}}'
            fields:
              - { label: 'Ingress text', name: text, widget: text }
          - label: 'Body text'
            name: body_text
            widget: object
            summary: '{{fields.text}}'
            fields:
              - {
                  label: 'Body text',
                  name: text,
                  widget: markdown,
                  buttons:
                    [
                      bold,
                      italic,
                      link,
                      heading-three,
                      bulleted-list,
                      numbered-list,
                      code,
                    ],
                  editor_components: [code-block],
                  minimal: true,
                }
          - label: 'Image'
            name: body_image
            widget: object
            fields:
              - {
                  label: 'Image',
                  name: src,
                  widget: image,
                  hint:
                    'Remember to adjust the image size. The width of the image should be maximum
                    1500px. And remember to compress the image. If the file size is too large it
                    will slow down the page.',
                }
              - {
                  label: 'Image alt text',
                  name: alt,
                  widget: string,
                  required: false,
                  hint: 'Will be used as description of the image for screen readers etc',
                }
          - label: 'Video'
            name: body_video
            widget: object
            fields:
              - { label: 'Video file', name: video_src, widget: file }
              - {
                  label: 'Video poster image',
                  name: poster_image,
                  widget: image,
                }
          - label: 'CTA (Call to action text and button)'
            name: body_cta
            widget: object
            fields:
              - { label: 'Text', name: cta_text, widget: text }
              - { label: 'Button label', name: cta_label, widget: string }
              - { label: 'Button link', name: cta_link, widget: string }
              - {
                  label: 'Open link in a new tab',
                  name: 'targetBlank',
                  widget: 'boolean',
                  hint: 'Check this box if the link leads to an external page',
                  default: false,
                  required: false,
                }

  - name: tags
    label: 'Article tags'
    format: 'json'
    i18n:
      structure: single_file
    preview_path: '/tags/{{slug}}'
    folder: '_data/tags'
    create: true
    delete: true
    slug: '{{slug}}'
    fields:
      - {
          label: 'Title',
          name: title,
          i18n: true,
          widget: string,
          hint: 'Tags should be in english only. The tag title will be used in the URL to the page.',
          required: true,
        }
      - {
          label: 'Custom title',
          name: custom_title,
          widget: string,
          i18n: true,
          hint: 'Will be used instead of title in cases you want the page title to differ from the default.',
        }
      - {
          label: 'Custom slug',
          name: custom_slug,
          widget: string,
          i18n: true,
          required: false,
          hint: 'When you want a different slug than the title, for example when the tag title is the same as a service page title. For example, "news-about-kubernetes" for www.elastx.se/se/tags/news-about-kubernetes so that the tag url does not compete with the service page url (bad for SEO).',
        }
      - {
          label: 'Tag description',
          name: tag_description,
          widget: text,
          i18n: true,
          hint: 'A short description of the tag. Will be displayed under the tag title.',
        }
      - {
          label: 'Tag intro',
          name: tag_intro,
          widget: text,
          i18n: true,
          hint: 'A short introduction to the tag. Will be displayed above the list of articles in the tag page.',
        }
      - {
          label: 'Tag body',
          name: tag_body,
          widget: list,
          i18n: true,
          hint: 'Content blocks that will be displayed below the article list in the tag page. The content blocks can be used to add more information about the tag.',
        }
      - label: 'Hero background image'
        name: hero_image
        widget: object
        required: false
        fields:
          - {
              label: 'Image',
              name: src,
              widget: image,
              hint: 'Will be used in Article Series Page as a hero background image. The image should be in format 3:2, and at least 1500px wide. The image should be compressed to a file size of less than 200kb.',
              i18n: false,
              required: false,
            }
          - {
              label: 'Image alt text',
              name: alt,
              widget: string,
              required: false,
              hint: 'Will be used as description of the image for screen readers etc',
              i18n: true,
            }
    editor:
      preview: false

  - name: pricing
    label: 'Pricing Models'
    format: 'json'
    folder: '_data/pricing'
    create: true
    delete: true
    fields:
      - {
          label: 'Title',
          name: title,
          widget: string,
          hint: 'Only used in the CMS',
        }
      - {
          label: 'Calculator Title',
          name: calculator_title,
          widget: string,
          required: false,
          hint: "Defaults to 'OpenStack Calculator' if left empty",
        }
      - {
          label: 'Instance Title',
          name: instance_title,
          widget: string,
          required: false,
          hint: "Defaults to 'Instances' if left empty",
        }
      - {
          label: 'Instance Total Title',
          name: instance_total_title,
          widget: string,
          required: false,
          hint: "Defaults to 'Instance total' if left empty",
        }
      - {
          label: 'Instance Name Title',
          name: instance_name_title,
          widget: string,
          required: false,
          hint: "Defaults to 'Instance name' if left empty",
        }
      - {
          label: 'Number of Instances Title',
          name: number_of_instances_title,
          widget: string,
          required: false,
          hint: "Defaults to 'Number of instances' if left empty",
        }
      - {
          label: 'Max Instance count',
          name: max_instance_count,
          widget: number,
          required: false,
          hint: 'Unlimited if left empty',
        }
      - name: instance_flavors
        label: 'Flavors'
        widget: 'list'
        fields:
          - name: id
            label: 'Unique ID'
            widget: string
          - name: name
            label: 'Name'
            widget: string
          - name: cpu
            label: 'vCPU'
            widget: 'number'
            value_type: float
          - name: ram
            label: 'RAM (GB)'
            widget: 'number'
            value_type: float
          - name: disk
            label: 'Disk (GB)'
            widget: 'number'
            value_type: float
          - name: price
            label: 'Price (per hour)'
            widget: 'number'
            value_type: float
      - name: volumes
        label: 'Volumes'
        widget: 'list'
        fields:
          - name: id
            label: 'Unique ID'
            widget: string
          - name: name
            label: 'Name'
            widget: string
          - name: gb_price
            label: 'Price per GB (per hour)'
            widget: 'number'
            value_type: float
          - name: volume_price
            label: 'Price per volume (per hour)'
            widget: 'number'
            value_type: float
      - name: router_cost
        label: 'router cost (per project)'
        widget: 'number'
        value_type: float
        required: false
      - name: load_balancer_cost
        label: 'load balancer cost (per project)'
        widget: 'number'
        value_type: float
        required: false
      - name: ssl_cost
        label: 'ssl cost (per load balancer)'
        widget: 'number'
        value_type: float
        required: false
      - name: bandwidth_cost
        label: 'bandwidth cost (per GB)'
        widget: 'number'
        value_type: float
        required: false
      - name: swift_storage_cost
        label: 'swift storage cost (per GB)'
        widget: 'number'
        value_type: float
        required: false
      - name: windows_server_license_cost
        label: 'windows_server_license_cost (per CPU)'
        widget: 'number'
        value_type: float
        required: false
      - name: windows_sql_standard_server_license_cost
        label: 'windows sql standard server license cost (per CPU)'
        widget: 'number'
        value_type: float
        required: false
      - name: windows_sql_enterprise_server_license_cost
        label: 'windows sql enterprise server license cost (per CPU)'
        widget: 'number'
        value_type: float
        required: false
      - name: windows_sql_web_edition_server_license_cost
        label: 'windows sql web edition server license cost (per CPU)'
        widget: 'number'
        value_type: float
        required: false
      - name: public_ip_cost
        label: 'public IP cost (per IP number)'
        widget: 'number'
        value_type: float
        required: false

  - name: global
    label: 'Menus, footer and other site settings'
    format: json
    i18n:
      structure: single_file
    files:
      - label: 'Menu'
        name: menu
        file: '_data/global/menu.json'
        i18n: true
        preview_path: /
        fields:
          - label: 'Top menu / mobile menu links'
            name: menu_links
            widget: object
            i18n: true
            collapsed: false
            fields:
              - label: 'Links'
                name: links
                widget: list
                i18n: true
                fields:
                  - { label: 'Label', name: label, widget: string, i18n: true }
                  - {
                      label: 'Link',
                      name: link,
                      widget: string,
                      i18n: true,
                      hint: 'Needs to be a page slug (for example "/contact")',
                    }
          - label: 'Top menu / mobile menu buttons'
            name: menu_buttons
            widget: object
            i18n: true
            collapsed: false
            fields:
              - {
                  label: 'Login button label',
                  name: login_label,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Login button URL',
                  name: login_url,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Create account button label',
                  name: register_label,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Create account button URL',
                  name: register_url,
                  widget: string,
                  i18n: true,
                }
          - label: 'External links'
            name: above_menu_links
            widget: object
            i18n: true
            collapsed: false
            fields:
              - label: 'Links'
                hint:
                  'External links are displayed above the top menu in desktop view and in the bottom
                  of the menu in mobile view.'
                name: links
                widget: list
                i18n: true
                fields:
                  - { label: 'Label', name: label, widget: string, i18n: true }
                  - {
                      label: 'Link',
                      name: link,
                      widget: string,
                      i18n: true,
                      hint: 'Internal links needs to be a page slug (for example "/contact")',
                    }
                  - {
                      label: 'Open link in a new tab',
                      name: 'targetBlank',
                      widget: 'boolean',
                      hint: 'Check this box if the link leads to an external page',
                      default: false,
                      required: false,
                    }
      - label: 'Article pages settings'
        name: articlePagesSettings
        file: '_data/global/articlePagesSettings.json'
        i18n: true
        fields:
          - label: 'Article page'
            name: article_settings
            widget: object
            i18n: true
            collapsed: false
            fields:
              - {
                  label: 'Back to all news button label',
                  name: allButtonLabel,
                  widget: string,
                  i18n: true,
                  hint: 'Will be displayed in top of Article page',
                }
              - {
                  label: 'Show all previous events button label',
                  name: allEventsButtonLabel,
                  widget: string,
                  i18n: true,
                  hint: 'Will be displayed in bottom of Event page',
                }
              - {
                  label: 'Play video button label',
                  name: playVideoButtonLabel,
                  widget: string,
                  i18n: true,
                  hint: 'Will be displayed on top of video play button in Article page',
                }
          - label: 'Event page'
            name: event_settings
            widget: object
            i18n: true
            collapsed: false
            fields:
              - {
                  label: 'Register to event text',
                  name: registerText,
                  widget: string,
                  i18n: true,
                }
              - {
                  label: 'Register to event email',
                  name: registerEmail,
                  widget: string,
                  i18n: true,
                  hint: 'Will be displayed in (upcoming) Event pages',
                }
      - label: 'Footer'
        name: footer
        file: '_data/global/footer.json'
        i18n: true
        preview_path: /
        fields:
          - label: 'Contact'
            name: contact
            widget: object
            i18n: true
            collapsed: false
            fields:
              - { label: 'Title', name: title, widget: string, i18n: true }
              - {
                  label: 'Postal address row 1',
                  name: address_1,
                  widget: string,
                  i18n: false,
                }
              - {
                  label: 'Postal address row 2',
                  name: address_2,
                  widget: string,
                }
              - label: 'Rows'
                name: rows
                widget: list
                i18n: true
                fields:
                  - {
                      label: 'Row',
                      name: row,
                      widget: markdown,
                      buttons: [bold, italic, link],
                      editor_components: [],
                      minimal: true,
                    }
          - label: 'Links'
            name: links
            widget: object
            i18n: true
            collapsed: false
            fields:
              - {
                  label: 'Title',
                  name: title,
                  widget: string,
                  i18n: true,
                  hint: 'The actual links used is the same as you set in Top Menu',
                }
              - label: 'Extra footer links'
                name: extra_footer_links
                widget: list
                i18n: true
                fields:
                  - { label: 'Label', name: label, widget: string, i18n: true }
                  - { label: 'Link', name: link, widget: string, i18n: true }
                  - {
                      label: 'Open link in a new tab',
                      name: 'targetBlank',
                      widget: 'boolean',
                      hint: 'Check this box if the link leads to an external page',
                      default: false,
                      required: false,
                    }
          - label: 'Social links'
            name: social
            widget: object
            i18n: true
            collapsed: false
            fields:
              - { label: 'Title', name: title, widget: string, i18n: true }
              - label: 'Links'
                name: links
                widget: list
                fields:
                  - { label: 'Link label', name: label, widget: string }
                  - { label: 'URL', name: url, widget: string }
          - label: 'Certification logos'
            name: cert_logos
            widget: object
            collapsed: false
            fields:
              - label: 'Logos'
                name: logos
                widget: list
                fields:
                  - {
                      label: 'Logo',
                      name: logo,
                      widget: image,
                      hint: 'Should be in SVG or PNG format',
                    }
                  - { label: 'Link', name: link, widget: string }
          - label: 'External Certification logos'
            name: external_cert_logos
            widget: object
            collapsed: false
            fields:
              - label: 'Logos'
                name: logos
                widget: list
                fields:
                  - {
                      label: 'Logo',
                      name: logo,
                      widget: image,
                      hint: 'Should be in SVG or PNG format',
                    }
                  - { label: 'Link', name: link, widget: string }

      - label: 'Cookie banner settings'
        name: cookieBannerSettings
        file: '_data/global/cookieBannerSettings.json'
        i18n: true
        fields:
          - label: 'Cookie banner'
            name: cookie_banner
            widget: object
            i18n: true
            collapsed: false
            fields:
              - {
                  label: 'Cookie banner text',
                  name: cookieBannerText,
                  widget: markdown,
                  i18n: true,
                  buttons: [bold, italic, link],
                  editor_components: [],
                  minimal: true,
                }
              - {
                  label: 'Cookie banner accept button label',
                  name: cookieBannerButtonLabel,
                  i18n: true,
                  widget: string,
                }
              - {
                  label: 'Cookie banner reject button label',
                  name: cookieBannerRejectButtonLabel,
                  i18n: true,
                  widget: string,
                }

      - label: 'SEO settings'
        name: seoSettings
        file: '_data/global/seoSettings.json'
        i18n: true
        fields:
          - {
              label: 'Description',
              name: description,
              i18n: true,
              widget: text,
            }
        editor:
          preview: false
