@stack('pageStyles') @if(file_exists(GROCY_DATAPATH . '/custom_css.html')) @php include GROCY_DATAPATH . '/custom_css.html' @endphp @endif @if(!($embedded)) @endif
@yield('content')
@if(!empty($__t('moment_locale') && $__t('moment_locale') != 'x'))@endif @if(!empty($__t('summernote_locale') && $__t('summernote_locale') != 'x'))@endif @if(!empty($__t('bootstrap-select_locale') && $__t('bootstrap-select_locale') != 'x'))@endif @stack('pageScripts') @php // @stack('componentScripts') maybe contains the components JS file reference multiple times // if the component was included more than once in the view // // So this is a ugly hack to keep only unique JS file references there // The property is normally protected, so change that $reflection = new \ReflectionClass($__env); $property = $reflection->getProperty('pushes'); $property->setAccessible(true); $env = $property->getValue($__env); if (array_key_exists('componentScripts', $env)) { // Take every line into a new array, one element per line $filteredStack = array_map(function($value) { return explode("#SEP#", str_replace(array("\n", "\r", "\t"), '#SEP#', trim($value))); }, $env['componentScripts']); // Flatten the array into a single one, only keep unique lines, remove empty lines, add a defined new line $filteredStack = preg_filter('/$/', "\n", array_filter(array_unique(array_merge(...$filteredStack)))); // Write it back $env['componentScripts'] = $filteredStack; $property->setValue($__env, $env); } @endphp @stack('componentScripts') @hasSection('viewJsName')@endif @if(file_exists(GROCY_DATAPATH . '/custom_js.html')) @php include GROCY_DATAPATH . '/custom_js.html' @endphp @endif