feat: webapp/card delivery server example
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"cards": [
|
||||
{
|
||||
"id": "weather",
|
||||
"name": "天气",
|
||||
"priority": 2,
|
||||
"entry": "cards/weather/card.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
/* 卡片是 HTML 片段,Hearth 会把它塞进 .card 容器 */
|
||||
/* 卡片内容:天气示例 */
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
.w { display: flex; align-items: center; gap: 10px; font-family: sans-serif; }
|
||||
.w .ic { font-size: 28px; }
|
||||
.w .t { font-size: 20px; font-weight: 600; color: inherit; }
|
||||
.w .s { font-size: 12px; color: #8a8a90; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="w">
|
||||
<div class="ic">☀</div>
|
||||
<div>
|
||||
<div class="t">26°</div>
|
||||
<div class="s">晴</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user