# Sveltia CMS — https://github.com/sveltia/sveltia-cms
# Editors sign in with GitHub. Every save is a commit to the repo; Cloudflare Pages rebuilds the site on push.

backend:
  name: github
  repo: jowtron/celebrationsingout-site
  branch: main
  base_url: https://cso-cms-auth.josephderrickrepairs.workers.dev
  commit_messages:
    create: "Add {{collection}} “{{slug}}”"
    update: "Update {{collection}} “{{slug}}”"
    delete: "Delete {{collection}} “{{slug}}”"
    uploadMedia: "Upload {{path}}"
    deleteMedia: "Delete {{path}}"

site_url: https://celebrationsingout.org.au
display_url: https://celebrationsingout.org.au
app_title: Celebration Sing Out!
logo_url: /images/cso-wordmark.svg

media_folder: public/images
public_folder: /images

slug:
  encoding: ascii
  clean_accents: true

collections:
  - name: settings
    label: Site settings
    description: Concert details, links, the appeal, and supporters. Changes here show up across the whole site.
    files:
      - name: site
        label: Concert & contact details
        file: src/content/settings/site.yaml
        fields:
          - { name: title, label: Site title, widget: string }
          - { name: year, label: Concert year, widget: number, value_type: int }
          - { name: edition, label: Edition, widget: string, hint: "e.g. 34th annual concert" }
          - { name: tagline, label: Tagline, widget: string }
          - name: concert
            label: Concert day
            widget: object
            fields:
              - { name: weekday, label: Weekday, widget: string }
              - { name: date, label: Date, widget: datetime, format: YYYY-MM-DD, date_format: "D MMMM YYYY", time_format: false }
              - { name: date_short, label: Short date (for the poster), widget: string, hint: "e.g. 1 Nov" }
              - { name: venue, label: Venue, widget: string }
              - { name: address, label: Address, widget: string }
              - { name: rehearsals_from, label: Rehearsals from, widget: string }
              - { name: priority_doors, label: Priority access doors, widget: string }
              - { name: doors, label: General admission doors, widget: string }
              - { name: start, label: Concert starts, widget: string }
              - { name: end, label: Concert ends, widget: string }
              - { name: interval, label: Interval note, widget: string }
          - name: links
            label: Links
            widget: object
            fields:
              - { name: tickets, label: Ticket link (Humanitix), widget: string }
              - { name: donate, label: Donation link (SCHF), widget: string }
              - { name: adult_registration, label: Adult singer registration form, widget: string }
              - { name: school_registration, label: High school registration form, widget: string }
              - { name: volunteer, label: Volunteer form, widget: string }
              - { name: instagram, label: Instagram, widget: string }
              - { name: facebook, label: Facebook, widget: string }
              - { name: tops, label: TOPS website, widget: string }
              - { name: schf, label: SCHF website, widget: string }
          - { name: email, label: Contact email, widget: string }
          - { name: phone, label: Contact phone, widget: string }
          - { name: phone_hours, label: Phone hours, widget: string }
          - name: appeal
            label: Fundraising appeal
            widget: object
            fields:
              - { name: target, label: This year's target ($), widget: number, value_type: int }
              - { name: previous_year, label: Previous year, widget: number, value_type: int }
              - { name: previous_raised, label: Previous year raised ($), widget: number, value_type: int }
              - { name: note, label: Note under the progress bar, widget: string }
              - name: tiers
                label: Donation tiers
                widget: list
                fields:
                  - { name: name, label: Name, widget: string }
                  - { name: min, label: From ($), widget: number, value_type: int }
                  - { name: highlight, label: Highlight, widget: boolean, required: false, default: false }
          - name: supporters
            label: Supporters
            widget: object
            fields:
              - { name: text, label: Supporter statement, widget: text }
              - name: logos
                label: Logos
                widget: list
                fields:
                  - { name: name, label: Name, widget: string }
                  - { name: logo, label: Logo, widget: image }
                  - { name: url, label: Website, widget: string, required: false }
          - { name: org, label: Legal entity, widget: string }
          - { name: abn, label: ABN, widget: string }
          - { name: abn_url, label: ABN lookup link, widget: string }
          - { name: founded, label: Founded, widget: number, value_type: int }
          - { name: acknowledgement, label: Acknowledgement of Country, widget: text }

      - name: homepage
        label: Home page
        file: src/content/settings/homepage.yaml
        fields:
          - name: hero
            label: Cover
            widget: object
            fields:
              - { name: title, label: Title, widget: string }
              - { name: intro, label: Introduction, widget: text }
              - { name: detail, label: Second paragraph, widget: text }
              - { name: image, label: Cover photo, widget: image }
              - { name: alt, label: Photo description (for screen readers), widget: string }
          - name: sing
            label: Sing with us
            widget: object
            fields:
              - { name: title, label: Title, widget: string }
              - { name: lead, label: Lead line, widget: string }
              - { name: reasons, label: Short reasons to join, widget: list, hint: "Shown in a row under the heading, e.g. No audition · Learn as you go · At your place. Three to six work best.", field: { name: p, label: Reason, widget: string } }
              - { name: body, label: Body, widget: text }
              - { name: guides, label: About the teachers, widget: text }
              - name: quote
                label: Quote
                widget: object
                fields:
                  - { name: text, label: Quote, widget: text }
                  - { name: cite, label: Who said it, widget: string }
              - { name: image, label: Photo, widget: image }
              - { name: alt, label: Photo description, widget: string }
              - name: routes
                label: Sing or volunteer tiles
                widget: list
                fields:
                  - { name: label, label: Label, widget: string }
                  - { name: note, label: One line underneath, widget: string }
                  - { name: url, label: Link, widget: string }
                  - { name: image, label: Photo, widget: image }
          - name: mission
            label: Our Mission
            widget: object
            fields:
              - { name: title, label: Title, widget: string }
              - { name: body, label: Mission statement, widget: text }
              - name: quotes
                label: Quotes
                widget: list
                fields:
                  - { name: text, label: Quote, widget: text }
                  - { name: cite, label: Who said it, widget: string }
              - { name: image, label: Background photo, widget: image }
              - { name: alt, label: Photo description, widget: string }
          - name: forces
            label: The Musical Forces
            widget: object
            fields:
              - { name: title, label: Title, widget: string }
              - { name: intro, label: Intro line, widget: string }
              - { name: items, label: Forces, widget: list, field: { name: f, label: Force, widget: string } }
              - { name: finale, label: Finale description, widget: text }
              - { name: image, label: Background photo, widget: image }
              - { name: alt, label: Photo description, widget: string }
          - name: conductors
            label: The Conductors
            widget: object
            fields:
              - { name: title, label: Title, widget: string }
          - name: tickets
            label: Buy tickets or donate
            widget: object
            fields:
              - { name: title, label: Title, widget: string }
              - { name: audience_title, label: Audience — title, widget: string }
              - { name: audience_lead, label: Audience — lead line, widget: string }
              - { name: audience_body, label: Audience — details, widget: text }
              - { name: donate_title, label: Donate — title, widget: string }
              - { name: donate_lead, label: Donate — lead line, widget: string }
              - { name: donate_quote, label: Donate — quote, widget: string }
              - { name: donate_body, label: Donate — details, widget: text }
              - { name: image, label: Background photo, widget: image }
              - { name: alt, label: Photo description, widget: string }
          - name: greenroom
            label: The Green Room
            widget: object
            fields:
              - { name: title, label: Title, widget: string }
              - { name: body, label: Body, widget: text }
              - { name: image, label: Photo, widget: image }
              - { name: alt, label: Photo description, widget: string }

      - name: program
        label: Concert program
        file: src/content/settings/program.yaml
        fields:
          - { name: headline, label: Headline, widget: string }
          - name: first_half
            label: First half
            widget: object
            fields:
              - { name: title, label: Title, widget: string }
              - { name: subtitle, label: Who performs, widget: string }
              - name: works
                label: Works
                widget: list
                fields:
                  - { name: title, label: Title, widget: string }
                  - { name: by, label: Composer / note, widget: string, required: false }
                  - { name: movements, label: Movements, widget: list, required: false, field: { name: m, label: Movement, widget: string } }
              - { name: note, label: Note, widget: text }
          - name: second_half
            label: Second half
            widget: object
            fields:
              - { name: title, label: Title, widget: string }
              - { name: subtitle, label: Who performs, widget: string }
              - name: works
                label: Works
                widget: list
                fields:
                  - { name: title, label: Title, widget: string }
                  - { name: by, label: Composer / note, widget: string, required: false }
                  - { name: movements, label: Movements, widget: list, required: false, field: { name: m, label: Movement, widget: string } }
              - { name: note, label: Note, widget: text }
          - name: finale
            label: Finale
            widget: object
            fields:
              - { name: label, label: Label, widget: string }
              - { name: text, label: Text, widget: text }
          - { name: forces, label: Musical forces (pills), widget: list, field: { name: f, label: Force, widget: string } }

  - name: people
    label: People
    label_singular: Person
    description: Leadership team, in the order they appear on the site.
    folder: src/content/people
    create: true
    extension: md
    format: frontmatter
    slug: "{{name}}"
    summary: "{{name}} — {{role}}"
    sortable_fields: [order, name]
    fields:
      - { name: name, label: Name, widget: string }
      - { name: role, label: Role, widget: string }
      - { name: group, label: Section, widget: select, options: [{ label: The Conductors, value: conductor }, { label: Leadership team, value: team }], default: team }
      - { name: photo, label: Photo, widget: image, required: false, hint: "Square works best. Leave empty to show initials." }
      - { name: initials, label: Initials (if no photo), widget: string, required: false }
      - { name: order, label: Order, widget: number, value_type: int, default: 50 }
      - { name: show_on_home, label: Show on home page, widget: boolean, default: true }
      - { name: short, label: Short bio (home page), widget: text, required: false, hint: "One or two sentences. Shown on the home page." }
      - { name: body, label: Full bio (People page), widget: markdown, required: false }

  - name: works
    label: Repertoire & guide tracks
    label_singular: Work
    description: One entry per piece of music. Scores, lyrics, audio and video guide tracks, and program notes. Everything here sits behind the Green Room password.
    folder: src/content/works
    create: true
    extension: md
    format: frontmatter
    slug: "{{choir}}-{{title}}"
    summary: "{{title}} — {{choir}}"
    sortable_fields: [order, title, choir]
    media_folder: /public/green-room/files
    public_folder: /green-room/files
    fields:
      - { name: title, label: Title, widget: string }
      - { name: choir, label: Which choir, widget: select, options: [{ label: Massed primary choirs, value: primary }, { label: High school & adult choir, value: secondary }], default: primary }
      - { name: order, label: Order in the program, widget: number, value_type: int, default: 50 }
      - { name: credit, label: Composer / arranger line, widget: string, required: false }
      - name: audio
        label: Audio guide tracks
        widget: list
        required: false
        fields:
          - { name: label, label: Part, widget: string }
          - { name: url, label: Link, widget: string }
      - name: video
        label: Video guide tracks
        widget: list
        required: false
        fields:
          - { name: label, label: Part, widget: string }
          - { name: url, label: Link, widget: string }
      - name: sheets
        label: Scores & lyrics
        widget: list
        required: false
        fields:
          - { name: label, label: What it is, widget: string }
          - { name: url, label: File or link, widget: string }
      - name: links
        label: Other links
        widget: list
        required: false
        fields:
          - { name: label, label: Link text, widget: string }
          - { name: url, label: Link, widget: string }
      - name: youtube
        label: YouTube videos to embed
        widget: list
        required: false
        fields:
          - { name: id, label: Video ID (the part after v=), widget: string }
          - { name: label, label: Caption, widget: string, required: false }
      - { name: body, label: Program notes / teaching notes, widget: markdown, required: false }

  - name: greenroom
    label: Green Room pages
    label_singular: Green Room page
    description: Rehearsals, concert day, access, videos, tips, teaching and the choir Q&A. These pages are behind the Green Room password.
    folder: src/content/greenroom
    create: true
    extension: md
    format: frontmatter
    slug: "{{title}}"
    sortable_fields: [order, title]
    fields:
      - { name: title, label: Title, widget: string }
      - { name: eyebrow, label: Small line above the title, widget: string, required: false }
      - { name: lede, label: Opening paragraph, widget: text, required: false }
      - { name: order, label: Order in the Green Room, widget: number, value_type: int, default: 50 }
      - { name: show_on_hub, label: Show on the Green Room front page, widget: boolean, default: true }
      - name: ctas
        label: Buttons
        widget: list
        required: false
        fields:
          - { name: label, label: Button text, widget: string }
          - { name: url, label: Link, widget: string }
          - { name: primary, label: Main button, widget: boolean, default: false }
      - { name: body, label: Page content, widget: markdown }

  - name: pages
    label: Information pages
    label_singular: Page
    description: Longer pages linked from the home page — primary schools, high schools & adults, volunteering. The file name becomes the web address.
    folder: src/content/pages
    create: true
    extension: md
    format: frontmatter
    slug: "{{title}}"
    fields:
      - { name: title, label: Title, widget: string }
      - { name: eyebrow, label: Small line above the title, widget: string, required: false }
      - { name: lede, label: Opening paragraph, widget: text, required: false }
      - { name: image, label: Photo, widget: image, required: false }
      - { name: alt, label: Photo description, widget: string, required: false }
      - name: ctas
        label: Buttons
        widget: list
        required: false
        fields:
          - { name: label, label: Button text, widget: string }
          - { name: url, label: Link, widget: string }
          - { name: primary, label: Main button, widget: boolean, default: false }
      - { name: contact, label: Contact line (shown under the buttons), widget: string, required: false }
      - { name: noindex, label: Hide from search engines, widget: boolean, default: false, hint: "For pages you want to share by link only." }
      - { name: body, label: Page content, widget: markdown }

  - name: resources
    label: Green Room resources
    label_singular: Resource
    description: Scores, lyrics, audio, videos and documents for singers and teachers. Files uploaded here are behind the Green Room password.
    folder: src/content/resources
    create: true
    extension: md
    format: frontmatter
    slug: "{{title}}"
    summary: "{{title}} ({{group}})"
    sortable_fields: [order, title, group]
    media_folder: /public/green-room/files
    public_folder: /green-room/files
    fields:
      - { name: title, label: Title, widget: string }
      - { name: group, label: Who it's for, widget: select, options: [{ label: Everyone, value: everyone }, { label: Primary choirs, value: primary }, { label: High school & colleges, value: secondary }, { label: Adult singers, value: adult }, { label: Teachers, value: teachers }], default: everyone }
      - { name: type, label: Type, widget: select, options: [{ label: Score, value: score }, { label: Lyrics, value: lyrics }, { label: Audio / guide track, value: audio }, { label: Video, value: video }, { label: Document, value: document }, { label: Link, value: link }], default: document }
      - { name: file, label: File (PDF, audio, Word), widget: file, required: false }
      - { name: url, label: Link (YouTube, Drive, etc.), widget: string, required: false }
      - { name: description, label: One-line description, widget: string, required: false }
      - { name: order, label: Order, widget: number, value_type: int, default: 50 }
      - { name: body, label: Notes, widget: markdown, minimal: true, required: false }
