{% set request_collector = profile is defined ? profile.collectors.request|default(null) : null %} {% set status_code = request_collector is not null ? request_collector.statuscode|default(0) : 0 %} {% set favicon_color = status_code > 399 ? 'b41939' : status_code > 299 ? 'af8503' : '000000' %} {% block head %} {% block stylesheets %} {{ include('@WebProfiler/Profiler/profiler.css.twig') }} {% endblock %} {% block javascripts %} {% endblock %} {% endblock %} if (null === localStorage.getItem('symfony/profiler/theme') || 'theme-auto' === localStorage.getItem('symfony/profiler/theme')) { document.body.classList.add((matchMedia('(prefers-color-scheme: dark)').matches ? 'theme-dark' : 'theme-light')); // needed to respond dynamically to OS changes without having to refresh the page window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => { document.body.classList.remove('theme-light', 'theme-dark'); document.body.classList.add(e.matches ? 'theme-dark' : 'theme-light'); }); } else { document.body.classList.add(localStorage.getItem('symfony/profiler/theme')); } document.body.classList.add(localStorage.getItem('symfony/profiler/width') || 'width-normal'); document.body.classList.add( (navigator.appVersion.indexOf('Win') !== -1) ? 'windows' : (navigator.appVersion.indexOf('Mac') !== -1) ? 'macos' : 'linux' ); {% block body '' %}