Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0301· OpenAIAi2 WildChat-4.8M (AI2)

сделай рефакторинг {%- if parametrenter=='profileinfo'%} <a…

  1. User

    сделай рефакторинг {%- if parametr_enter=='profile_info'%} {%- else %} {%- endif %}

                {%- if parametr_enter=='uved'%}
                <a href="/my_private_office?parametr_enter=uved" class="punct_menu_active mb-4"> 
                  <img src="{{ url_for('static', filename='/img/icons/lk/uved_active.svg') }}" alt="" title = "Мои новости">
                </a>
                  {%- else %} 
                  <a href="/my_private_office?parametr_enter=uved" class="punct_menu mb-4"> 
                      <img src="{{ url_for('static', filename='/img/icons/lk/uved.svg') }}" alt="" title = "Мои новости">
                  </a>
                  {%- endif %}
    
    
              {%- if parametr_enter=='homeworks'%}
                <a href="/my_private_office?parametr_enter=homeworks&my_friend={{my_friend}}&my_works={{my_works}}&my_topics={{my_topics}}" class="punct_menu_active mb-4"> 
                <img src="{{ url_for('static', filename='/img/icons/lk/homework_active.svg') }}" alt="" title = "Домашняя работа">
              </a>
                {%- else %} 
                <a href="/my_private_office?parametr_enter=homeworks&my_friend={{my_friend}}&my_works={{my_works}}&my_topics={{my_topics}}" class="punct_menu mb-4"> 
                    <img src="{{ url_for('static', filename='/img/icons/lk/homework.svg') }}" alt="" title = "Домашняя работа">
                </a>
                {%- endif %}
            
                {%- if parametr_enter=='tasks_worksheet'%}
                <a href="/my_private_office?parametr_enter=tasks_worksheet" class="punct_menu_active mb-4"> 
                  <img src="{{ url_for('static', filename='/img/icons/lk/save_active.svg') }}" alt="" title = "Домашняя работа">
                </a>
                {%- else %} 
                  <a href="/my_private_office?parametr_enter=tasks_worksheet" class="punct_menu mb-4"> 
                      <img src="{{ url_for('static', filename='/img/icons/lk/save.svg') }}" alt="" title = "Домашняя работа">
                  </a>
                {%- endif %}
    
                {%- if parametr_enter=='my_friends'%}
                <a href="/my_private_office?parametr_enter=my_friends" class="punct_menu_active mb-4"> 
                  <img src="{{ url_for('static', filename='/img/icons/lk/people_active.svg') }}" alt="" title = "Домашняя работа">
                </a>
                {%- else %} 
                  <a href="/my_private_office?parametr_enter=my_friends" class="punct_menu mb-4"> 
                      <img src="{{ url_for('static', filename='/img/icons/lk/people.svg') }}" alt="" title = "Домашняя работа">
                  </a>
                {%- endif %}
    
              {%- if parametr_enter=='my_board'%}
              <a href="/my_private_office?parametr_enter=my_board" class="punct_menu_active mb-4"> 
                <img src="{{ url_for('static', filename='/img/icons/lk/desk_active.svg') }}" alt="" title = "Домашняя работа">
              </a>
                {%- else %} 
                <a href="/my_private_office?parametr_enter=my_board" class="punct_menu mb-4">
                    <img src="{{ url_for('static', filename='/img/icons/lk/desk.svg') }}" alt="" title = "Онлайн-доска">   
                  </a>
                {%- endif %}
    
                {%- if parametr_enter=='my_files'%}
                <a href="/my_private_office?parametr_enter=my_files" class="punct_menu_active mb-4"> 
                  <img src="{{ url_for('static', filename='/img/icons/lk/file_active.svg') }}" alt="" title = "Календарь">  
                </a>
                  {%- else %} 
                  <a href="/my_private_office?parametr_enter=my_files" class="punct_menu mb-4">
                    <img src="{{ url_for('static', filename='/img/icons/lk/file.svg') }}" alt="" title = "Календарь">   
                    </a>
                  {%- endif %}
    
    
    
                {%- if parametr_enter=='calendar'%}
                <a href="/my_private_office?parametr_enter=calendar" class="punct_menu_active mb-4"> 
                  <img src="{{ url_for('static', filename='/img/icons/lk/calendar_active.svg') }}" alt="" title = "Календарь">  
                </a>
                  {%- else %} 
                  <a href="/my_private_office?parametr_enter=calendar" class="punct_menu mb-4">
                    <img src="{{ url_for('static', filename='/img/icons/lk/calendar.svg') }}" alt="" title = "Календарь">   
                    </a>
                  {%- endif %}
    
  2. Assistant

    {# This code block generates a menu for a user's private office with varying active states for each menu item, depending on the value of the "parametr_enter" parameter. #}