# Decap CMS config for EISL Lab (Vercel static + GitHub)
# Admin URL: https://YOUR-SITE.vercel.app/admin/
# Login: GitHub account with push access to Dejare/eisl-lab-website
# Auth flow: /api/auth.js (GitHub OAuth App) -> commit to main -> Vercel redeploys in ~1-2 min

backend:
  name: github
  repo: Dejare/eisl-lab-website
  branch: main
  base_url: https://www.ayobamiadedokun.com
  auth_endpoint: api/auth

# If you use a custom domain, change base_url + site_url below to that domain.
site_url: https://www.ayobamiadedokun.com
display_url: https://www.ayobamiadedokun.com
logo_url: https://ayobamiadedokun.com/images/supervisor_avatar.png

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

# Uncomment for local editing with `npx decap-server` + opening /admin/?local=true
# local_backend: true

collections:
  - name: "profile"
    label: "1 — Profile & About"
    files:
      - name: "profile"
        label: "Supervisor Profile"
        file: "content/profile.json"
        fields:
          - { label: "Full Name", name: "name", widget: "string" }
          - { label: "Rank / Title", name: "rank", widget: "string" }
          - { label: "Avatar", name: "avatar", widget: "image", required: false, hint: "Square photo. Uploads to /images/uploads" }
          - { label: "Bio", name: "bio", widget: "text" }
          - label: "Degrees"
            name: "degrees"
            widget: "list"
            summary: "{{fields.degree}} — {{fields.year}}"
            fields:
              - { label: "Degree", name: "degree", widget: "string" }
              - { label: "Institution", name: "institution", widget: "string" }
              - { label: "Year", name: "year", widget: "string" }
              - { label: "Thesis Title", name: "thesis", widget: "string", required: false }
              - { label: "Thesis Link", name: "thesisLink", widget: "string", required: false }
          - label: "Appointments"
            name: "appointments"
            widget: "list"
            summary: "{{appointment}}"
            field: { label: "Appointment line", name: "appointment", widget: "string" }
          - label: "Stats"
            name: "stats"
            widget: "object"
            fields:
              - { label: "PhDs Supervised", name: "phdSupervised", widget: "number", value_type: "int", default: 0 }
              - { label: "MS Supervised", name: "msSupervised", widget: "number", value_type: "int", default: 8 }
              - { label: "BS Projects", name: "bsProjects", widget: "number", value_type: "int", default: 36 }
              - { label: "Publications label", name: "publications", widget: "string", default: "20+" }
              - { label: "Citations label", name: "citations", widget: "string", default: "120+" }
              - { label: "H-Index label", name: "hIndex", widget: "string", default: "6" }
          - label: "Contacts"
            name: "contacts"
            widget: "object"
            fields:
              - { label: "Email", name: "email", widget: "string" }
              - { label: "Alternate Email", name: "alternateEmail", widget: "string", required: false }
              - { label: "Phone", name: "phone", widget: "string" }
              - { label: "Address", name: "address", widget: "text" }
          - label: "Research Links (badges)"
            name: "researchLinks"
            widget: "list"
            summary: "{{fields.name}}"
            fields:
              - { label: "Name", name: "name", widget: "string" }
              - { label: "URL", name: "url", widget: "string" }
              - label: "Icon"
                name: "icon"
                widget: "select"
                options: ["scholar", "scopus", "wos", "linkedin"]
                default: "scholar"

  - name: "lab"
    label: "2 — Lab & Research Areas"
    files:
      - name: "lab"
        label: "Lab Info"
        file: "content/lab.json"
        fields:
          - { label: "Lab Name", name: "name", widget: "string" }
          - { label: "Tagline", name: "tagline", widget: "string" }
          - { label: "Vision", name: "vision", widget: "text" }
          - label: "Research Areas"
            name: "researchAreas"
            widget: "list"
            summary: "{{fields.title}}"
            fields:
              - { label: "ID (no spaces)", name: "id", widget: "string", hint: "e.g. embedded-systems" }
              - { label: "Title", name: "title", widget: "string" }
              - { label: "Description", name: "description", widget: "text" }
              - label: "Icon"
                name: "icon"
                widget: "select"
                options: ["cpu", "battery-charging", "zap", "database"]
                default: "cpu"

  - name: "publications"
    label: "3 — Publications"
    files:
      - name: "publications"
        label: "All Publications (add/remove)"
        file: "content/publications.json"
        fields:
          - label: "Publications"
            name: "publications"
            widget: "list"
            summary: "{{fields.year}} — {{fields.title}}"
            fields:
              - { label: "ID", name: "id", widget: "string", hint: "Unique, e.g. pub-009" }
              - label: "Category"
                name: "category"
                widget: "select"
                options:
                  - { label: "Journal", value: "journal" }
                  - { label: "Conference", value: "conference" }
                  - { label: "Book / Patent", value: "book_patent" }
                default: "journal"
              - { label: "Year", name: "year", widget: "number", value_type: "int" }
              - { label: "Title", name: "title", widget: "string" }
              - { label: "Authors", name: "authors", widget: "text" }
              - { label: "Journal / Proceedings", name: "journal", widget: "string", required: false }
              - { label: "Volume", name: "volume", widget: "string", required: false }
              - { label: "Issue", name: "issue", widget: "string", required: false }
              - { label: "Pages", name: "pages", widget: "string", required: false }
              - { label: "DOI", name: "doi", widget: "string", required: false }
              - { label: "Link", name: "link", widget: "string", required: false }
              - label: "Tags"
                name: "tags"
                widget: "list"
                field: { label: "Tag", name: "tag", widget: "string" }

  - name: "supervision"
    label: "4 — Supervision"
    files:
      - name: "supervision"
        label: "PhD / MS / BS lists"
        file: "content/supervision.json"
        fields:
          - label: "PhD Supervision"
            name: "phd"
            widget: "list"
            summary: "{{fields.name}}"
            fields:
              - { label: "Name", name: "name", widget: "string" }
              - { label: "Thesis", name: "thesis", widget: "text" }
              - { label: "Year / Status", name: "year", widget: "string", hint: "e.g. 2025 or Active" }
              - { label: "Placement", name: "placement", widget: "string" }
          - label: "MS Supervision"
            name: "ms"
            widget: "list"
            summary: "{{fields.name}}"
            fields:
              - { label: "Name", name: "name", widget: "string" }
              - { label: "Thesis", name: "thesis", widget: "text" }
              - { label: "Year / Status", name: "year", widget: "string" }
          - label: "BS Projects"
            name: "bs"
            widget: "list"
            summary: "{{fields.name}}"
            fields:
              - { label: "Group Members", name: "name", widget: "string" }
              - { label: "Project Title", name: "thesis", widget: "text" }
              - { label: "Year", name: "year", widget: "string" }

  - name: "people"
    label: "5 — Alumni & Top Students"
    files:
      - name: "alumni"
        label: "Alumni + Recognitions"
        file: "content/alumni.json"
        fields:
          - label: "Alumni"
            name: "alumni"
            widget: "list"
            summary: "{{fields.name}} — {{fields.graduationYear}}"
            fields:
              - { label: "Name", name: "name", widget: "string" }
              - { label: "Role in Lab", name: "role", widget: "string" }
              - { label: "Graduation Year", name: "graduationYear", widget: "string" }
              - { label: "Destination", name: "destination", widget: "string" }
          - label: "Top Students"
            name: "topStudents"
            widget: "list"
            summary: "{{fields.name}}"
            fields:
              - { label: "Name", name: "name", widget: "string" }
              - { label: "Achievement", name: "achievement", widget: "text" }

  - name: "downloads"
    label: "6 — Downloads"
    files:
      - name: "downloads"
        label: "Files & Resources"
        file: "content/downloads.json"
        fields:
          - label: "Downloads"
            name: "downloads"
            widget: "list"
            summary: "{{fields.title}}"
            fields:
              - { label: "Title", name: "title", widget: "string" }
              - { label: "Description", name: "description", widget: "text" }
              - { label: "Category", name: "category", widget: "string" }
              - { label: "Size label", name: "size", widget: "string", hint: "e.g. 2.1 MB", required: false }
              - { label: "Release date label", name: "date", widget: "string", hint: "e.g. June 2026", required: false }
              - { label: "Upload file", name: "file", widget: "file", required: false, hint: "PDF/ZIP/source. If set, Download button links to it." }

  - name: "gallery"
    label: "7 — Photo Gallery"
    files:
      - name: "gallery"
        label: "Photos (add/remove)"
        file: "content/gallery.json"
        fields:
          - label: "Photos"
            name: "gallery"
            widget: "list"
            summary: "{{fields.title}}"
            fields:
              - { label: "Title", name: "title", widget: "string" }
              - { label: "Caption", name: "caption", widget: "text" }
              - { label: "Photo", name: "image", widget: "image", hint: "Upload or paste Unsplash URL" }
