Codegen: BinOp::Div now emits Math.trunc(l / r) - Clock displays 0:1:30 instead of 0.016:1.5:30 - Affects both emit_expr and predicate_to_js Lexer: removed duplicate 'in' keyword mapping - InKw at line 312 is canonical, removed old In at line 338 Examples: added project-tracker.ds (each loops + cards)
72 lines
1.8 KiB
Text
72 lines
1.8 KiB
Text
-- DreamStack Full App Demo
|
|
-- Combines: each loops, variant props, container variants, reactive state
|
|
|
|
let tasks = ["Design landing page", "Build API endpoints", "Write unit tests", "Deploy to staging", "Code review PR #42"]
|
|
let done = ["Set up CI/CD", "Create database schema", "Auth integration"]
|
|
let total = 8
|
|
let completed = 3
|
|
let search = ""
|
|
let tab = "active"
|
|
|
|
view main = column [
|
|
|
|
-- Header
|
|
row [
|
|
text "🏗️ Project Tracker" { variant: "title" }
|
|
input { bind: search, placeholder: "Search tasks..." }
|
|
]
|
|
text "Track your sprint progress" { variant: "subtitle" }
|
|
|
|
-- Progress stats
|
|
row [
|
|
column [
|
|
text "Active" { variant: "subtitle" }
|
|
text "5" { variant: "title" }
|
|
text "In progress" { variant: "warning" }
|
|
] { variant: "card" }
|
|
|
|
column [
|
|
text "Completed" { variant: "subtitle" }
|
|
text "3" { variant: "title" }
|
|
text "✓ Done" { variant: "success" }
|
|
] { variant: "card" }
|
|
|
|
column [
|
|
text "Total" { variant: "subtitle" }
|
|
text "8" { variant: "title" }
|
|
text "37.5% complete" { variant: "info" }
|
|
] { variant: "card" }
|
|
]
|
|
|
|
-- Active tasks
|
|
column [
|
|
text "📋 Active Tasks" { variant: "title" }
|
|
|
|
each task in tasks ->
|
|
row [
|
|
text "○"
|
|
text task
|
|
text "TODO" { variant: "warning" }
|
|
]
|
|
] { variant: "card" }
|
|
|
|
-- Completed tasks
|
|
column [
|
|
text "✅ Completed" { variant: "title" }
|
|
|
|
each item in done ->
|
|
row [
|
|
text "✓"
|
|
text item
|
|
text "DONE" { variant: "success" }
|
|
]
|
|
] { variant: "card" }
|
|
|
|
-- Actions
|
|
row [
|
|
button "Add Task" { variant: "primary" }
|
|
button "Export" { variant: "secondary" }
|
|
button "Archive" { variant: "ghost" }
|
|
button "Delete All" { variant: "destructive" }
|
|
]
|
|
]
|