Everything inside the red border is in the iframe. Everything outside is the parent frame.

The parent frame controls both the top and secondary menus by simply toggling a class on the body of each document.

(Animation, positioning, etc. is handled purely by CSS. Animation between outer and inner nav is purposely timed different, but can be in sync — or have no animation at all.)

Ideally, the module in the sub-frame would pull in stock Cockpit CSS with the logic to handle the internal sub-navigation sidebar (responsiveness, animation, style). It could choose to handle it itself, however, as it is based purely on the classname in the body.