Something went wrong. Try again.
Simple demo of BackflipHTML dual backend / frontend templates
Something went wrong. Try again.
1.6 kB · 30 lines
PHP
at main
123456789101112131415161718192021222324252627282930<?php/* generated by BackflipHTML — do not edit */
$styled_meter = ['type' => 'root', 'customElement' => true, 'scripts' => [['url' => '/static/styled-meter.js', 'kind' => 'entry'], ['url' => '/static/generated/styled-meter.js', 'kind' => 'dependency']], 'definitionAttrNodes' => [ ['type' => 'attr-bind', 'tagOpen' => '', 'attrsOnly' => true, 'parts' => [ ['type' => 'dynamic', 'name' => 'class', 'expr' => ['fn' => function($level) { return (backflip_isTruthy(backflip_jsLessThan(80, $level)) ? 'high' : ''); }, 'vars' => ['level']], 'isBoolean' => false] ]]], 'nodes' => [ ['type' => 'raw', 'raw' => ' '], ['type' => 'raw', 'raw' => '<h3>'], ['type' => 'print', 'data' => ['fn' => function($valname) { return $valname; }, 'vars' => ['valname']]], ['type' => 'raw', 'raw' => '</h3>'], ['type' => 'raw', 'raw' => ' <meter'], ['type' => 'attr-bind', 'tagOpen' => '', 'attrsOnly' => true, 'parts' => [ ['type' => 'static', 'raw' => ' low="0" high="80" max="100"'], ['type' => 'dynamic', 'name' => 'value', 'expr' => ['fn' => function($level) { return $level; }, 'vars' => ['level']], 'isBoolean' => false], ['type' => 'static', 'raw' => ' data-bfid="bf5kl4u91l"'] ]], ['type' => 'raw', 'raw' => '></meter> '], ['type' => 'comment', 'text' => 'bfid:bf87sc2vxu'], ['type' => 'print', 'data' => ['fn' => function($level) { return $level; }, 'vars' => ['level']]], ['type' => 'comment', 'text' => 'bfid:bfcf29x7a6'], ['type' => 'raw', 'raw' => ' GW']]];
return compact('styled_meter');