backend:
  name: github
  repo: twoheart1222/uprise-production  # 🔴 請確認這是不是你 GitHub 的「儲存庫名稱」，如果不是請改成正確的
  branch: main

media_folder: "images/uploads"
public_folder: "/images/uploads"

collections:
  - name: "pages"
    label: "頁面管理"
    files:
      # --- 1. 首頁 (Home) ---
      - label: "首頁 (Home)"
        name: "home"
        file: "content/index.md"
        fields:
          - {label: "網站標題", name: "title", widget: "string", default: "Uprise-Production"}
          
          # 🔴 重點修改：將 name 改為 "logo" 以對應前端程式，並加入提示
          - {label: "網站 Logo", name: "logo", widget: "image", required: false, hint: "建議上傳透明背景的 PNG 圖檔，以達到最佳顯示效果"}
          
          # 🔴 影片設定 (分開上傳)
          - {label: "背景影片 (電腦版 - 橫式 16:9)", name: "hero_video", widget: "file", required: false}
          - {label: "背景影片 (手機版 - 直式 9:16)", name: "hero_video_mobile", widget: "file", required: false, hint: "若未上傳，手機將使用電腦版影片"}
          
          - {label: "主視覺標語", name: "hero_text", widget: "string", default: "看見故事的力量"}
          
          # 🔴 服務項目
          - label: "服務項目"
            name: "services"
            widget: "list"
            fields:
              - {label: "服務名稱", name: "title", widget: "string"}
              - {label: "服務描述", name: "description", widget: "text"}
              - {label: "Icon 代碼 (FontAwesome)", name: "iconClass", widget: "string", required: false, hint: "例如: fa-solid fa-video"}
              - {label: "Icon 圖片 (備用)", name: "icon", widget: "image", required: false}
          
          # 🔴 新增：工作花絮 (拖曳可調整順序)
          - label: "工作花絮 (Behind The Scenes)"
            name: "behind_the_scenes"
            widget: "list"
            summary: '{{caption}}'
            fields:
              - {label: "照片", name: "image", widget: "image"}
              - {label: "描述 (僅供後台辨識用)", name: "caption", widget: "string", required: false}

      # --- 2. 作品頁 (Works) ---
      - label: "作品總覽 (Works)"
        name: "works"
        file: "content/works.md"
        fields:
          - {label: "頁面主標題", name: "title", widget: "string", default: "精選作品集"}
          - {label: "頁面副標題", name: "subtitle", widget: "text", default: "收錄歷年來的影像精華"}
          
          - label: "作品分類"
            name: "portfolio_categories"
            widget: "list"
            collapsed: true
            summary: '{{name}}'
            fields:
              - {label: "分類名稱", name: "name", widget: "string"}
              - label: "作品"
                name: "items"
                widget: "list"
                collapsed: true
                summary: '{{title}}'
                fields:
                  - {label: "作品名稱", name: "title", widget: "string"}
                  - {label: "客戶名稱", name: "client", widget: "string", required: false}
                  - {label: "影片連結 (YouTube)", name: "link", widget: "string"}
                  - {label: "封面圖片 (選填)", name: "image", widget: "image", required: false, hint: "若未上傳將自動抓取 YouTube 縮圖"}

      # --- 3. 團隊頁 (Team) ---
      - label: "團隊介紹 (Team)"
        name: "team"
        file: "content/team.md"
        fields:
          - {label: "頁面主標題", name: "title", widget: "string", default: "專業團隊"}
          - {label: "頁面副標", name: "subtitle", widget: "text"}
          - label: "Team / Member 視覺樣式"
            name: "style"
            widget: "object"
            required: false
            fields:
              - {label: "姓名字體", name: "name_font", widget: "select", options: [{label: "明體標題 Serif", value: "serif"}, {label: "黑體 Sans", value: "sans"}, {label: "義式 Display", value: "display"}], default: "serif", required: false}
              - {label: "姓名大小 rem", name: "name_size", widget: "number", value_type: "float", min: 1.6, max: 8, step: 0.1, default: 2.45, required: false}
              - {label: "職稱大小 rem", name: "role_size", widget: "number", value_type: "float", min: 0.6, max: 2, step: 0.05, default: 0.78, required: false}
              - {label: "內文大小 rem", name: "bio_size", widget: "number", value_type: "float", min: 0.75, max: 1.5, step: 0.05, default: 0.92, required: false}
              - {label: "卡片密度", name: "card_density", widget: "select", options: [{label: "標準", value: "normal"}, {label: "緊湊", value: "compact"}], default: "normal", required: false}
          - label: "成員列表"
            name: "members"
            widget: "list"
            summary: '{{name}} - {{role}}'
            fields:
              - {label: "姓名", name: "name", widget: "string"}
              - {label: "職稱", name: "role", widget: "string"}
              - {label: "頭像", name: "avatar", widget: "image"}
              - {label: "簡介 (短)", name: "bio", widget: "text"}
              - {label: "詳細介紹 (長 - 支援 Markdown)", name: "full_bio", widget: "markdown", required: false}
              - {label: "Instagram 連結", name: "ig_url", widget: "string", required: false}
              - {label: "作品集連結", name: "portfolio_url", widget: "string", required: false}

      # --- 4. 關於頁 ---
      - label: "關於我們 (About)"
        name: "about"
        file: "content/about.md"
        fields:
          - {label: "標題", name: "title", widget: "string"}
          - {label: "副標題", name: "subtitle", widget: "string"}
          - {label: "內文 (支援 Markdown)", name: "body", widget: "markdown"}

      # --- 5. 聯絡我們 (Contact) ---
      - label: "聯絡我們 (Contact)"
        name: "contact"
        file: "content/contact.md"
        fields:
          - {label: "標題", name: "title", widget: "string"}
          - {label: "副標題", name: "subtitle", widget: "string"}
          - {label: "地址", name: "address", widget: "string"}
          - {label: "Email", name: "email", widget: "string"}
          - {label: "電話", name: "phone", widget: "string"}
          # 🔴 請加上下面這一行欄位設定
          - {label: "Formspree ID", name: "formspree_id", widget: "string", required: false, hint: "請輸入 Formspree 表單結尾的英文字母 ID（例如: movbylbl）"}
