Nova Menu Advanced
Visit this package on GitHub

Iframe Popup

To create an iframe popup element use the iframe factory method:

use NormanHuth\NovaMenu\MenuSection;
use NormanHuth\NovaMenu\MenuGroup;
use NormanHuth\NovaMenu\MenuItem;
 
Nova::mainMenu(function (Request $request) {
return [
//..
MenuSection::iframe('Norman Huth', 'https://huth.it'),
MenuGroup::iframe('Norman Huth', 'https://huth.it'),
MenuItem::iframe('Norman Huth', 'https://huth.it'),
// ..
];
});

{
"classes": [],
"styles": {
"position": "fixed",
"width": "100vw",
"height": "100vh",
"padding": "50px",
"box-sizing": "border-box",
"background-color": "rgba(0, 0, 0, 0.9)",
"z-index": "200000",
"left": "0",
"top": "0",
"border-radius": "5px"
}
}

You can add classes to the iframe class attribute by invoking the addIframeClasses method when defining the element:

use NormanHuth\NovaMenu\MenuSection;
use NormanHuth\NovaMenu\MenuGroup;
use NormanHuth\NovaMenu\MenuItem;
 
Nova::mainMenu(function (Request $request) {
return [
//..
MenuItem::iframe('Norman Huth', 'https://huth.it')
->addIframeClasses(['iframe-popup', 'opacity-90']),
// ..
];
});

You can add styles to the iframe class attribute by invoking the addIframeStyles method when defining the element:

use NormanHuth\NovaMenu\MenuSection;
use NormanHuth\NovaMenu\MenuGroup;
use NormanHuth\NovaMenu\MenuItem;
 
Nova::mainMenu(function (Request $request) {
return [
//..
MenuItem::iframe('Norman Huth', 'https://huth.it')
->addIframeStyles([
'padding' => '100px'
]),
// ..
];
});

You can remove the styles add new styles to the iframe style attribute by invoking the setIframeStyles method when defining the element:

use NormanHuth\NovaMenu\MenuSection;
use NormanHuth\NovaMenu\MenuGroup;
use NormanHuth\NovaMenu\MenuItem;
 
Nova::mainMenu(function (Request $request) {
return [
//..
MenuItem::iframe('Norman Huth', 'https://huth.it')
->setIframeStyles([
'border' => '5px solid red'
]),
// ..
];
});

{
"classes": [],
"styles": {
"background-color": "white",
"width": "100%",
"height": "100%"
}
}

You can add classes to the iframe wrapper class attribute by invoking the addIframeClasses method when defining the element:

use NormanHuth\NovaMenu\MenuSection;
use NormanHuth\NovaMenu\MenuGroup;
use NormanHuth\NovaMenu\MenuItem;
 
Nova::mainMenu(function (Request $request) {
return [
//..
MenuItem::iframe('Norman Huth', 'https://huth.it')
->addIframeClasses(['iframe-popup-wrapper', 'cursor-zoom-out']),
// ..
];
});

You can add styles to the iframe wrapper class attribute by invoking the addIframeStyles method when defining the element:

use NormanHuth\NovaMenu\MenuSection;
use NormanHuth\NovaMenu\MenuGroup;
use NormanHuth\NovaMenu\MenuItem;
 
Nova::mainMenu(function (Request $request) {
return [
//..
MenuItem::iframe('Norman Huth', 'https://huth.it')
->addIframeStyles([
'border' => '5px solid red'
]),
// ..
];
});

You can remove the styles add new styles to the iframe wrapper style attribute by invoking the setIframeWrapperStyles method when defining the element:

use NormanHuth\NovaMenu\MenuSection;
use NormanHuth\NovaMenu\MenuGroup;
use NormanHuth\NovaMenu\MenuItem;
 
Nova::mainMenu(function (Request $request) {
return [
//..
MenuItem::iframe('Norman Huth', 'https://huth.it')
->setIframeWrapperStyles([
'border' => '5px solid red'
]),
// ..
];
});