Display an outline as a nested table: Difference between revisions
Display an outline as a nested table (view source)
Revision as of 04:35, 10 February 2022
, 2 years agoJ: lighter random colors
(J) |
m (J: lighter random colors) |
||
Line 682:
y (+//. c&*)`(~.@[)`]}^:_ c
}}
NB. avoid dark colors
pastel=: {{256#.192+?m$,:3#64}}
task=: {{
Line 692 ⟶ 695:
widths=. width tr NB. column widths
top=. I.2>dr
color=.<"1 hfd
r=.'{| class="wikitable" style="text-align: center;"',LF
for_d.~.dr do. NB. descend through the depths
Line 721 ⟶ 724:
}}</lang>
Generated output from <tt>task outline</tt> was:
{| class="wikitable" style="text-align: center;"
|-
| style="background: #
|-
| style="background: #
| style="background: #
| style="background: #
|-
| style="background: #
| style="background: #
| style="background: #
| style="background: #
| style="background: #
| style="background: #
| style="background: #
|-
| style="background: #
| style="background: #
| style="background: #
| style="background: #
| style="background: #
| style="background: #
| style="background: #
|}
=={{header|JavaScript}}==
|