Skip to content

Commit a223095

Browse files
committed
created the header for new home
1 parent 55eb0f4 commit a223095

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{% load static %}
2+
{% load gravatar %}
3+
{% load socialaccount %}
4+
{% load user_score %}
5+
{% providers_media_js %}
6+
{% load i18n %}
7+
{% load custom_tags %}
8+
9+
<header class="fixed font-['Inter'] z-20 h-[65px] bg-white w-[100vw] flex column px-[0vw] items-center justify-between px-[2vw]">
10+
11+
<!-- Logo -->
12+
<div class="flex flex-col items-center">
13+
<a class="" href="/">
14+
<img src="{% logo 'TRANSPARENT' %}" class="!max-w-[130px] lg:max-w-[200px]">
15+
</a>
16+
<p class="text-center sm:!inline text-base lg:text-2xl pl-1">{% trans "Report Issues, Win Prizes" %}</p>
17+
</div>
18+
19+
20+
<!-- Search Bar -->
21+
<div class="flex column items-center gap-[8px]">
22+
<form class="relative px-[34px]" action="/search" method="get">
23+
<i class="fa fa-search absolute left-[10px] top-[6.4px] text-[#9CA3AF] z-10"></i>
24+
<input type="text" name="query" placeholder="Search"
25+
class="text-base ps-9 scale-[1.4] placeholder-[#9CA3AF] bg-[#EDEDED] outline-none p-2.5 font-semibold rounded-lg">
26+
</form>
27+
<a href="/report/"
28+
class="lg:!inline-block bg-red-500 hover:bg-red-600 h-[38px] py-[8px] px-[20px] whitespace-nowrap !text-2xl font-bold text-white leading-[21px] cursor-pointer hover:text-white hover:no-underline rounded-xl tracking-wide">
29+
{% trans "Report a Bug" %}
30+
</a>
31+
<a href="/hunts/"
32+
class="lg:!inline-block bg-red-500 hover:bg-red-600 h-[38px] py-[8px] px-[20px] whitespace-nowrap !text-2xl font-bold text-white leading-[21px] cursor-pointer hover:text-white hover:no-underline rounded-xl tracking-wide">
33+
{% trans "Bug Hunts" %}
34+
</a>
35+
</div>
36+
37+
38+
<!-- User Avatar -->
39+
{% if request.user.is_authenticated %}
40+
<li class="flex justify-center items-center ">
41+
<a href="/accounts/logout" id="user" class="relative flex items-center sm:gap-3 mr-[30px] hover:no-underline">
42+
{% if request.user.userprofile.avatar %}
43+
<img src="{{ request.user.userprofile.avatar }}" class="h-[30px] w-[30px] rounded-full ">
44+
{% elif request.user.socialaccount_set.all.0.get_avatar_url %}
45+
<img src="{{ request.user.socialaccount_set.all.0.get_avatar_url }}"
46+
class="h-[30px] w-[30px] rounded-full ">
47+
{% else %}
48+
{% gravatar request.user.email 30 '' 'gravatar rounded-full' %}
49+
{% endif %}
50+
<span
51+
class="absolute -right-[17px] -bottom-[25px] lg:-right-[25px] lg:-bottom-[25px] sm:static whitespace-nowrap text-[1.6rem] font-[600]"><span
52+
class="">{{ request.user.username }}</span> ({{ request.user|score|default:"0" }} Pts)
53+
</span>
54+
</a>
55+
</li>
56+
{% else %}
57+
58+
59+
<!-- Sign up and Log in Buttons -->
60+
<div class="flex column items-center gap-[8px]">
61+
<a href="/accounts/signup"
62+
class="lg:!inline-block bg-red-500 hover:bg-red-600 h-[38px] py-[8px] px-[25px] whitespace-nowrap !text-2xl font-bold text-white leading-[21px] cursor-pointer hover:text-white hover:no-underline rounded-xl tracking-wide">
63+
{% trans "Signup" %}
64+
</a>
65+
<a href="/accounts/login"
66+
class="lg:!inline-block bg-red-500 hover:bg-red-600 h-[38px] py-[8px] px-[25px] whitespace-nowrap !text-2xl font-bold text-white leading-[21px] cursor-pointer hover:text-white hover:no-underline rounded-xl tracking-wide">
67+
{% trans "Login" %}
68+
</a>
69+
</div>
70+
{% endif %}
71+
72+
73+
</header>

0 commit comments

Comments
 (0)