menu.blade.php 3.66 KB
<div class="cabinet__side-item">
    <div class="cabinet__menu">
        <button type="button" class="cabinet__menu-toper js-toggle">
            <span class="cabinet__menu-toper-text"></span>
            <i class="cabinet__menu-toper-arrow">
                <svg>
                    <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
                </svg>
            </i>
        </button>
        <div class="cabinet__menu-body">
            <div class="cabinet__menu-items">
                <a href="{{ route('worker.cabinet') }}" class="cabinet__menu-item @if ($item==1) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
                        </svg>
                    </i>
                    <span>Моя анкета</span>
                </a>
                <a href="{{ route('worker.messages', ['type_message' => 'input']) }}" class="cabinet__menu-item @if ($item==2) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-5') }}"></use>
                        </svg>
                    </i>
                    <span>Сообщения</span>
                </a>
                <a href="{{ route('worker.autolift') }}" class="cabinet__menu-item @if ($item==7) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#refresh') }}"></use>
                        </svg>
                    </i>
                    <span>Автоподнятие резюме</span>
                </a>
                <a href="{{ route('worker.autoresponder') }}" class="cabinet__menu-item @if ($item==6) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#answering') }}"></use>
                        </svg>
                    </i>
                    <span>Автоответчик</span>
                </a>
                <a href="{{ route('worker.colorado') }}" class="cabinet__menu-item @if ($item==3) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-6') }}"></use>
                        </svg>
                    </i>
                    <span>Избранные вакансии</span>
                </a>
                <a href="{{ route('worker.new_password') }}" class="cabinet__menu-item green @if ($item==4) active @endif">
                    <i></i>
                    <span>Сменить пароль</span>
                </a>
                <a href="{{ route('worker.delete_profile') }}" class="cabinet__menu-item red @if ($item==5) active @endif">
                    <i></i>
                    <span>Удалить профиль</span>
                </a>
            </div>
            <div class="cabinet__menu-bottom">
                <a href="{{ route('logout') }}" class="button cabinet__menu-leave">
                    <svg>
                        <use xlink:href="{{ asset('images/sprite.svg#leave') }}"></use>
                    </svg>
                    Выход
                </a>
                <span class="cabinet__menu-copy">
                    &copy; 2020 &ndash; Rekamore.su
                </span>
            </div>
        </div>
    </div>
</div>

<script>
    $(function(){
        var active_menu = $('.cabinet__menu-item.active');
        if (active_menu.length === 1){
            $('.cabinet__menu-toper-text').html(active_menu.html());
        }
    });
</script>