Add cydweb HTML UI preview for catalog cards.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
40
firmware/cyd/media/preview.html
Normal file
40
firmware/cyd/media/preview.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Button</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:4px;text-align:center;font-size:26px;font-weight:700}
|
||||
.pin{position:absolute;left:0;right:0;top:40px;text-align:center}
|
||||
.cnt{position:absolute;left:0;right:0;top:68px;text-align:center;font-size:48px;font-weight:800;color:#4FC3F7}
|
||||
.hint{position:absolute;left:0;right:0;top:124px;text-align:center}
|
||||
.st{position:absolute;left:0;right:0;top:144px;text-align:center;font-size:16px;font-weight:700}
|
||||
.raw{position:absolute;left:0;right:0;top:168px;text-align:center;font-size:11px}
|
||||
.act{position:absolute;left:24px;right:24px;bottom:12px;height:44px}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="bezel"><div class="screen" id="s">
|
||||
|
||||
<div class="t">Button</div>
|
||||
<div class="pin muted">OUT->GPIO22 VCC 3.3V</div>
|
||||
<div class="cnt">12</div>
|
||||
<div class="hint muted">count</div>
|
||||
<div class="st">IDLE</div>
|
||||
<div class="raw muted">OUT LOW act=HIGH</div>
|
||||
<button class="btn act" type="button">Reset</button>
|
||||
|
||||
</div></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,5 +3,14 @@
|
||||
"name": "CYD Button",
|
||||
"summary": "3-pin button module on GPIO22: each press increments count",
|
||||
"description": "SoftSPI touch + LVGL. VCC/GND/OUT->GPIO22. Auto polarity. Press +1, touch Reset clears.",
|
||||
"tags": ["button", "gpio22", "touch", "lvgl", "counter"]
|
||||
"tags": [
|
||||
"button",
|
||||
"gpio22",
|
||||
"touch",
|
||||
"lvgl",
|
||||
"counter"
|
||||
],
|
||||
"media": {
|
||||
"preview": "media/preview.html"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user