1 <!-- Check if there's a "iframe=true" query parameter in the request -->
2 @if(request()->query('iframe') === 'true')
4 <!-- Set styles for when we're in "iframe mode" -->
5 <!-- Most of these hide elements to provide a simple "embedded view" -->
13 #main-content > .mb-m,
14 .tri-layout-mobile-tabs
27 <!-- Add a script to control dark-mode via JavaScript -->
28 <!-- if there's also a 'theme' query paramter -->
29 @if(request()->query('theme'))
30 <script nonce="{{ $cspNonce }}">
31 // Use JavaScript to toggle the 'dark-mode' class on the HTML element to enable/disable
32 // dark mode based on whether the `theme` query parameter is 'dark'.
33 document.documentElement.classList.toggle('dark-mode', {{ request()->query('theme') === 'dark' ? 'true' : 'false' }});