root = Card([topBar, overviewRow, draftsSection, readershipSection, scheduleSection, commentsSection, followUp])
topBar = Card([headerInfo, quickActions], "clear", "row", "m", "center", "between")
headerInfo = CardHeader("Content Studio", "Plan, write, and publish")
quickActions = Buttons([newDraftBtn, scheduleBtn], "row")
newDraftBtn = Button("New draft", null, "primary")
scheduleBtn = Button("Schedule piece", null, "secondary")
overviewRow = Card([publishedSection, mostReadSection], "clear", "row", "l", "stretch")
publishedSection = Card([publishedHeader, publishedList], "sunk", "column", "m")
publishedHeader = CardHeader("Published this week", "5 pieces")
publishedList = ListBlock([pub1, pub2, pub3, pub4, pub5], "number")
pub1 = ListItem("Why Rust is eating software", "Tuesday · 2,410 reads", null, "View")
pub2 = ListItem("The quiet comeback of local-first software", "Wednesday · 3,872 reads", null, "View")
pub3 = ListItem("A beginner's guide to WebAssembly", "Thursday · 1,204 reads", null, "View")
pub4 = ListItem("Designing calm interfaces", "Friday · 1,933 reads", null, "View")
pub5 = ListItem("The state of open telemetry", "Saturday · 987 reads", null, "View")
mostReadSection = Card([mostHeader, mostTitle, mostBody, mostTags], "sunk", "column", "m")
mostHeader = CardHeader("Most-read this month", "June")
mostTitle = TextContent("**The quiet comeback of local-first software**", "large")
mostBody = TextContent("48,210 reads · 6m 12s average read time", "default")
mostTags = TagBlock(["Local-first", "Tools", "Featured"])
draftsSection = Card([draftsHeader, categoryTabs], "sunk", "column", "m")
draftsHeader = CardHeader("Drafts", "Narrow by category")
categoryTabs = Tabs([tabAll, tabNews, tabFeatures, tabOpinion])
tabAll = TabItem("all", "All", [allTable])
allTable = Table([allTitle, allCategory, allStatus])
allTitle = Col("Title", ["The rise of edge databases", "Local-first software, part 2", "A field guide to WebAssembly", "Interview: Maria Chen", "Designing calm interfaces", "The state of open telemetry"])
allCategory = Col("Category", ["News", "Features", "Features", "Opinion", "Features", "News"])
allStatus = Col("Status", ["In review", "Draft", "Scheduled", "In review", "Draft", "Scheduled"])
tabNews = TabItem("news", "News", [newsTable])
newsTable = Table([newsTitle, newsCategory, newsStatus])
newsTitle = Col("Title", ["The rise of edge databases", "The state of open telemetry"])
newsCategory = Col("Category", ["News", "News"])
newsStatus = Col("Status", ["In review", "Scheduled"])
tabFeatures = TabItem("features", "Features", [featuresTable])
featuresTable = Table([featuresTitle, featuresCategory, featuresStatus])
featuresTitle = Col("Title", ["Local-first software, part 2", "A field guide to WebAssembly", "Designing calm interfaces"])
featuresCategory = Col("Category", ["Features", "Features", "Features"])
featuresStatus = Col("Status", ["Draft", "Scheduled", "Draft"])
tabOpinion = TabItem("opinion", "Opinion", [opinionTable])
opinionTable = Table([opinionTitle, opinionCategory, opinionStatus])
opinionTitle = Col("Title", ["Interview: Maria Chen"])
opinionCategory = Col("Category", ["Opinion"])
opinionStatus = Col("Status", ["In review"])
readershipSection = Card([readershipHeader, readershipChart], "sunk", "column", "m")
readershipHeader = CardHeader("Readership", "Last 30 days")
readershipChart = AreaChart(["Week 1", "Week 2", "Week 3", "Week 4", "This week"], [viewsSeries, readersSeries], "natural", "Week", "Readers")
viewsSeries = Series("Views", [12000, 14500, 16900, 19300, 21400])
readersSeries = Series("Unique readers", [7100, 8400, 9300, 10800, 12100])
scheduleSection = Card([scheduleHeader, scheduleForm], "sunk", "column", "m")
scheduleHeader = CardHeader("Schedule a piece", "Pick a title and publish date")
scheduleForm = Form("schedule-piece", scheduleButtons, [scheduleTitleField, scheduleDateField])
scheduleTitleField = FormControl("Title", scheduleTitleInput, "Working title for the piece")
scheduleTitleInput = Input("title", "Untitled draft")
scheduleDateField = FormControl("Publish date", scheduleDatePicker)
scheduleDatePicker = DatePicker("publish_date", "single")
scheduleButtons = Buttons([scheduleSubmit, scheduleCancel], "row")
scheduleSubmit = Button("Schedule", null, "primary")
scheduleCancel = Button("Cancel", null, "tertiary")
commentsSection = Card([commentsHeader, commentsList], "sunk", "column", "m")
commentsHeader = CardHeader("Comments awaiting reply", "3 replies needed")
commentsList = ListBlock([comment1, comment2, comment3])
comment1 = ListItem("Alex Rivera", "On 'The quiet comeback of local-first software' · 5h ago", null, "Reply")
comment2 = ListItem("Priya Nair", "On 'Why Rust is eating software' · Yesterday", null, "Reply")
comment3 = ListItem("Sam Okafor", "On 'Designing calm interfaces' · 2 days ago", null, "Reply")
followUp = FollowUpBlock([follow1, follow2, follow3])
follow1 = FollowUpItem("Show me the editorial calendar")
follow2 = FollowUpItem("Which drafts are closest to publishing?")
follow3 = FollowUpItem("Summarize this week's comments")