root = Card([header, topActions, categoryFilter, draftsSection, publishedSection, mostReadSection, readershipSection, scheduleSection, commentsSection], "card", "column", "l")
header = CardHeader("Editor's Content Studio", "Drafts, publishing, and audience")
topActions = Buttons([newDraftBtn])
newDraftBtn = Button("Start new draft", null, "primary")
categoryFilter = Card([categoryTitle, categoryRadio], "sunk", "column", "s")
categoryTitle = Heading("Filter by category", "h4")
categoryRadio = RadioGroup("category", [catAll, catNews, catFeatures, catOpinion, catCulture], "all")
catAll = RadioItem("All categories", "Show every section", "all")
catNews = RadioItem("News", "Breaking and local reporting", "news")
catFeatures = RadioItem("Features", "Long-form storytelling", "features")
catOpinion = RadioItem("Opinion", "Columns and editorials", "opinion")
catCulture = RadioItem("Culture", "Arts, music, and film", "culture")
draftsSection = Card([draftsHeading, draftsTable], "sunk", "column", "s")
draftsHeading = Heading("Drafts", "h3")
draftsTable = Table([draftTitleCol, draftCategoryCol, draftStatusCol])
draftTitleCol = Col("Title", ["The Coming Heat Wave", "Inside the City's Budget", "A New Park for the East Side", "Meet the Makers: Ceramics"])
draftCategoryCol = Col("Category", ["News", "News", "Features", "Culture"])
draftStatusCol = Col("Status", ["In progress", "Ready for edit", "In review", "Scheduled"])
publishedSection = Card([publishedHeading, publishedTable], "sunk", "column", "s")
publishedHeading = Heading("Published this week", "h3")
publishedTable = Table([pubTitleCol, pubDateCol, pubViewsCol])
pubTitleCol = Col("Article", ["The Future of Local News", "Why Public Transit Needs More Night Routes", "A Guide to Summer Reading", "Inside the City's Budget"])
pubDateCol = Col("Published", ["Jun 2", "Jun 1", "May 31", "May 30"])
pubViewsCol = Col("Views", [48200, 23100, 18900, 15750])
mostReadSection = Card([mostHeading, mostList], "sunk", "column", "s")
mostHeading = Heading("Most-read this month", "h3")
mostList = ListBlock([mostItem, mostSecond, mostThird], "number")
mostItem = ListItem("The Future of Local News", "48,200 reads · Published Jun 2")
mostSecond = ListItem("Why Public Transit Needs More Night Routes", "23,100 reads · Published Jun 1")
mostThird = ListItem("A Guide to Summer Reading", "18,900 reads · Published May 31")
readershipSection = Card([readershipHeading, readershipChart], "sunk", "column", "s")
readershipHeading = Heading("Readership — last 30 days", "h3")
readershipChart = AreaChart(readershipLabels, [readershipSeries], "natural", "Day", "Readers")
readershipLabels = ["May 5", "May 6", "May 7", "May 8", "May 9", "May 10", "May 11", "May 12", "May 13", "May 14", "May 15", "May 16", "May 17", "May 18", "May 19", "May 20", "May 21", "May 22", "May 23", "May 24", "May 25", "May 26", "May 27", "May 28", "May 29", "May 30", "May 31", "Jun 1", "Jun 2", "Jun 3"]
readershipSeries = Series("Readers", [8200, 7900, 8400, 9100, 8700, 9600, 10200, 9800, 9400, 10100, 10800, 11200, 10500, 9900, 10400, 11000, 11700, 12300, 11900, 12600, 13200, 12800, 13500, 14100, 13800, 14500, 15200, 16800, 17400, 18200])
scheduleSection = Card([scheduleHeading, scheduleForm], "sunk", "column", "s")
scheduleHeading = Heading("Schedule a piece", "h3")
scheduleForm = Form("schedule-piece", scheduleButtons, [scheduleTitleField, scheduleDateField])
scheduleTitleField = FormControl("Title", scheduleTitleInput)
scheduleTitleInput = Input("title", "Working title")
scheduleDateField = FormControl("Publish date", scheduleDatePicker)
scheduleDatePicker = DatePicker("publish_date", "single")
scheduleButtons = Buttons([scheduleSubmitBtn])
scheduleSubmitBtn = Button("Schedule piece", null, "primary")
commentsSection = Card([commentsHeading, commentsList], "sunk", "column", "s")
commentsHeading = Heading("Comments awaiting reply", "h3")
commentsList = ListBlock([commentOne, commentTwo, commentThree])
commentOne = ListItem("Priya Sharma", "“Great piece — do you have the source for the transit data?”", null, "Reply")
commentTwo = ListItem("Marcus Lee", "“Would love a follow-up on how this affects small businesses.”", null, "Reply")
commentThree = ListItem("Elena Rodriguez", "“The interactive chart is fantastic. More of this please!”", null, "Reply")