Exemple #1
0
<?php

$topbar = (bool) xt_option('topbar');
$topbar_sticky = (bool) xt_option('topbar-sticky') ? ' sticky' : '';
$topbar_sticky_height = xt_value_format(xt_option('topbar-sticky-height'), 'px-int');
$topbar_sticky_distance = xt_option('topbar-sticky-distance');
$topbar_sticky_distance = str_replace("px", "", trim($topbar_sticky_distance));
$topbar_show_logo = (bool) xt_option('topbar-show-logo', null, true);
$topbar_container = xt_option('topbar-container') == 'boxed' ? ' contain-to-grid' : '';
$visibility = $topbar ? '' : ' show-for-small-only';
?>


<!-- Top Menu Bar -->

<div class="top-menu<?php 
echo esc_attr($topbar_sticky);
echo esc_attr($topbar_container);
echo esc_attr($visibility);
?>
">

	<nav class="top-bar" data-topbar data-sticky_height="<?php 
echo esc_attr($topbar_sticky_height);
?>
" data-distance="<?php 
echo esc_attr($topbar_sticky_distance);
?>
" data-options="sticky_on: small">

		<?php 
Exemple #2
0
<?php

$mainmenu = (bool) xt_option('mainmenu');
$mainmenu_sticky = (bool) xt_option('mainmenu-sticky') ? ' sticky' : '';
$mainmenu_sticky_height = xt_value_format(xt_option('mainmenu-sticky-height'), 'px-int');
$mainmenu_sticky_distance = xt_option('mainmenu-sticky-distance');
$mainmenu_sticky_distance = str_replace("px", "", trim($mainmenu_sticky_distance));
$mainmenu_stretch_items = (bool) xt_option('mainmenu-stretch-items') ? ' stretch' : '';
$topbar_container = xt_option('mainmenu-container') == 'boxed' ? ' contain-to-grid' : '';
$mainmenu_show_logo = (bool) xt_option('mainmenu-show-logo', null, false);
$mainmenu_search_bar_enabled = (bool) xt_option('mainmenu-search-bar-toggle-enabled');
$mainmenu_search_bar_toggle = xt_option('mainmenu-search-bar-toggle');
?>

<?php 
if ($mainmenu) {
    ?>
<!-- Main Menu Bar -->
<div class="main-menu hide-for-small-only<?php 
    echo esc_attr($mainmenu_sticky);
    echo esc_attr($topbar_container);
    ?>
">

	<nav class="top-bar" data-topbar data-sticky_height="<?php 
    echo esc_attr($mainmenu_sticky_height);
    ?>
" data-distance="<?php 
    echo esc_attr($mainmenu_sticky_distance);
    ?>
" data-options="sticky_on: medium">