Skip to content

Commit

Permalink
try tech page
Browse files Browse the repository at this point in the history
  • Loading branch information
b1conrad committed Jan 14, 2025
1 parent 4d80cb1 commit 238398f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions krl/io.picolabs.plan.children.krl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ruleset io.picolabs.plan.children {
name "Direct Children"
use module io.picolabs.plan.apps alias app
use module io.picolabs.wrangler alias wrangler
shares children
shares children, tech
}
global {
uiRID = "io.picolabs.pico-engine-ui"
Expand Down Expand Up @@ -35,23 +35,31 @@ a#docs { float:right; text-decoration:none; margin:0.5em; }
}
children = function(_headers){
direct_children = wrangler:children()
tech_url = app:query_url(meta:rid,"tech")
app:html_page("manage Direct Children", styles,
<<
<a id="tech" href="#" title="Technical Details">⚙️</a>
<a id="tech" href="#{tech_url}" title="Technical Details">⚙️</a>
<a id="docs" href="#" title="How to move/resize">ℹ️</a>
<h1>Manage Direct Children</h1>
#{direct_children.map(function(c){
the_box = wrangler:picoQuery(c{"eci"},uiRID,"just_box")
one_pico(the_box)
}).join("")}
<!--
>>, _headers)
}
tech = function(_headers){
direct_children = wrangler:children()
app:html_page("manage Direct Children", "",
<<
<h1>Manage Direct Children</h1>
<h2>Technical</h2>
<dl>
#{direct_children.map(function(c){
the_box = wrangler:picoQuery(c{"eci"},uiRID,"just_box")
<<<dt>#{c{"name"}}</dt><dd><pre>#{the_box.encode()}</pre></dd>
>>
}).join("")}</dl>
<!--
TODO add button to create an additional child pico
-->
>>, _headers)
Expand Down

1 comment on commit 238398f

@b1conrad
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying a rudimentary tech page.

Please sign in to comment.