[% # splash/menu: build menu as a sequence of buttons
# ARGS:
# buttons = [
# { link => 'page1.html', text => 'First Page' },
# { link => 'page2.html', text => 'Second Page' },
# ...
# ],
# select # item to select in range 1..n (0: none)
-%]
<!-- tt2.splash.menu -->
[% WRAPPER html/table + html/row align=0 col=0;
FOREACH button = buttons;
WRAPPER html/cell width=0 align=0 col=0;
style = (select == loop.count or select == button.text)
? splash.style.select : splash.style.default;
WRAPPER splash/button
width = width ? '100%' : 0;
INCLUDE splash/text
content = button.text
link = button.link;
END;
END;
END;
END
%]
<!-- /tt2.splash.menu -->