Add cydweb HTML UI preview for catalog cards.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
34
firmware/cyd/media/preview.html
Normal file
34
firmware/cyd/media/preview.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Active Buzzer</title>
|
||||
<style>
|
||||
|
||||
*{box-sizing:border-box;margin:0;padding:0}
|
||||
html,body{width:320px;height:240px;overflow:hidden;background:#000;margin:0}
|
||||
.bezel{width:320px;height:240px;background:#1a1408}
|
||||
.screen{width:320px;height:240px;background:#0A1016;color:#EAF0F6;font:12px/1.2 system-ui,sans-serif;position:relative;overflow:hidden}
|
||||
.muted{color:#7A8B9C}.ok{color:#3DDC97}.bad{color:#E85D4C}.acc{color:#4FC3F7}.amber{color:#FFB74D}
|
||||
.btn{border:0;border-radius:8px;background:#243140;color:#EAF0F6;font-weight:600}
|
||||
.btn.acc{background:#1A4A6E}.btn.on{background:#1B5E4A}.btn.warn{background:#6B3A1E}
|
||||
|
||||
|
||||
.t{position:absolute;left:0;right:0;top:16px;text-align:center;font-size:26px;font-weight:700}
|
||||
.pin{position:absolute;left:0;right:0;top:56px;text-align:center}
|
||||
.st{position:absolute;left:0;right:0;top:88px;text-align:center;font-size:36px;font-weight:800}
|
||||
.act{position:absolute;left:24px;right:24px;bottom:24px;height:64px;font-size:18px}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="bezel"><div class="screen" id="s">
|
||||
|
||||
<div class="t">Active Buzzer</div>
|
||||
<div class="pin muted">Signal -> GPIO22</div>
|
||||
<div class="st bad">OFF</div>
|
||||
<button class="btn act" type="button">Turn ON</button>
|
||||
|
||||
</div></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,5 +3,14 @@
|
||||
"name": "CYD Active Buzzer",
|
||||
"summary": "Active buzzer on GPIO22: tap on / tap off, default off",
|
||||
"description": "SoftSPI touch + LVGL. Signal->GPIO22 digital HIGH=on. Default off.",
|
||||
"tags": ["buzzer", "active", "gpio22", "touch", "lvgl"]
|
||||
"tags": [
|
||||
"buzzer",
|
||||
"active",
|
||||
"gpio22",
|
||||
"touch",
|
||||
"lvgl"
|
||||
],
|
||||
"media": {
|
||||
"preview": "media/preview.html"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user