# Decap CMS configuration for Fanny's Distillery.
# See CMS-SETUP.md for the full deploy checklist (OAuth app, worker, Pages
# project). Everything marked <<PLACEHOLDER>> must be filled in before the
# CMS will authenticate — until then this file is inert and does no harm.

backend:
  name: github
  repo: Barticom94/fannys-distillery-website
  branch: main
  base_url: https://fannys-distillery-cms-auth.adamharley94.workers.dev
  auth_endpoint: auth               # worker route: <base_url>/auth

# Editorial workflow: every change becomes a draft PR-like entry (a branch +
# commit under refs/cms/*) that an editor must "publish" before it reaches
# main. Keeps Marcus/Adam from accidentally publishing straight to the live
# site build.
publish_mode: editorial_workflow

media_folder: assets/img/uploads
public_folder: /assets/img/uploads

site_url: https://fannysdistillery.com
display_url: https://fannysdistillery.com
logo_url: /assets/img/logo/stills-copper.png

collections:
  # -------------------------------------------------------------- settings
  - name: settings
    label: "Site Settings"
    files:
      - file: content/settings.json
        label: "Global Settings"
        name: settings
        fields:
          - { label: "Site Name", name: site_name, widget: string }
          - { label: "Domain", name: domain, widget: string }
          - { label: "Tagline", name: tagline, widget: string }
          - { label: "Founded Year", name: founded_year, widget: number, value_type: int }
          - { label: "Copyright Year", name: year, widget: number, value_type: int }
          - { label: "Build Date", name: build_date, widget: string, hint: "Bumped automatically on each build; safe to leave" }
          - label: "Company"
            name: company
            widget: object
            fields:
              - { label: "Legal Name", name: legal_name, widget: string }
              - { label: "Companies House Reg No.", name: reg_number, widget: string }
              - { label: "Email", name: email, widget: string }
              - { label: "Phone (display)", name: phone_display, widget: string }
              - { label: "Phone (tel: href, e.g. +441535322392)", name: phone_href, widget: string }
              - { label: "Address Lines", name: address_lines, widget: list, field: { label: Line, name: line, widget: string } }
              - { label: "Address (inline, one line)", name: address_inline, widget: string }
          - label: "Social Links"
            name: socials
            widget: object
            fields:
              - { label: Facebook, name: facebook, widget: string }
              - { label: Instagram, name: instagram, widget: string }
          - label: "Navigation"
            name: nav
            widget: object
            fields:
              - { label: "Our Story link", name: our_story, widget: string }
              - label: "Products dropdown"
                name: products_dropdown
                widget: list
                fields:
                  - { label: Label, name: label, widget: string }
                  - { label: Link, name: href, widget: string }
              - { label: "Awards link", name: awards, widget: string }
              - { label: "News link", name: news, widget: string }
              - { label: "Mobile Bar link", name: mobile_bar, widget: string }
              - { label: "Contact link", name: contact, widget: string }
          - label: "Footer"
            name: footer
            widget: object
            fields:
              - { label: "Brand blurb", name: brand_blurb, widget: text }
              - label: "Explore links"
                name: explore_links
                widget: list
                fields:
                  - { label: Label, name: label, widget: string }
                  - { label: Link, name: href, widget: string }
              - { label: "18+ / DrinkAware line (HTML allowed)", name: age_line, widget: text }
              - label: "Legal links"
                name: legal_links
                widget: list
                fields:
                  - { label: Label, name: label, widget: string }
                  - { label: Link, name: href, widget: string }
          - label: "Newsletter"
            name: newsletter
            widget: object
            fields:
              - { label: "Eyebrow", name: eyebrow, widget: string }
              - { label: "Heading", name: heading, widget: string }
              - { label: "Copy", name: copy, widget: text }
              - { label: "Note (HTML allowed)", name: note, widget: text }
          - label: "Memberships (footer badges)"
            name: memberships
            widget: list
            fields:
              - { label: "Organisation name", name: name, widget: string }
              - { label: "Short label", name: short, widget: string }
              - { label: "Logo", name: logo, widget: image }
              - { label: "Website URL", name: url, widget: string }
              - { label: "Alt text", name: alt, widget: string }

  # -------------------------------------------------------------- products
  - name: products
    label: "Products"
    files:
      - file: content/products.json
        label: "Green Monkey Range"
        name: products
        fields:
          - label: "Products"
            name: products
            widget: list
            summary: "{{name}} — £{{price}}"
            fields:
              - { label: "Slug (URL, must match /product/<slug>/)", name: slug, widget: string }
              - { label: "Full Name", name: name, widget: string }
              - { label: "Short Name", name: short, widget: string }
              - { label: "Range", name: range, widget: select, options: [Whisky, Gin, Absinthe] }
              - { label: "Category anchor (whisky/gin/absinthe)", name: anchor, widget: string }
              - { label: "ABV (e.g. 45% Vol)", name: abv, widget: string }
              - { label: "Size (e.g. 70cl)", name: size, widget: string }
              - { label: "Price (GBP, no symbol)", name: price, widget: string }
              - { label: "Amazon ASIN", name: asin, widget: string }
              - { label: "Accent Colour (hex)", name: accent, widget: color }
              - { label: "Accent Bright Colour (hex)", name: accent_bright, widget: color }
              - { label: "Bottle Render (transparent PNG)", name: render, widget: image }
              - { label: "One-line Tasting Note", name: note, widget: string }
              - { label: "Full Tasting Copy", name: tasting, widget: text }
              - label: "Awards"
                name: awards
                widget: list
                summary: "{{name}} — {{medal}}"
                fields:
                  - { label: "Award Image", name: img, widget: image }
                  - { label: "Competition + Year label", name: name, widget: string }
                  - { label: "Medal / Result", name: medal, widget: string }
                  - { label: "Year", name: year, widget: number, value_type: int }
                  - { label: "Competition (for grouping)", name: competition, widget: string }
              - label: "Gallery"
                name: gallery
                widget: list
                fields:
                  - { label: Image, name: src, widget: image }
                  - { label: "Alt Text", name: alt, widget: string }
              - { label: "Extra availability line (HTML allowed, no pickup/in-person wording — Amazon only)", name: extra, widget: text }
              - { label: "Has cocktail recipe note?", name: cocktail, widget: boolean, default: false }

  # -------------------------------------------------------------- pages
  - name: pages
    label: "Pages"
    files:
      - file: content/pages/home.json
        label: "Home Page"
        name: home
        fields:
          - { label: "<title> tag", name: title, widget: string }
          - { label: "Meta description", name: description, widget: text }
          - label: Hero
            name: hero
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Lede, name: lede, widget: text }
              - label: "Primary button"
                name: cta_primary
                widget: object
                fields: [{ label: Label, name: label, widget: string }, { label: Link, name: href, widget: string }]
              - label: "Secondary button"
                name: cta_secondary
                widget: object
                fields: [{ label: Label, name: label, widget: string }, { label: Link, name: href, widget: string }]
          - label: "Award marquee"
            name: award_strip
            widget: object
            fields:
              - { label: "Screen-reader label", name: label, widget: string }
              - { label: "Link (awards page)", name: href, widget: string }
              - label: Awards
                name: awards
                widget: list
                fields: [{ label: Image, name: img, widget: image }, { label: "Alt text", name: alt, widget: string }]
          - label: "Flagship product spotlight"
            name: flagship
            widget: object
            fields:
              - { label: "Product slug", name: slug, widget: string }
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: "Tasting line", name: tasting_line, widget: text }
              - { label: "Button label", name: cta_label, widget: string }
          - label: "Rule-of-three impact stats"
            name: impact
            widget: object
            fields:
              - label: Items
                name: items
                widget: list
                fields: [{ label: Value, name: value, widget: string }, { label: Label, name: label, widget: string }]
          - label: Intro
            name: intro
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Paragraphs, name: paragraphs, widget: list, field: { label: Paragraph, name: p, widget: text } }
              - { label: "Button label", name: cta_label, widget: string }
              - { label: "Button link", name: cta_href, widget: string }
              - { label: Image, name: image, widget: image }
              - { label: "Image alt", name: image_alt, widget: string }
          - label: "Range row (3 category cards)"
            name: range_row
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - label: Cards
                name: cards
                widget: list
                fields:
                  - { label: Title, name: title, widget: string }
                  - { label: Line, name: line, widget: string }
                  - { label: Image, name: image, widget: image }
                  - { label: "Alt text", name: alt, widget: string }
                  - { label: Link, name: href, widget: string }
          - label: Collection
            name: collection
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Lede, name: lede, widget: text }
          - label: "Story teaser"
            name: story_teaser
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Paragraph, name: paragraph, widget: text }
              - { label: Quote, name: quote, widget: text }
              - { label: "Quote citation (HTML allowed)", name: quote_cite, widget: string }
              - { label: "Button label", name: cta_label, widget: string }
              - { label: "Button link", name: cta_href, widget: string }
              - { label: Image, name: image, widget: image }
              - { label: "Image alt", name: image_alt, widget: string }
              - { label: "Image caption (small italic)", name: image_caption, widget: string }
              - { label: "Show Marcus's signature", name: show_signature, widget: boolean, default: true }
          - label: "Mobile bar band"
            name: mobile_bar_band
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Lede, name: lede, widget: text }
              - { label: "Button label", name: cta_label, widget: string }
              - { label: "Button link", name: cta_href, widget: string }
              - { label: Image, name: image, widget: image }
              - { label: "Image alt", name: image_alt, widget: string }

      - file: content/pages/about.json
        label: "Our Story Page"
        name: about
        fields:
          - { label: "<title> tag", name: title, widget: string }
          - { label: "Meta description", name: description, widget: text }
          - label: Hero
            name: hero
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Lede, name: lede, widget: text }
              - { label: Image, name: image, widget: image }
              - { label: "Mobile image", name: image_mobile, widget: image, required: false }
              - { label: "Image alt", name: image_alt, widget: string }
          - label: "Marcus's story"
            name: marcus
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Paragraphs, name: paragraphs, widget: list, field: { label: Paragraph, name: p, widget: text } }
              - { label: Image, name: image, widget: image }
              - { label: "Image alt", name: image_alt, widget: string }
              - { label: "Image caption", name: image_caption, widget: string }
          - label: Timeline
            name: timeline
            widget: list
            fields:
              - { label: "Year label", name: year, widget: string }
              - { label: "ISO datetime (optional, for 'Today' entries)", name: year_datetime, widget: string, required: false }
              - { label: Title, name: title, widget: string }
              - { label: Text, name: text, widget: text }
          - label: "Distilling process"
            name: process
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Lede, name: lede, widget: text }
              - label: Cards
                name: cards
                widget: list
                fields: [{ label: Number, name: num, widget: string }, { label: Title, name: title, widget: string }, { label: Text, name: text, widget: text }]
              - { label: Quote, name: quote, widget: text }
              - { label: "Quote citation", name: quote_cite, widget: string }
          - label: "Kit & Craft"
            name: kit
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Paragraphs, name: paragraphs, widget: list, field: { label: Paragraph, name: p, widget: text } }
              - { label: Image, name: image, widget: image }
              - { label: "Image alt", name: image_alt, widget: string }
          - label: Gallery
            name: gallery
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: "Number of gallery images (assets/img/gallery/gallery-1..N.jpg)", name: count, widget: number, value_type: int }
          - label: "Closing band"
            name: band
            widget: object
            fields:
              - { label: Title, name: title, widget: string }
              - { label: Lede, name: lede, widget: text }
              - { label: "Button label", name: cta_label, widget: string }
              - { label: "Button link", name: cta_href, widget: string }
              - { label: Image, name: image, widget: image }
              - { label: "Image alt", name: image_alt, widget: string }

      - file: content/pages/shop.json
        label: "Shop Page"
        name: shop
        fields:
          - { label: "<title> tag", name: title, widget: string }
          - { label: "Meta description", name: description, widget: text }
          - label: Hero
            name: hero
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Lede, name: lede, widget: text }
              - { label: Image, name: image, widget: image }
              - { label: "Image alt", name: image_alt, widget: string }
          - label: "Range section headers"
            name: ranges
            widget: list
            fields: [{ label: Anchor, name: anchor, widget: string }, { label: Title, name: title, widget: string }, { label: Subtitle, name: sub, widget: string }]
          - label: "Note strip"
            name: note_strip
            widget: object
            fields:
              - { label: "Lines (HTML allowed)", name: lines, widget: list, field: { label: Line, name: line, widget: text } }

      - file: content/pages/whisky.json
        label: "Whisky Category Page"
        name: whisky
        fields: &category_fields
          - { label: "<title> tag", name: title, widget: string }
          - { label: "Meta description", name: description, widget: text }
          - { label: "Product range filter", name: range, widget: select, options: [Whisky, Gin, Absinthe] }
          - label: Hero
            name: hero
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Lede, name: lede, widget: text }
              - { label: Image, name: image, widget: image }
              - { label: "Image alt", name: image_alt, widget: string }
          - label: Intro
            name: intro
            widget: object
            fields:
              - { label: "Paragraphs (HTML allowed)", name: paragraphs, widget: list, field: { label: Paragraph, name: p, widget: text } }

      - file: content/pages/gin.json
        label: "Gin Category Page"
        name: gin
        fields: *category_fields

      - file: content/pages/absinthe.json
        label: "Absinthe Category Page"
        name: absinthe
        fields: *category_fields

      - file: content/pages/awards.json
        label: "Awards Page"
        name: awards
        fields:
          - { label: "<title> tag", name: title, widget: string }
          - { label: "Meta description", name: description, widget: text }
          - label: Hero
            name: hero
            widget: object
            fields: [{ label: Eyebrow, name: eyebrow, widget: string }, { label: Title, name: title, widget: string }, { label: Lede, name: lede, widget: text }]
          - label: "Closing CTA"
            name: cta
            widget: object
            fields:
              - { label: Title, name: title, widget: string }
              - { label: Lede, name: lede, widget: text }
              - { label: "Button label", name: cta_label, widget: string }
              - { label: "Button link", name: cta_href, widget: string }

      - file: content/pages/mobile-bar.json
        label: "Mobile Bar Page"
        name: mobile-bar
        fields:
          - { label: "<title> tag", name: title, widget: string }
          - { label: "Meta description", name: description, widget: text }
          - label: Hero
            name: hero
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Lede, name: lede, widget: text }
              - { label: Image, name: image, widget: image }
              - { label: "Mobile image", name: image_mobile, widget: image, required: false }
              - { label: "Image alt", name: image_alt, widget: string }
          - label: Features
            name: features
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - label: Items
                name: items
                widget: list
                fields:
                  - { label: Title, name: title, widget: string }
                  - { label: Text, name: text, widget: text }
                  - { label: "Icon (fridge/pumps/bottles/ice/counter/spirits)", name: icon, widget: string }
          - label: "Events copy"
            name: events
            widget: object
            fields:
              - { label: Eyebrow, name: eyebrow, widget: string }
              - { label: Title, name: title, widget: string }
              - { label: Paragraphs, name: paragraphs, widget: list, field: { label: Paragraph, name: p, widget: text } }
              - { label: "Button label", name: cta_label, widget: string }
              - { label: "Button link", name: cta_href, widget: string }
              - { label: Image, name: image, widget: image }
              - { label: "Image alt", name: image_alt, widget: string }

      - file: content/pages/contact.json
        label: "Contact Page"
        name: contact
        fields:
          - { label: "<title> tag", name: title, widget: string }
          - { label: "Meta description", name: description, widget: text }
          - { label: Eyebrow, name: eyebrow, widget: string }
          - { label: Heading, name: heading, widget: string }
          - { label: Lede, name: lede, widget: text }
          - { label: "Full-bleed photo", name: photo, widget: image }
          - { label: "Photo alt", name: photo_alt, widget: string }
          - { label: "Photo caption", name: photo_caption, widget: string }
          - { label: "Form success message", name: success_message, widget: string }

      - file: content/pages/latest-news.json
        label: "News Index Page"
        name: latest-news
        fields:
          - { label: "<title> tag", name: title, widget: string }
          - { label: "Meta description", name: description, widget: text }
          - { label: Eyebrow, name: eyebrow, widget: string }
          - { label: Heading, name: heading, widget: string }
          - { label: Lede, name: lede, widget: text }

      - file: content/pages/legal-terms.json
        label: "Terms & Conditions"
        name: legal-terms
        fields: &legal_fields
          - { label: "<title> tag", name: title, widget: string }
          - { label: "Meta description", name: description, widget: text }
          - { label: Heading, name: heading, widget: string }
          - { label: Intro, name: intro, widget: text }
          - label: Sections
            name: sections
            widget: list
            fields:
              - { label: Heading, name: heading, widget: string, required: false }
              - { label: "Paragraphs (HTML allowed)", name: paragraphs, widget: list, field: { label: Paragraph, name: p, widget: text } }

      - file: content/pages/legal-returns.json
        label: "Returns Page"
        name: legal-returns
        fields: *legal_fields

      - file: content/pages/legal-privacy.json
        label: "Privacy Policy"
        name: legal-privacy
        fields: *legal_fields

  # -------------------------------------------------------------- posts
  - name: posts
    label: "News Posts"
    folder: content/posts
    create: true
    delete: true
    slug: "{{slug}}"
    summary: "{{date}} — {{title}}"
    fields:
      - { label: "Slug (URL: /latest-news/<slug>/)", name: slug, widget: string }
      - { label: "Headline (on-page H1)", name: title, widget: string }
      - { label: "<title> tag (short)", name: meta_title, widget: string }
      - { label: "Meta description", name: description, widget: text }
      - { label: "Publish Date", name: date, widget: datetime, format: "YYYY-MM-DD", date_format: "YYYY-MM-DD", time_format: false }
      - { label: "Updated Date", name: updated, widget: datetime, format: "YYYY-MM-DD", date_format: "YYYY-MM-DD", time_format: false, required: false }
      - { label: "Hero Image", name: hero, widget: image }
      - { label: "Hero Alt Text", name: hero_alt, widget: string }
      - { label: "Excerpt (listing card)", name: excerpt, widget: text }
      - { label: "Related product slug (optional)", name: related_product, widget: string, required: false }
      - { label: "Body paragraphs (HTML allowed)", name: body, widget: list, field: { label: Paragraph, name: p, widget: text } }
