
<div class="panel" id="themes-panel" role="dialog" aria-label="menu de contexto que permite a troca do tema da barra de menu" aria-hidden="true">
    <div class="section" id="themes">
        <ul id="themes-list">
            <?php
            $count_themes = 0;
            foreach ($var_themes_list as $theme => $data) {
                if (in_array($theme, $menu_data['pick_themes'] )) {
                    $count_themes++;
                    $active = '';
                    if ($menu_data['theme'] == $theme) {
                        $active = 'active';
                    }
                    ?>
                    <li class="theme-name button <?php echo $active; ?>">
                        <a href="javascript:void(0)" data-themeapply="data-themeapply" data-theme="<?php echo $theme; ?>">
                            <?php echo $data['name']; ?>
                            <div class="group">
                                <span style="background:<?php echo $data['p']; ?>"></span>
                                <span style="background:<?php echo $data['s']; ?>"></span>
                                <span style="background:<?php echo $data['a']; ?>"></span>
                            </div>
                        </a>
                    </li>
                    <?php
                }
            }
            ?>
        </ul>
    </div>
</div>
<script>


    <?php
    if ($count_themes < 2) {
    ?>
    $(document).ready(function () {
        hideTBButton('themes');
    })
    <?php
    }
    ?>
</script>