|
| 1 | +Compiled 1000 times in 4.271 s | 4.271 ms/compile | 21.2 KB code (7 partials) |
| 2 | +Executed 1000 times in 2.993 s | 2.993 ms/render | 139.9 KB output |
| 3 | +<?php |
| 4 | + |
| 5 | +use DevTheorem\Handlebars\Runtime as LR; |
| 6 | +return function (mixed $in = null, array $options = []) { |
| 7 | + $cx = LR::createContext($in, $options, []); |
| 8 | + $cx->frame['root'] = &$cx->data['root']; |
| 9 | + $in = &$cx->data['root']; |
| 10 | + return '<!DOCTYPE html> |
| 11 | +<html lang="'.LR::encq(LR::dv($in['lang'] ?? null, $in)).'"> |
| 12 | +<head> |
| 13 | + <meta charset="UTF-8"> |
| 14 | + <title>'.(LR::ifvar($_t0 = LR::dv($in['pageTitle'] ?? null, $in)) ? LR::encq($_t0) : LR::encq(LR::dv($in['siteName'] ?? null, $in)).' — Default Title').'</title> |
| 15 | +'.LR::hbbch($cx, 'each', [$in['stylesheets'] ?? null], [], [], $in, function($cx, $in) {return ' <link rel="stylesheet" href="'.LR::encq(LR::dv($in['url'] ?? null, $in)).'" '.(LR::ifvar($_t1 = LR::dv($in['media'] ?? null, $in)) ? 'media="'.LR::encq($_t1).'"' : '').'> |
| 16 | +';}, null).'</head> |
| 17 | +<body class="'.LR::encq(LR::dv($in['bodyClass'] ?? null, $in)).' '.(LR::ifvar(LR::dv($in['user']['isAdmin'] ?? null, $in)) ? 'is-admin' : '').' '.(LR::ifvar(LR::dv($in['user']['verified'] ?? null, $in)) ? '' : 'unverified').'"> |
| 18 | +
|
| 19 | +'.'<header id="site-header" '.(LR::ifvar(LR::dv($in['sticky'] ?? null, $in)) ? 'data-sticky="true"' : '').'> |
| 20 | + <nav> |
| 21 | + <a class="logo" href="'.LR::encq(LR::dv($in['rootUrl'] ?? null, $in)).'"> |
| 22 | + '.LR::raw(LR::dv($in['logoHtml'] ?? null, $in)).' |
| 23 | + <span>'.LR::encq(LR::dv($in['siteName'] ?? null, $in)).'</span> |
| 24 | + </a> |
| 25 | +
|
| 26 | + <ul class="nav-links"> |
| 27 | +'.LR::hbbch($cx, 'each', [$in['navItems'] ?? null], [], [], $in, function($cx, $in) {return LR::p($cx, 'nav-item', [[$in],[]], 0, ' ');}, null).' </ul> |
| 28 | +
|
| 29 | +'.(LR::ifvar(LR::dv($in['user'] ?? null, $in)) ? ' <div class="user-menu"> |
| 30 | + <img src="'.LR::encq(LR::dv($in['user']['avatar'] ?? null)).'" alt="'.LR::encq(LR::dv($in['user']['name'] ?? null)).'" width="32" height="32"> |
| 31 | + <span>'.LR::encq(LR::dv($in['user']['name'] ?? null)).'</span> |
| 32 | + <ul class="user-dropdown"> |
| 33 | + <li><a href="/profile/'.LR::encq(LR::dv($in['user']['id'] ?? null)).'">'.LR::encq(LR::hbch($cx, 't', ['nav.profile'], [], $in)).'</a></li> |
| 34 | + <li><a href="/settings">'.LR::encq(LR::hbch($cx, 't', ['nav.settings'], [], $in)).'</a></li> |
| 35 | + '.(LR::ifvar(LR::dv($in['user']['isAdmin'] ?? null, $in)) ? '<li><a href="/admin">'.LR::encq(LR::hbch($cx, 't', ['nav.admin'], [], $in)).'</a></li>' : '').' |
| 36 | + <li class="divider"></li> |
| 37 | + <li><a href="/logout">'.LR::encq(LR::hbch($cx, 't', ['nav.logout'], [], $in)).'</a></li> |
| 38 | + </ul> |
| 39 | + </div> |
| 40 | +' : ' <a class="btn btn-primary" href="/login">'.LR::encq(LR::hbch($cx, 't', ['nav.login'], [], $in)).'</a> |
| 41 | +').' </nav> |
| 42 | +</header> |
| 43 | +
|
| 44 | +'.LR::hbbch($cx, 'each', [$in['alerts'] ?? null], [], [], $in, function($cx, $in) {return LR::p($cx, 'alert', [[$in],[]], 0, ' ');}, null).' |
| 45 | +'.'<main id="main-content"> |
| 46 | + <div class="container'.(LR::ifvar(LR::dv($in['fluid'] ?? null, $in)) ? '-fluid' : '').'"> |
| 47 | +
|
| 48 | +'.LR::p($cx, 'breadcrumbs', [[$in],[]], 0, ' ').' |
| 49 | +'.LR::p($cx, 'page-header', [[$in],[]], 0, ' ').' |
| 50 | +'.(LR::ifvar(LR::dv($in['items'] ?? null, $in)) ? ' <div class="table-responsive"> |
| 51 | + <table class="table table-striped'.(LR::ifvar(LR::dv($in['hoverable'] ?? null, $in)) ? ' table-hover' : '').(LR::ifvar(LR::dv($in['bordered'] ?? null, $in)) ? ' table-bordered' : '').'"> |
| 52 | + <thead> |
| 53 | + <tr> |
| 54 | +'.LR::hbbch($cx, 'each', [$in['columns'] ?? null], [], [], $in, function($cx, $in) {$sc=count($cx->depths);return ' <th '.(LR::ifvar($_t2 = LR::dv($in['width'] ?? null, $in)) ? 'style="width:'.LR::encq($_t2).'"' : '').' class="'.(LR::ifvar(LR::dv($in['sortable'] ?? null, $in)) ? 'sortable' : '').(LR::ifvar(LR::dv(LR::hbch($cx, 'eq', [$in['currentSort']['key'] ?? null,$in['key'] ?? null], [], $in), $in)) ? ' sort-'.LR::encq(LR::dv($in['currentSort']['dir'] ?? null)) : '').'"> |
| 55 | +'.(LR::ifvar(LR::dv($in['sortable'] ?? null, $in)) ? ' <a href="'.LR::encq(LR::dv($cx->depths[$sc-1]['sortBaseUrl'] ?? null)).'?sort='.LR::encq(LR::dv($in['key'] ?? null, $in)).'&dir='.(LR::ifvar(LR::dv(LR::hbch($cx, 'and', [LR::hbch($cx, 'eq', [$cx->depths[$sc-1]['currentSort']['key'] ?? null,$in['key'] ?? null], [], $in),LR::hbch($cx, 'eq', [$cx->depths[$sc-1]['currentSort']['dir'] ?? null,'asc'], [], $in)], [], $in), $in)) ? 'desc' : 'asc').'"> |
| 56 | + '.LR::encq(LR::dv($in['label'] ?? null, $in)).' |
| 57 | + </a> |
| 58 | +' : ' '.LR::encq(LR::dv($in['label'] ?? null, $in)).' |
| 59 | +').' </th> |
| 60 | +';}, null).' '.(LR::ifvar(LR::dv($in['showActions'] ?? null, $in)) ? '<th class="actions-col">'.LR::encq(LR::hbch($cx, 't', ['table.actions'], [], $in)).'</th>' : '').' |
| 61 | + </tr> |
| 62 | + </thead> |
| 63 | + <tbody> |
| 64 | +'.LR::hbbch($cx, 'each', [$in['items'] ?? null], [], ['item','i'], $in, function($cx, $in) {$sc=count($cx->depths);return ' <tr class="'.(LR::ifvar(LR::dv($cx->blParam[0]['item']['deleted'] ?? null, $in)) ? 'deleted' : '').' '.(LR::ifvar(LR::dv(LR::hbch($cx, 'eq', [$cx->frame['index'] ?? null,$cx->depths[$sc-1]['selectedIndex'] ?? null], [], $in), $in)) ? 'selected' : '').'" data-id="'.LR::encq(LR::dv($cx->blParam[0]['item']['id'] ?? null)).'"> |
| 65 | +'.LR::hbbch($cx, 'each', [$cx->depths[$sc-1]['columns'] ?? null], [], [], $in, function($cx, $in) {$sc=count($cx->depths);return ' <td class="col-'.LR::encq(LR::dv($in['key'] ?? null, $in)).(LR::ifvar(LR::dv($cx->blParam[0]['item']['highlighted'] ?? null, $in)) ? ' highlighted' : '').'"> |
| 66 | +'.(LR::ifvar(LR::dv(LR::hbch($cx, 'eq', [$in['type'] ?? null,'boolean'], [], $in), $in)) ? ' '.(LR::ifvar(LR::dv(LR::hbch($cx, 'lookup', [$cx->blParam[0]['item'] ?? null,$in['key'] ?? null], [], $in), $in)) ? '<i class="icon-check text-success"></i>' : '<i class="icon-times text-muted"></i>').' |
| 67 | +' : (LR::ifvar(LR::dv(LR::hbch($cx, 'eq', [$in['type'] ?? null,'date'], [], $in), $in)) ? ' <time datetime="'.LR::encq(LR::hbch($cx, 'formatDate', [LR::hbch($cx, 'lookup', [$cx->blParam[0]['item'] ?? null,$in['key'] ?? null], [], $in),'Y-m-d'], [], $in)).'">'.LR::encq(LR::hbch($cx, 'formatDate', [LR::hbch($cx, 'lookup', [$cx->blParam[0]['item'] ?? null,$in['key'] ?? null], [], $in),$in['format'] ?? null], [], $in)).'</time> |
| 68 | +' : (LR::ifvar(LR::dv(LR::hbch($cx, 'eq', [$in['type'] ?? null,'currency'], [], $in), $in)) ? ' '.LR::encq(LR::hbch($cx, 'formatCurrency', [LR::hbch($cx, 'lookup', [$cx->blParam[0]['item'] ?? null,$in['key'] ?? null], [], $in),$cx->depths[$sc-1]['currency'] ?? null], [], $in)).' |
| 69 | +' : (LR::ifvar(LR::dv(LR::hbch($cx, 'eq', [$in['type'] ?? null,'link'], [], $in), $in)) ? ' <a href="'.LR::encq(LR::hbch($cx, 'replace', [$in['linkTemplate'] ?? null,'{id}',$cx->blParam[0]['item']['id'] ?? null], [], $in)).'">'.LR::encq(LR::hbch($cx, 'lookup', [$cx->blParam[0]['item'] ?? null,$in['key'] ?? null], [], $in)).'</a> |
| 70 | +' : ' '.LR::encq(LR::hbch($cx, 'lookup', [$cx->blParam[0]['item'] ?? null,$in['key'] ?? null], [], $in)).' |
| 71 | +')))).' </td> |
| 72 | +';}, null).(LR::ifvar(LR::dv($cx->depths[$sc-1]['showActions'] ?? null, $in)) ? ' <td class="actions"> |
| 73 | +'.LR::hbbch($cx, 'each', [$cx->depths[$sc-1]['rowActions'] ?? null], [], [], $in, function($cx, $in) {return (LR::ifvar(LR::dv(LR::hbch($cx, 'and', [$in['requiresAdmin'] ?? null,LR::hbch($cx, 'not', [$cx->blParam[0]['item']['isAdmin'] ?? null], [], $in)], [], $in), $in)) ? '' : ' <a href="'.LR::encq(LR::hbch($cx, 'replace', [$in['urlTemplate'] ?? null,'{id}',$cx->blParam[0]['item']['id'] ?? null], [], $in)).'" |
| 74 | + class="btn btn-sm btn-'.LR::encq(LR::dv($in['style'] ?? null, $in)).'" |
| 75 | + '.(LR::ifvar(LR::dv($in['confirm'] ?? null, $in)) ? 'data-confirm="'.LR::encq(LR::hbch($cx, 't', [$in['confirmKey'] ?? null], [], $in)).'"' : '').' |
| 76 | + title="'.LR::encq(LR::hbch($cx, 't', [$in['labelKey'] ?? null], [], $in)).'"> |
| 77 | + <i class="icon-'.LR::encq(LR::dv($in['icon'] ?? null, $in)).'"></i> |
| 78 | + </a> |
| 79 | +');}, null).' </td> |
| 80 | +' : '').' </tr> |
| 81 | +';}, function($cx, $in) {return ' <tr><td colspan="'.LR::encq(LR::dv($in['columnCount'] ?? null, $in)).'" class="empty-message">'.LR::encq(LR::hbch($cx, 't', ['table.empty'], [], $in)).'</td></tr> |
| 82 | +';}).' </tbody> |
| 83 | +'.(LR::ifvar(LR::dv($in['showTotals'] ?? null, $in)) ? ' <tfoot> |
| 84 | + <tr class="totals"> |
| 85 | +'.LR::hbbch($cx, 'each', [$in['columns'] ?? null], [], [], $in, function($cx, $in) {$sc=count($cx->depths);return ' <td>'.(LR::ifvar(LR::dv($in['showTotal'] ?? null, $in)) ? LR::encq(LR::hbch($cx, 'formatCurrency', [LR::hbch($cx, 'lookup', [$cx->depths[$sc-1]['totals'] ?? null,$in['key'] ?? null], [], $in),$cx->depths[$sc-2]['currency'] ?? null], [], $in)) : '').'</td> |
| 86 | +';}, null).' '.(LR::ifvar(LR::dv($cx->depths[count($cx->depths)-1]['showActions'] ?? null, $in)) ? '<td></td>' : '').' |
| 87 | + </tr> |
| 88 | + </tfoot> |
| 89 | +' : '').' </table> |
| 90 | + </div> |
| 91 | +
|
| 92 | +'.LR::p($cx, 'pagination', [[$in],[]], 0, ' ').' |
| 93 | +' : ' |
| 94 | +'.' <div class="empty-state"> |
| 95 | + '.(LR::ifvar(LR::dv($in['emptyState']['illustration'] ?? null, $in)) ? LR::raw(LR::dv($in['emptyState']['illustration'] ?? null)) : '').' |
| 96 | + <h3>'.LR::encq(LR::dv($in['emptyState']['heading'] ?? null)).'</h3> |
| 97 | + '.(LR::ifvar(LR::dv($in['emptyState']['message'] ?? null, $in)) ? '<p>'.LR::encq(LR::dv($in['emptyState']['message'] ?? null)).'</p>' : '').' |
| 98 | +'.(LR::ifvar(LR::dv($in['emptyState']['action'] ?? null, $in)) ? ' <a href="'.LR::encq(LR::dv($in['emptyState']['action']['url'] ?? null)).'" class="btn btn-primary">'.LR::encq(LR::dv($in['emptyState']['action']['label'] ?? null)).'</a> |
| 99 | +' : '').' </div> |
| 100 | +
|
| 101 | +').' |
| 102 | +'.LR::hbbch($cx, 'each', [$in['sidePanels'] ?? null], [], [], $in, function($cx, $in) {return LR::p($cx, 'side-panel', [[$in],[]], 0, ' ');}, null).' |
| 103 | + </div> |
| 104 | +</main> |
| 105 | +
|
| 106 | +'.'<footer id="site-footer"> |
| 107 | + <div class="container"> |
| 108 | + <div class="footer-cols"> |
| 109 | +'.LR::hbbch($cx, 'each', [$in['footerColumns'] ?? null], [], [], $in, function($cx, $in) {return LR::p($cx, 'footer-col', [[$in],[]], 0, ' ');}, null).' </div> |
| 110 | + <div class="footer-bottom"> |
| 111 | + <p>'.LR::encq(LR::dv($in['copyright'] ?? null, $in)).' '.(LR::ifvar(LR::dv($in['showYear'] ?? null, $in)) ? LR::encq(LR::dv($in['currentYear'] ?? null, $in)) : '').' '.LR::encq(LR::dv($in['siteName'] ?? null, $in)).'</p> |
| 112 | +'.(LR::ifvar(LR::dv($in['social'] ?? null, $in)) ? ' <ul class="social-links"> |
| 113 | +'.LR::hbbch($cx, 'each', [$in['social'] ?? null], [], [], $in, function($cx, $in) {return ' <li><a href="'.LR::encq(LR::dv($in['url'] ?? null, $in)).'" aria-label="'.LR::encq(LR::dv($in['name'] ?? null, $in)).'"><i class="icon-'.LR::encq(LR::dv($in['icon'] ?? null, $in)).'"></i></a></li> |
| 114 | +';}, null).' </ul> |
| 115 | +' : '').' </div> |
| 116 | + </div> |
| 117 | +</footer> |
| 118 | +
|
| 119 | +'.LR::hbbch($cx, 'each', [$in['scripts'] ?? null], [], [], $in, function($cx, $in) {return ' <script src="'.LR::encq(LR::dv($in['url'] ?? null, $in)).'"'.(LR::ifvar(LR::dv($in['defer'] ?? null, $in)) ? ' defer' : '').(LR::ifvar(LR::dv($in['async'] ?? null, $in)) ? ' async' : '').(LR::ifvar($_t3 = LR::dv($in['integrity'] ?? null, $in)) ? ' integrity="'.LR::encq($_t3).'" crossorigin="anonymous"' : '').'></script> |
| 120 | +';}, null).(LR::ifvar($_t4 = LR::dv($in['inlineScript'] ?? null, $in)) ? ' <script> |
| 121 | + '.LR::raw($_t4).' |
| 122 | + </script> |
| 123 | +' : '').' |
| 124 | +</body> |
| 125 | +</html> |
| 126 | +'; |
| 127 | +}; |
0 commit comments