Skip to content

Commit

Permalink
header file reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
krrish-sehgal committed Nov 11, 2024
1 parent f86516f commit ac0bc85
Showing 1 changed file with 97 additions and 96 deletions.
193 changes: 97 additions & 96 deletions website/templates/includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,103 +149,104 @@
</select>
</form>
</div>
{% if request.user.is_authenticated %}
<li class="h-[80px] flex justify-center items-center ">
<button id="dropdownButton"
class="relative flex items-center sm:gap-3 mr-[30px]"
type="button">
{% if request.user.userprofile.avatar %}
<img src="{{ request.user.userprofile.avatar }}"
class="h-[30px] w-[30px] rounded-full "
alt="User Avatar"
width="30"
height="30">
{% elif request.user.socialaccount_set.all.0.get_avatar_url %}
<img src="{{ request.user.socialaccount_set.all.0.get_avatar_url }}"
class="h-[30px] w-[30px] rounded-full "
alt="User Avatar"
width="30"
height="30">
{% else %}
{% gravatar request.user.email 30 '' 'gravatar rounded-full' %}
{% endif %}
<span class="absolute -right-[17px] -bottom-[25px] lg:-right-[25px] lg:-bottom-[25px] sm:static whitespace-nowrap"><span>{{ request.user.username }}</span> ({{ request.user|score|default:"0" }} Pts)
<i class="fa fa-caret-down text-red-500"></i>
</span>
</button>
<!-- Dropdown for User Avatar -->
<div id="dropdownMenu"
class="z-50 hidden absolute bg-white top-32 right-5">
<ul class="flex flex-col gap-2 px-8 py-4 border shadow-xl rounded-lg left-auto">
<li>
<a href="{% url 'account_profile' %}">
<i class="fa fa-user fa-fw"></i> {% trans "User Profile" %}
</a>
</li>
<li>
<a href="{% env 'EXTENSION_URL' %}"
target="_new"
rel="noopener noreferrer">
<i class="fa fa-chrome fa-fw"></i>
{% trans "Add to chrome" %}
</a>
</li>
<li>
<a href="{% url 'start_hunt' %}">
<i class="fa fa-play fa-fw"></i> {% trans "Start a Bug Hunt" %}
</a>
</li>
<li>
<a href="{% url 'social' %}">
<i class="fa fa-share fa-fw"></i>
{% trans "Social" %}
</a>
</li>
<li>
<a href="{% url 'account_change_password' %}">
<i class="fa fa-gear fa-fw"></i> {% trans "Change Password" %}
</a>
</li>
<li>
<a href="{% url 'invite' %}">
<i class="fa fa-paper-plane fa-fw"></i> {% trans "Invite Friends" %}
</a>
</li>
<li>
<a href="{% url 'company_view' %}">
<i class="fa fa-building fa-fw"></i> {% trans "Organization Dashboard" %}
</a>
</li>
<!-- divider -->
<li class="border my-4 -mx-8"></li>
<li>
<a href="{% url 'account_logout' %}">
<i class="fa fa-sign-out fa-fw"></i> {% trans "Logout" %}
</a>
</li>
</ul>
</div>
</li>
{% else %}
<!-- Sign up and Log in Buttons -->
<div class="flex items-center h-[80px]">
<div class="hidden lg:!flex h-[80px] justify-center items-center ">
<a href="{% url 'account_signup' %}"
class="h-[38px] px-[25px] py-[9px] bg-red-500 hover:bg-red-600 hover:no-underline text-white font-bold text-2xl mr-[20px] hover:text-white">
{% trans "Signup" %}</a>
<a href="{% url 'account_login' %}"
data-toggle="modal"
class="h-[38px] px-[25px] py-[9px] bg-red-500 hover:bg-red-600 hover:no-underline text-white font-bold text-2xl mr-[20px] hover:text-white">
{% trans "Login" %}</a>
</div>
<!-- Log in icon -->
<a href="{% url 'account_login' %}" class="block lg:hidden m-2">
<i class="fa fa-user !text-5xl text-red-500"></i>
</a>
</div>
{% if request.user.is_authenticated %}
<li class="h-[80px] flex justify-center items-center ">
<button id="dropdownButton"
class="relative flex items-center sm:gap-3 mr-[30px]"
type="button">
{% if request.user.userprofile.avatar %}
<img src="{{ request.user.userprofile.avatar }}"
class="h-[30px] w-[30px] rounded-full "
alt="User Avatar"
width="30"
height="30">
{% elif request.user.socialaccount_set.all.0.get_avatar_url %}
<img src="{{ request.user.socialaccount_set.all.0.get_avatar_url }}"
class="h-[30px] w-[30px] rounded-full "
alt="User Avatar"
width="30"
height="30">
{% else %}
{% gravatar request.user.email 30 '' 'gravatar rounded-full' %}
{% endif %}
<span class="absolute -right-[17px] -bottom-[25px] lg:-right-[25px] lg:-bottom-[25px] sm:static whitespace-nowrap"><span>{{ request.user.username }}</span> ({{ request.user|score|default:"0" }} Pts)
<i class="fa fa-caret-down text-red-500"></i>
</span>
</button>
<!-- Dropdown for User Avatar -->
<div id="dropdownMenu"
class="z-50 hidden absolute bg-white top-32 right-5">
<ul class="flex flex-col gap-2 px-8 py-4 border shadow-xl rounded-lg left-auto">
<li>
<a href="{% url 'account_profile' %}">
<i class="fa fa-user fa-fw"></i> {% trans "User Profile" %}
</a>
</li>
<li>
<a href="{% env 'EXTENSION_URL' %}"
target="_new"
rel="noopener noreferrer">
<i class="fa fa-chrome fa-fw"></i>
{% trans "Add to chrome" %}
</a>
</li>
<li>
<a href="{% url 'start_hunt' %}">
<i class="fa fa-play fa-fw"></i> {% trans "Start a Bug Hunt" %}
</a>
</li>
<li>
<a href="{% url 'social' %}">
<i class="fa fa-share fa-fw"></i>
{% trans "Social" %}
</a>
</li>
<li>
<a href="{% url 'account_change_password' %}">
<i class="fa fa-gear fa-fw"></i> {% trans "Change Password" %}
</a>
</li>
<li>
<a href="{% url 'invite' %}">
<i class="fa fa-paper-plane fa-fw"></i> {% trans "Invite Friends" %}
</a>
</li>
<li>
<a href="{% url 'company_view' %}">
<i class="fa fa-building fa-fw"></i> {% trans "Organization Dashboard" %}
</a>
</li>
<!-- divider -->
<li class="border my-4 -mx-8"></li>
<li>
<a href="{% url 'account_logout' %}">
<i class="fa fa-sign-out fa-fw"></i> {% trans "Logout" %}
</a>
</li>
</ul>
</div>
{% endif %}
</div>
</li>
{% else %}
<!-- Sign up and Log in Buttons -->
<div class="flex items-center h-[80px]">
<div class="hidden lg:!flex h-[80px] justify-center items-center ">
<a href="{% url 'account_signup' %}"
class="h-[38px] px-[25px] py-[9px] bg-red-500 hover:bg-red-600 hover:no-underline text-white font-bold text-2xl mr-[20px] hover:text-white">
{% trans "Signup" %}</a>
<a href="{% url 'account_login' %}"
data-toggle="modal"
class="h-[38px] px-[25px] py-[9px] bg-red-500 hover:bg-red-600 hover:no-underline text-white font-bold text-2xl mr-[20px] hover:text-white">
{% trans "Login" %}</a>
</div>
<!-- Log in icon -->
<a href="{% url 'account_login' %}" class="block lg:hidden m-2">
<i class="fa fa-user !text-5xl text-red-500"></i>
</a>
</div>
{% endif %}
</div>
</div>
</nav>
<div class="bg-gray-100 chat-Zindex">
<div id="chatbot" class="chatbot">
Expand Down Expand Up @@ -387,4 +388,4 @@ <h3 class="text-xl font-extrabold">Chat with BLT Bot</h3>
}
});
});
</script>
</script>

0 comments on commit ac0bc85

Please sign in to comment.