# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json
#
# ⬇⬇⬇  TWO THINGS YOU MUST EDIT  ⬇⬇⬇
# 1. repo:     replace YOUR_GITHUB_USERNAME/YOUR_REPO_NAME with your actual repo,
#              e.g.  mattrooney/mattrooneydj  (shown in your GitHub repo URL).
# 2. base_url: replace YOUR_WORKER_URL with the login-helper URL you create in
#              LOGIN-SETUP.md (looks like https://sveltia-cms-auth.xxxx.workers.dev).
#              This is what gives you the one-click "Sign in with GitHub" button.
backend:
  name: github
  repo: matt-rooney/mattrooneydj
  branch: main
  base_url: https://sveltia-cms-auth.mattrooney95.workers.dev
# ⬆⬆⬆  TWO THINGS YOU MUST EDIT  ⬆⬆⬆

# Where uploaded gallery photos are stored in the repo.
media_folder: "images/uploads"
public_folder: "/images/uploads"

# Friendly editor title + link back to the live site.
site_url: "https://www.mattrooneydj.co.uk"
display_url: "https://www.mattrooneydj.co.uk"

collections:
  - name: pages
    label: "Website content"
    description: "Edit the text and images on each page, then click Publish."
    files:
      # ---------------- GLOBAL ----------------
      - name: global
        label: "Global · footer & contact details"
        file: "content/global.json"
        format: json
        fields:
          - { name: site_name, label: "Business name (logo text)", widget: string }
          - { name: tagline, label: "Tagline (small text under logo)", widget: string }
          - { name: email, label: "Contact email", widget: string }
          - { name: instagram_url, label: "Instagram link", widget: string }
          - { name: location, label: "Location", widget: string }
          - { name: footer_blurb, label: "Footer description", widget: text }
          - { name: copyright_name, label: "Copyright name", widget: string }

      # ---------------- HOME ----------------
      - name: home
        label: "Home page"
        file: "content/home.json"
        format: json
        fields:
          - { name: hero_eyebrow, label: "Hero · small label", widget: string }
          - { name: hero_heading, label: "Hero · big heading (wrap a word in *stars* to make it gold italic)", widget: string }
          - { name: hero_sub, label: "Hero · subheading", widget: text }
          - { name: welcome_heading, label: "Welcome · heading", widget: string }
          - name: welcome_paragraphs
            label: "Welcome · paragraphs"
            widget: list
            field: { name: text, label: "Paragraph", widget: text }
          - name: stats
            label: "Stat strip (the 4 boxes)"
            widget: list
            fields:
              - { name: num, label: "Big number/word", widget: string }
              - { name: label, label: "Caption", widget: string }
          - { name: services_heading, label: "Services · heading", widget: string }
          - { name: services_intro, label: "Services · intro", widget: text }
          - name: service_cards
            label: "Service cards"
            widget: list
            fields:
              - { name: icon, label: "Icon (emoji)", widget: string }
              - { name: title, label: "Title", widget: string }
              - { name: text, label: "Description", widget: text }
          - { name: pricing_price, label: "Pricing · price", widget: string }
          - { name: pricing_blurb, label: "Pricing · blurb", widget: text }
          - { name: enquiry_heading, label: "Instant enquiry · heading", widget: string }
          - { name: enquiry_intro, label: "Instant enquiry · intro", widget: text }
          - { name: gallery_heading, label: "Gallery preview · heading", widget: string }
          - { name: cta_heading, label: "Bottom call-to-action · heading (use *stars* for gold italic)", widget: string }
          - { name: cta_text, label: "Bottom call-to-action · text", widget: text }

      # ---------------- GALLERY ----------------
      - name: gallery
        label: "Gallery page & photos"
        file: "content/gallery.json"
        format: json
        fields:
          - { name: heading, label: "Heading", widget: string }
          - { name: intro, label: "Intro text", widget: text }
          - name: images
            label: "Gallery photos"
            label_singular: "photo"
            widget: list
            summary: "{{fields.alt}}"
            fields:
              - { name: image, label: "Photo", widget: image }
              - { name: alt, label: "Short description (for accessibility)", widget: string, required: false }

      # ---------------- TESTIMONIALS ----------------
      - name: testimonials
        label: "Testimonials page"
        file: "content/testimonials.json"
        format: json
        fields:
          - { name: heading, label: "Heading", widget: string }
          - { name: intro, label: "Intro text", widget: text }
          - name: items
            label: "Testimonials"
            label_singular: "testimonial"
            widget: list
            summary: "{{fields.name}}"
            fields:
              - { name: quote, label: "Quote", widget: text }
              - { name: name, label: "Client name", widget: string }

      # ---------------- CONTACT ----------------
      - name: contact
        label: "Contact page"
        file: "content/contact.json"
        format: json
        fields:
          - { name: heading, label: "Heading", widget: string }
          - { name: intro, label: "Intro under heading", widget: text }
          - { name: info_intro, label: "Text above the contact details", widget: text }
