# Editors sign in through DecapBridge (password, Google or Microsoft), which
# commits their changes to GitHub with an access token kept on its side.
# Invite editors from the DecapBridge dashboard.
backend:
  name: git-gateway
  repo: karelbrr/ian-kita-web
  branch: main
  auth_type: pkce
  base_url: https://auth.decapbridge.com
  auth_endpoint: /sites/aa5add73-39c9-4e5c-8197-4a4cf72c784f/pkce
  auth_token_endpoint: /sites/aa5add73-39c9-4e5c-8197-4a4cf72c784f/token
  gateway_url: https://gateway.decapbridge.com
  # The repo is public, so commit messages name the editor but leave out
  # their email address.
  commit_messages:
    create: Create {{collection}} “{{slug}}” - {{author-name}} via DecapBridge
    update: Update {{collection}} “{{slug}}” - {{author-name}} via DecapBridge
    delete: Delete {{collection}} “{{slug}}” - {{author-name}} via DecapBridge
    uploadMedia: Upload “{{path}}” - {{author-name}} via DecapBridge
    deleteMedia: Delete “{{path}}” - {{author-name}} via DecapBridge
    openAuthoring: Message {{message}} - {{author-name}} via DecapBridge

# Profile fields DecapBridge passes on, for the editor's name and avatar.
auth:
  email_claim: email
  first_name_claim: first_name
  last_name_claim: last_name
  avatar_url_claim: avatar_url

logo_url: https://decapbridge.com/decapcms-with-bridge.svg
site_url: https://iankita.com

# Lets you run `npx decap-server` locally and edit content without signing
# in. Remove this line once you only want to edit through the deployed site.
local_backend: true

# Photos live inside src/ so Astro can optimise them (responsive sizes, WebP).
# The stored path ("/src/assets/photos/<file>") is what the components look up.
media_folder: "src/assets/photos"
public_folder: "/src/assets/photos"

collections:
  - name: "about"
    label: "About & Texts"
    files:
      - name: "about"
        label: "About & Texts — English"
        file: "src/data/about.json"
        format: "json"
        # The Czech entry below reuses this field list (&about_fields / *about_fields).
        fields: &about_fields
          - { name: "tagline", label: "Hero tagline", widget: "string", hint: "Short line under the logo, e.g. “Music connects us.”" }
          - { name: "eyebrow", label: "Hero eyebrow", widget: "string", hint: "Small caps line above the logo (genres · city)." }
          - { name: "lead", label: "About — lead sentence", widget: "text" }
          - name: "paragraphs"
            label: "About — paragraphs"
            widget: "list"
            allow_add: true
            field: { name: "paragraph", label: "Paragraph", widget: "text" }
          - { name: "quote", label: "Manifesto quote", widget: "text" }
          - { name: "quoteSource", label: "Quote source", widget: "string" }
          - { name: "liveQuote", label: "Live section quote", widget: "text", hint: "Shown over the live video." }
          - name: "stats"
            label: "Key numbers"
            widget: "list"
            allow_add: true
            summary: "{{value}} — {{label}}"
            fields:
              - { name: "value", label: "Value", widget: "string" }
              - { name: "label", label: "Label", widget: "string" }
          - { name: "labels", label: "Record labels", widget: "text", hint: "Comma-separated; shown in the scrolling band." }
      - name: "about-cs"
        label: "About & Texts — Czech"
        file: "src/data/about.cs.json"
        format: "json"
        fields: *about_fields

  - name: "upcoming-shows"
    label: "Upcoming Shows"
    files:
      - name: "upcoming-shows"
        label: "Upcoming Shows"
        file: "src/data/upcoming-shows.json"
        format: "json"
        fields:
          - name: "shows"
            label: "Shows"
            widget: "list"
            allow_add: true
            summary: "{{venue}} — {{date}}"
            fields:
              - { name: "date", label: "Date", widget: "datetime", format: "YYYY-MM-DD", date_format: "YYYY-MM-DD", time_format: false }
              - { name: "venue", label: "Venue", widget: "string", hint: "Normal case, e.g. Club Zlín." }
              - { name: "location", label: "Location", widget: "string", hint: "City and country, e.g. Zlín, CZ." }
              - { name: "location_cs", label: "Location (Czech)", widget: "string", required: false, hint: "Only when the Czech name differs, e.g. Praha, CZ." }
              - { name: "url", label: "Event link", widget: "string", required: false, pattern: ["^https?://", "Paste the full address, starting with https://"], hint: "Facebook event, GoOut or ticket page. The whole row then links to it." }

  - name: "milestones"
    label: "Milestones"
    files:
      - name: "milestones"
        label: "Milestones"
        file: "src/data/milestones.json"
        format: "json"
        fields:
          - name: "milestones"
            label: "Milestones"
            widget: "list"
            allow_add: true
            summary: "{{fields.year}} — {{text}}"
            fields:
              - { name: "year", label: "Year", widget: "string" }
              - { name: "text", label: "Text", widget: "string" }
              - { name: "text_cs", label: "Text (Czech)", widget: "string", required: false, hint: "Shown on the Czech site. Leave empty to reuse the English text." }
              - { name: "photo", label: "Photo", widget: "image", required: false, hint: "Shown while this milestone is active. Leave empty to keep the previous milestone's photo." }
              - { name: "alt", label: "Alt text", widget: "string", required: false, hint: "Describe the photo for screen readers and search engines." }
              - { name: "alt_cs", label: "Alt text (Czech)", widget: "string", required: false, hint: "Shown on the Czech site. Leave empty to reuse the English text." }
              - { name: "caption", label: "Caption", widget: "string", required: false, hint: "Small label on the photo, e.g. “2001 · Jančovka”." }
              - { name: "caption_cs", label: "Caption (Czech)", widget: "string", required: false, hint: "Shown on the Czech site. Leave empty to reuse the English text." }
              - { name: "focus", label: "Focus (left → right)", widget: "number", value_type: "int", min: 0, max: 100, default: 50, required: false, hint: "Wide photos are cropped to a portrait print on desktop. 0 keeps the left edge, 50 the centre, 100 the right edge." }
              - { name: "black_and_white", label: "Black and white", widget: "boolean", default: false, required: false }

  - name: "footer"
    label: "Footer"
    files:
      - name: "footer"
        label: "Footer"
        file: "src/data/footer.json"
        format: "json"
        fields:
          - { name: "email", label: "Booking email", widget: "string", pattern: ["^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$", "Enter a valid email address"], hint: "The big link in the footer. Also used in the privacy policy and terms, so they always name the same address." }
          - { name: "heading", label: "Headline", widget: "string" }
          - { name: "heading_cs", label: "Headline (Czech)", widget: "string", required: false, hint: "Shown on the Czech site. Leave empty to reuse the English text." }
          - { name: "description", label: "Description", widget: "text" }
          - { name: "description_cs", label: "Description (Czech)", widget: "text", required: false, hint: "Shown on the Czech site. Leave empty to reuse the English text." }
          - { name: "rights", label: "Copyright line", widget: "string", hint: "The © sign and the current year are added in front automatically." }
          - { name: "rights_cs", label: "Copyright line (Czech)", widget: "string", required: false, hint: "Shown on the Czech site. Leave empty to reuse the English text." }

  - name: "festivals"
    label: "Festivals (scrolling band)"
    files:
      - name: "festivals"
        label: "Festivals"
        file: "src/data/festivals.json"
        format: "json"
        fields:
          - name: "festivals"
            label: "Festivals"
            widget: "list"
            allow_add: true
            summary: "{{name}}"
            fields:
              - { name: "name", label: "Name", widget: "string" }

  - name: "gallery"
    label: "Gallery Photos"
    files:
      - name: "gallery"
        label: "Gallery Photos"
        file: "src/data/gallery.json"
        format: "json"
        fields:
          - name: "images"
            label: "Photos"
            widget: "list"
            allow_add: true
            summary: "{{caption}}"
            hint: "The first photo anchors the grid as a large tile; portrait photos take two rows, wide photos two columns."
            fields:
              - { name: "url", label: "Photo", widget: "image" }
              - { name: "alt", label: "Alt text", widget: "string", hint: "Describe the photo for screen readers and search engines." }
              - { name: "caption", label: "Caption", widget: "string", hint: "Venue or event, e.g. “Mácháč 2026”." }
              - { name: "caption_cs", label: "Caption (Czech)", widget: "string", required: false, hint: "Shown on the Czech site. Leave empty to reuse the English text." }
              - { name: "alt_cs", label: "Alt text (Czech)", widget: "string", required: false, hint: "Shown on the Czech site. Leave empty to reuse the English text." }
