Skip to content

Commit 081c0c7

Browse files
anistarkfarhaanbukhsh
authored andcommitted
fix navbar link
1 parent d607693 commit 081c0c7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/_includes/navbar.njk

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<nav class="w-full flex justify-center glass-nav {% if isHomePage %}bg-transparent opacity-0 -translate-y-full{% else %}bg-pycon-blue/70{% endif %} z-50 fixed top-0 transition-all duration-500" id="main-navbar">
33
<div class="w-full max-w-5xl mx-auto px-6 hidden md:block py-3">
44
<div class="relative flex justify-center items-center h-12 px-6">
5-
<a href="{{ env.baseUrl }}" class="absolute left-0">
6-
<img src="{{ env.baseUrl }}img/logo.png" alt="PyCon India 2025" class="h-10 w-auto">
5+
<a href="{{ env.baseUrl }}/" class="absolute left-0">
6+
<img src="{{ env.baseUrl }}/img/logo.png" alt="PyCon India 2025" class="h-10 w-auto">
77
</a>
88
<ul class="flex items-center justify-center w-full gap-8 relative">
99
{% set menuItems = [
@@ -64,7 +64,7 @@
6464
<div class="w-full flex flex-col">
6565
{% for subitem in item.submenu %}
6666
<div class="w-full p-4 bg-white/90 hover:bg-pycon-lime border-b border-black/10 flex justify-between items-center transition-colors duration-150 first:rounded-t-lg last:rounded-b-lg last:border-b-0">
67-
<a href="{{ env.baseUrl }}{{ subitem.link }}" class="text-gray-800 hover:text-[#4662ff] text-sm font-medium font-['Inter'] leading-tight no-underline dropdown-item block w-full">
67+
<a href="{{ env.baseUrl }}/{{ subitem.link }}" class="text-gray-800 hover:text-[#4662ff] text-sm font-medium font-['Inter'] leading-tight no-underline dropdown-item block w-full">
6868
{{ subitem.name }}
6969
</a>
7070
<div class="size-5 relative overflow-hidden">
@@ -77,7 +77,7 @@
7777
</div>
7878
{% else %}
7979
{# TODO: item.name != 'Sponsors' is a hack till we get the sponsors page up#}
80-
<a href="{% if item.isExternal %}{{ item.link }}{% elif item.link and item.link[0] == '#' and item.name != 'Sponsors' %}{{ env.baseUrl }}{{ item.link }}{% else %}{{ env.baseUrl }}{{ item.link }}{% endif %}"
80+
<a href="{% if item.isExternal %}{{ item.link }}{% elif item.link and item.link[0] == '#' and item.name != 'Sponsors' %}{{ env.baseUrl }}/{{ item.link }}{% else %}{{ env.baseUrl }}/{{ item.link }}{% endif %}"
8181
{% if item.isExternal %}target="_blank" rel="noopener noreferrer"{% endif %}
8282
class="flex items-center gap-1 py-2 px-3 text-white hover:text-[#D7FF7B] text-base font-normal font-['Acid_Grotesk'] leading-tight transition-colors duration-200 no-underline nav-link">
8383
{{ item.name }}
@@ -95,8 +95,8 @@
9595
</div>
9696

9797
<div class="flex justify-between items-center px-4 py-3 w-full md:hidden">
98-
<a href="{{ env.baseUrl }}" class="flex items-center z-20">
99-
<img src="{{ env.baseUrl }}img/logo.png" alt="PyCon India 2025" class="h-8 w-auto">
98+
<a href="{{ env.baseUrl }}/" class="flex items-center z-20">
99+
<img src="{{ env.baseUrl }}/img/logo.png" alt="PyCon India 2025" class="h-8 w-auto">
100100
</a>
101101

102102
<input type="checkbox" id="mobile-menu-checkbox" class="hidden">
@@ -129,7 +129,7 @@
129129
<div class="flex flex-col space-y-4">
130130
{% for item in menuItems %}
131131
{% if not item.hasSubmenu %}
132-
<a href="{% if item.isExternal %}{{ item.link }}{% elif item.link and item.link[0] == '#' %}{{ item.link }}{% else %}{{ env.baseUrl }}{{ item.link | url }}{% endif %}"
132+
<a href="{% if item.isExternal %}{{ item.link }}{% elif item.link and item.link[0] == '#' %}{{ item.link }}{% else %}{{ env.baseUrl }}/{{ item.link | url }}{% endif %}"
133133
{% if item.isExternal %}target="_blank" rel="noopener noreferrer"{% endif %}
134134
class="p-4 bg-white/10 backdrop-blur-sm border border-white/20 rounded-lg hover:bg-white/20 flex justify-between items-center transition-all duration-200 text-white text-base font-medium no-underline">
135135
{{ item.name }}
@@ -154,7 +154,7 @@
154154
<div class="hidden mt-2 mobile-submenu">
155155
<div class="bg-pycon-lime/90 backdrop-blur-sm border border-black/10 rounded-lg p-3 flex flex-col gap-2">
156156
{% for subitem in item.submenu %}
157-
<a href="{{ env.baseUrl }}{{ subitem.link | url }}" class="p-2 text-gray-800 text-sm font-medium hover:text-[#4E62F5] transition-colors duration-200 no-underline">
157+
<a href="{{ env.baseUrl }}/{{ subitem.link | url }}" class="p-2 text-gray-800 text-sm font-medium hover:text-[#4E62F5] transition-colors duration-200 no-underline">
158158
{{ subitem.name }}
159159
</a>
160160
{% endfor %}

0 commit comments

Comments
 (0)