# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json

# Every editable section of the home page. The course cards are not listed
# here — they are generated from the Courses collection.

collections:
  - name: home
    label: Home page
    icon: home
    files:
      - name: seo
        label: "Search & Social"
        file: src/content/home/seo.json
        icon: search
        fields:
          - label: Meta Title
            name: meta_title
            widget: string
          - label: Meta Description
            name: meta_description
            widget: text

      - name: hero
        label: "Hero"
        file: src/content/home/hero.json
        icon: featured_video
        fields:
          - label: Eyebrow
            name: eyebrow
            widget: string
          - label: Title
            name: title
            widget: string
          - label: Intro
            name: intro
            widget: text
          - label: Primary Button
            name: primary_cta
            widget: object
            fields:
              - label: Label
                name: label
                widget: string
              - label: Link
                name: href
                widget: string
          - label: Secondary Button
            name: secondary_cta
            widget: object
            fields:
              - label: Label
                name: label
                widget: string
              - label: Link
                name: href
                widget: string
          - label: Stats
            name: stats
            widget: list
            label_singular: Stat
            summary: "{{fields.label}}: {{fields.value}}"
            fields:
              - label: Label
                name: label
                widget: string
              - label: Value
                name: value
                widget: string
          - label: Image
            name: image
            widget: image
            required: false
            hint: A placeholder box with the alt text shows until this is set.
          - label: Image Alt Text
            name: image_alt
            widget: string
          - label: Image Badge
            name: badge
            widget: string
            required: false
            hint: Small accent caption over the bottom of the hero image.

      - name: about
        label: "About the College"
        file: src/content/home/about.json
        icon: info
        fields:
          - label: Eyebrow
            name: eyebrow
            widget: string
          - label: Title
            name: title
            widget: string
          - label: Paragraphs
            name: paragraphs
            widget: list
            label_singular: Paragraph
            field:
              label: Paragraph
              name: paragraph
              widget: text
          - label: Button
            name: cta
            widget: object
            fields:
              - label: Label
                name: label
                widget: string
              - label: Link
                name: href
                widget: string
          - label: Image
            name: image
            widget: image
            required: false
          - label: Image Alt Text
            name: image_alt
            widget: string

      - name: courses
        label: "Courses"
        file: src/content/home/courses.json
        icon: menu_book
        fields:
          - label: Eyebrow
            name: eyebrow
            widget: string
          - label: Title
            name: title
            widget: string
            hint: The course cards come from the Courses collection automatically.
          - label: Description
            name: description
            widget: text
          - label: Button
            name: cta
            widget: object
            fields:
              - label: Label
                name: label
                widget: string
              - label: Link
                name: href
                widget: string

      - name: why-choose
        label: "Why Choose CPE"
        file: src/content/home/why-choose.json
        icon: star
        fields:
          - label: Eyebrow
            name: eyebrow
            widget: string
          - label: Title
            name: title
            widget: string
          - label: Points
            name: items
            widget: list
            label_singular: Point
            summary: "{{fields.title}}"
            fields:
              - label: Icon
                name: icon
                widget: select
                options:
                  - lucide:book-open-check
                  - lucide:target
                  - lucide:users
                  - lucide:shield-check
                  - lucide:graduation-cap
                  - lucide:award
                  - lucide:clock
                  - lucide:building-2
              - label: Title
                name: title
                widget: string
              - label: Description
                name: description
                widget: text

      - name: career-focus
        label: "Career-Focused Learning"
        file: src/content/home/career-focus.json
        icon: work
        fields:
          - label: Eyebrow
            name: eyebrow
            widget: string
          - label: Title
            name: title
            widget: string
          - label: Description
            name: description
            widget: text
          - label: Destinations
            name: items
            widget: list
            label_singular: Destination
            summary: "{{fields.title}}"
            fields:
              - label: Title
                name: title
                widget: string
              - label: Description
                name: description
                widget: text

      - name: leadership
        label: "Leadership"
        file: src/content/home/leadership.json
        icon: groups
        fields:
          - label: Eyebrow
            name: eyebrow
            widget: string
          - label: Title
            name: title
            widget: string
            hint: The people themselves are managed under the Leadership singleton.
          - label: Button
            name: cta
            widget: object
            fields:
              - label: Label
                name: label
                widget: string
              - label: Link
                name: href
                widget: string

      - name: campus-life
        label: "Campus and Student Life"
        file: src/content/home/campus-life.json
        icon: diversity_3
        fields:
          - label: Eyebrow
            name: eyebrow
            widget: string
          - label: Title
            name: title
            widget: string
          - label: Description
            name: description
            widget: text
          - label: Primary Button
            name: primary_cta
            widget: object
            fields:
              - label: Label
                name: label
                widget: string
              - label: Link
                name: href
                widget: string
          - label: Secondary Button
            name: secondary_cta
            widget: object
            fields:
              - label: Label
                name: label
                widget: string
              - label: Link
                name: href
                widget: string
          - label: Image
            name: image
            widget: image
            required: false
          - label: Image Alt Text
            name: image_alt
            widget: string

      - name: achievements
        label: "Achievements"
        file: src/content/home/achievements.json
        icon: trophy
        fields:
          - label: Eyebrow
            name: eyebrow
            widget: string
          - label: Title
            name: title
            widget: string
          - label: Description
            name: description
            widget: text
            required: false
          - label: Button
            name: cta
            widget: object
            fields:
              - label: Label
                name: label
                widget: string
              - label: Link
                name: href
                widget: string
          - label: Placeholder Message
            name: empty_message
            widget: text
            hint: Shown until achievements are published.

      - name: admissions-banner
        label: "Admissions Banner"
        file: src/content/home/admissions-banner.json
        icon: campaign
        fields:
          - label: Kicker
            name: kicker
            widget: string
          - label: Title
            name: title
            widget: string
          - label: Description
            name: description
            widget: text
          - label: Phone Numbers
            name: phones
            widget: relation
            required: false
            multiple: true
            collection: _singletons
            file: contact-details
            value_field: phone_numbers.*
            display_fields:
              - phone_numbers.*
            search_fields:
              - phone_numbers.*
            hint: Leave empty to show every number from Contact details.
          - label: Button
            name: cta
            widget: object
            fields:
              - label: Label
                name: label
                widget: string
              - label: Link
                name: href
                widget: string

      - name: news
        label: "News and Events"
        file: src/content/home/news.json
        icon: newspaper
        fields:
          - label: Eyebrow
            name: eyebrow
            widget: string
          - label: Title
            name: title
            widget: string
          - label: Description
            name: description
            widget: text
            required: false
          - label: Button
            name: cta
            widget: object
            fields:
              - label: Label
                name: label
                widget: string
              - label: Link
                name: href
                widget: string
          - label: Placeholder Message
            name: empty_message
            widget: text
            hint: Shown until news items are published.

      - name: testimonials
        label: "Testimonials"
        file: src/content/home/testimonials.json
        icon: format_quote
        fields:
          - label: Eyebrow
            name: eyebrow
            widget: string
          - label: Title
            name: title
            widget: string
          - label: Testimonials
            name: items
            widget: list
            label_singular: Testimonial
            summary: "{{fields.name}} — {{fields.role}}"
            fields:
              - label: Quote
                name: quote
                widget: text
              - label: Name
                name: name
                widget: string
              - label: Role
                name: role
                widget: string

      - name: contact-cards
        label: "Contact Cards"
        file: src/content/home/contact-cards.json
        icon: contact_mail
        hint: The address, phone numbers and email come from Contact Details.
        fields:
          - label: Card titles
            name: cards
            widget: object
            fields:
              - label: Visit card
                name: visit
                widget: string
              - label: Call card
                name: call
                widget: string
              - label: Write card
                name: write
                widget: string
              - label: Link label
                name: link_label
                widget: string
