Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e57e908d4 | |||
| 303c823eb0 | |||
| f787ff25e0 |
@@ -21,6 +21,7 @@
|
|||||||
| [main.endor](main.endor) | The earlier function-entry form, producing the same frame as page.endor. |
|
| [main.endor](main.endor) | The earlier function-entry form, producing the same frame as page.endor. |
|
||||||
| [hello.endor](hello.endor) | Richer function-entry example covering a helper, Row/Column and Spacer. |
|
| [hello.endor](hello.endor) | Richer function-entry example covering a helper, Row/Column and Spacer. |
|
||||||
| [fonts.endor](fonts.endor) | Mixed Chinese/Latin text and proportional widths, with rectangles following narrow and wide letters. |
|
| [fonts.endor](fonts.endor) | Mixed Chinese/Latin text and proportional widths, with rectangles following narrow and wide letters. |
|
||||||
|
| [workspace.endor](workspace.endor) | Larger static workspace dashboard with reusable functions, metrics, progress bars and an activity column. Paste the complete file into Console in Script mode; all displayed data is illustrative. |
|
||||||
|
|
||||||
Submit a file as the UTF-8 body of a namespace PUT request. No namespace,
|
Submit a file as the UTF-8 body of a namespace PUT request. No namespace,
|
||||||
scene, render block or imports belong in the source.
|
scene, render block or imports belong in the source.
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
// Paste the complete file into Console in Script mode, then Run.
|
||||||
|
// All numbers, progress values and activity entries below are demo data.
|
||||||
|
|
||||||
|
function metric(label: Text, value: Text, note: Text, color: Text): View {
|
||||||
|
return ui.column(0, 6,
|
||||||
|
ui.text(label, 1, "#637082"),
|
||||||
|
ui.text(value, 2, "#243047"),
|
||||||
|
ui.text(note, 1, "#637082"),
|
||||||
|
ui.rect(160, 4, 2, color)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function project(name: Text, state: Text, detail: Text, filled: Number, remaining: Number, color: Text): View {
|
||||||
|
let caption = ui.row(0, 12,
|
||||||
|
ui.text(name, 1, "#243047"),
|
||||||
|
ui.text(state, 1, color)
|
||||||
|
)
|
||||||
|
let progress = ui.row(0, 0,
|
||||||
|
ui.rect(filled, 6, 3, color),
|
||||||
|
ui.rect(remaining, 6, 3, "#E5EAF2")
|
||||||
|
)
|
||||||
|
return ui.column(0, 6,
|
||||||
|
caption,
|
||||||
|
ui.text(detail, 1, "#637082"),
|
||||||
|
progress
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function activity(time: Text, title: Text, detail: Text, color: Text): View {
|
||||||
|
let dot = ui.column(0, 0, ui.spacer(7), ui.rect(6, 6, 3, color))
|
||||||
|
let stamp = ui.row(0, 8, dot, ui.text(time, 1, "#8490A0"))
|
||||||
|
return ui.column(0, 4,
|
||||||
|
stamp,
|
||||||
|
ui.text(title, 1, "#243047"),
|
||||||
|
ui.text(detail, 1, "#637082")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
let heading = ui.column(0, 6,
|
||||||
|
ui.text("ENDOR STUDIO / WORKSPACE", 1, "#5263D6"),
|
||||||
|
ui.text("项目工作台", 2, "#243047"),
|
||||||
|
ui.text("把想法组织成对象,把对象组合成界面。", 1, "#637082")
|
||||||
|
)
|
||||||
|
|
||||||
|
let statistics = ui.row(0, 20,
|
||||||
|
metric("活跃任务", "24", "本周新增 6 项", "#6574E8"),
|
||||||
|
metric("已完成", "18", "持续推进中", "#299C82"),
|
||||||
|
metric("页面草稿", "08", "等待下一次灵感", "#D9A34A")
|
||||||
|
)
|
||||||
|
|
||||||
|
let projects = ui.column(0, 14,
|
||||||
|
ui.text("项目进度", 1, "#243047"),
|
||||||
|
project("Aster", "进行中", "语言解析 / 编译 / 执行", 240, 60, "#6574E8"),
|
||||||
|
project("Tessera", "构建中", "桌面界面 / 布局 / 开发工具", 186, 114, "#299C82"),
|
||||||
|
project("设计文档", "草稿", "Block / Page / 对象模型", 108, 192, "#D9A34A")
|
||||||
|
)
|
||||||
|
|
||||||
|
let timeline = ui.column(0, 14,
|
||||||
|
ui.text("最近活动", 1, "#243047"),
|
||||||
|
activity("10:24", "更新字体", "中英文混排预览", "#6574E8"),
|
||||||
|
activity("09:48", "组织界面", "用函数组合不同区块", "#299C82"),
|
||||||
|
activity("09:12", "记录想法", "准备下一版页面设计", "#D9A34A")
|
||||||
|
)
|
||||||
|
|
||||||
|
let body = ui.row(0, 20, projects, timeline)
|
||||||
|
|
||||||
|
let note = ui.row(0, 12,
|
||||||
|
ui.rect(4, 46, 2, "#6574E8"),
|
||||||
|
ui.column(0, 6,
|
||||||
|
ui.text("下一步:让对象参与交互", 1, "#243047"),
|
||||||
|
ui.text("当前展示为静态示例,进度条和活动记录均为演示数据。", 1, "#637082")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
let page = ui.page()
|
||||||
|
page.render(ui.column(24, 20,
|
||||||
|
heading,
|
||||||
|
statistics,
|
||||||
|
ui.rect(520, 1, 0, "#DFE5EE"),
|
||||||
|
body,
|
||||||
|
note,
|
||||||
|
ui.text("DEMO DATA / 函数组合 / 中文字体 / 嵌套布局", 1, "#8490A0")
|
||||||
|
))
|
||||||
Reference in New Issue
Block a user