const { text, textarea, image, icon, checkbox, url, combobox, object, stringList, objectList, } = require("./sharedFields"); module.exports = { key: "history", title: "History Management", subtitle: "Manage the content for the history page", routeBase: "/admin/history", apiPath: "/api/history", previewPath: "/about/history", dataFile: "history", imageType: "history", tabs: [ { key: "highlight", label: "Highlight Bar", icon: "fas fa-star", schema: object("highlight", "Highlight bar", [ icon("icon", "Highlight icon"), text("text", "Message", { maxLength: 110 }), text("linkLabel", "Link label", { maxLength: 30 }), url("href", "Link URL", { maxLength: 255, helpText: "Use an anchor or website path only. Examples: #milestones, /about/history, /contact", }), ]), }, { key: "hero", label: "Hero", icon: "fas fa-image", schema: object("hero", "Hero", [ text("badge", "Eyebrow label", { maxLength: 40 }), text("title", "Headline", { maxLength: 90 }), textarea("description", "Supporting text", { maxLength: 220, rows: 4 }), ]), }, { key: "filters", label: "Filter Controls", icon: "fas fa-filter", schema: object("filters", "Filter controls", [ stringList("yearOptions", "Year options", { itemLabel: "Year option", maxLength: 30, sortable: true, helpText: "Reorder these options to change the order in the Year range dropdown.", }), stringList("categoryOptions", "Category options", { itemLabel: "Category option", maxLength: 40, sortable: true, }), ]), }, { key: "timeline", label: "Timeline", icon: "fas fa-clock-rotate-left", schema: object("timeline", "Timeline", [ objectList( "items", "Milestones", [ text("year", "Year", { maxLength: 30, }), combobox("yearRange", "Year range", { maxLength: 30, optionsPath: "filters.yearOptions", }), combobox("category", "Category", { maxLength: 40, optionsPath: "filters.categoryOptions", }), text("categoryLabel", "Category badge label", { maxLength: 30 }), text("title", "Milestone title", { maxLength: 90 }), textarea("description", "Description", { maxLength: 260, rows: 4, }), image("image", "Milestone image", { imageHint: "Recommended 436x190 px, 16:9 aspect ratio.", helpText: "Wide image used inside the milestone card.", }), text("imageAlt", "Image alt text", { maxLength: 120 }), objectList( "stats", "Stats", [ text("value", "Value", { maxLength: 24 }), text("label", "Label", { maxLength: 50 }), ], { itemLabel: "Stat", sortable: true, emptyText: "No stats yet.", }, ), checkbox("featured", "Featured milestone"), ], { itemLabel: "Milestone", sortable: true, itemTitleKey: "title", itemSubtitleKey: "year", emptyText: "No milestones yet.", }, ), ]), }, ], };