example coded by GPT 5.5 with Codex

This commit is contained in:
2026-05-04 21:15:57 +02:00
parent a9107816c1
commit dd8c76f57d
4 changed files with 1185 additions and 44 deletions
+99 -42
View File
@@ -8,51 +8,108 @@ SPDX-License-Identifier: Apache-2.0
<html>
<head>
<title>new app</title>
<style type="text/css">
body {
width: 100%;
height: 100%;
background-color: #202020;
}
div {
position: absolute;
height: 100%;
width: 100%;
display: table;
}
h1 {
display: table-cell;
vertical-align: middle;
text-align: center;
color: #FFFFFF;
}
</style>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>webOS TV Reference Lab</title>
<link rel="stylesheet" href="styles.css">
</head>
<script src="webOSTVjs-1.2.13/webOSTV.js" charset="utf-8"></script>
<script src="webOSTVjs-1.2.13/webOSTV-dev.js" charset="utf-8"></script>
<script type="text/javascript">
//sample code for calling LS2 API
webOS.service.request("luna://com.palm.systemservice", {
method: "clock/getTime",
parameters: {},
onSuccess: function (args) {
console.log("UTC:", args.utc);
},
onFailure: function (args) {
console.log("Failed to getTime");
}
});
</script>
<body class="theme-aurora">
<main class="app-shell">
<header class="topbar">
<section class="brand-block">
<p class="eyebrow">webOS TV</p>
<h1>Reference Lab</h1>
</section>
<body>
<div>
<h1>Hello, World!</h1>
</div>
<section class="status-strip" aria-label="Runtime status">
<div class="status-pill">
<span>App</span>
<strong id="appTitle">Loading</strong>
</div>
<div class="status-pill">
<span>Clock</span>
<strong id="clockValue">--:--</strong>
</div>
<div class="status-pill">
<span>Network</span>
<strong id="networkValue">Checking</strong>
</div>
<div class="status-pill">
<span>Platform</span>
<strong id="platformValue">Detecting</strong>
</div>
</section>
</header>
<section class="stage-row">
<article class="visual-stage" aria-label="Motion canvas">
<canvas id="motionCanvas" width="960" height="420"></canvas>
<div class="stage-overlay">
<p id="sceneLabel">Aurora Signal</p>
<strong id="keyValue">Ready</strong>
</div>
</article>
<aside class="launch-panel">
<p class="panel-label">Launch Params</p>
<pre id="launchParams">{}</pre>
</aside>
</section>
<section class="workbench">
<nav class="feature-grid" id="featureGrid" aria-label="Examples">
<button class="feature-card accent-cyan is-focused" type="button" data-action="clock" data-focusable>
<span class="card-icon">LS2</span>
<strong>System Clock</strong>
<small>luna://com.palm.systemservice</small>
</button>
<button class="feature-card accent-green" type="button" data-action="device" data-focusable>
<span class="card-icon">TV</span>
<strong>Device Info</strong>
<small>webOS.deviceInfo</small>
</button>
<button class="feature-card accent-yellow" type="button" data-action="network" data-focusable>
<span class="card-icon">NET</span>
<strong>Connection</strong>
<small>webOSDev.connection</small>
</button>
<button class="feature-card accent-red" type="button" data-action="launch" data-focusable>
<span class="card-icon">APP</span>
<strong>Launch Browser</strong>
<small>webOSDev.launch</small>
</button>
<button class="feature-card accent-purple" type="button" data-action="storage" data-focusable>
<span class="card-icon">DB</span>
<strong>Local State</strong>
<small>localStorage</small>
</button>
<button class="feature-card accent-blue" type="button" data-action="motion" data-focusable>
<span class="card-icon">FX</span>
<strong>Canvas Scene</strong>
<small>requestAnimationFrame</small>
</button>
</nav>
<aside class="detail-panel">
<div class="detail-head">
<p class="panel-label" id="detailLabel">Selected Example</p>
<strong id="detailTitle">System Clock</strong>
</div>
<pre class="json-view" id="detailJson">{}</pre>
<div class="event-log" id="eventLog" aria-live="polite"></div>
</aside>
</section>
</main>
<script src="webOSTVjs-1.2.13/webOSTV.js" charset="utf-8"></script>
<script src="webOSTVjs-1.2.13/webOSTV-dev.js" charset="utf-8"></script>
<script src="app.js" charset="utf-8"></script>
</body>
</html>