name: Skill Bars
description: Display skill bars.
type: particle

configuration:
  caching:
    type: static

form:
  fields:
    enabled:
      type: input.checkbox
      label: Enabled
      description: Globally enable Skill Bars particles.
      default: true

    mainheading:
      type: input.text
      label: Title
      description: Type in the title.
      placeholder: 'Enter Title'
      default: ''

    introtext:
      type: textarea.textarea
      label: Intro Text
      description: Type in the intro text.
      placeholder: 'Enter Intro Text'
      default: ''

    style:
      type: select.select
      label: Style
      description: Select the style which defines the particle layout on the frontend.
      placeholder: 'Select...'
      default: style1
      options:
        style1: Style 1
        style2: Style 2
        style3: Style 3
        style4: Style 4

    animation:
      type: select.select
      label: Animation
      description: Select when the animation should start.
      placeholder: 'Select...'
      default: onload
      options:
        onload: On Page Load
        viewport: In Viewport

    css.class:
      type: input.selectize
      label: CSS Classes
      description: CSS class name for the particle.
      default: 

    extra:
      type: collection.keyvalue
      label: Tag Attributes
      description: Extra Tag attributes.
      key_placeholder: Key (data-*, style, ...)
      value_placeholder: Value
      exclude: ['id', 'class']

    items:
      type: collection.list
      array: true
      label: Skill Bars Items
      description: Create each skill bar item to display.
      value: name
      ajax: true

      fields:

        .title:
          type: input.text
          label: Title

        .percent:
          type: input.text
          label: Skill Bar Percent
          description: Skill bar percentage/width (default: 100%).
          placeholder: '100%'

        .skillbarbackground:
          type: input.colorpicker
          label: Skill Bar Background
          default: "#dddddd"

        .class:
          type: input.selectize
          label: CSS Class

        .extra:
          type: collection.keyvalue
          label: Tag Attributes
          description: Extra Tag attributes.
          key_placeholder: Key (data-*, style, ...)
          value_placeholder: Value
          exclude: ['id', 'class']