<li class="sidebar-item {{ 'active' if request.endpoint == 'profile.edit_profile' else '' }}">
    <a class="sidebar-link" href="{{ url_for('profile.edit_profile') }}">
        <i class="align-middle" data-feather="user"></i> <span class="align-middle">Edit profile</span>
    </a>
</li>
