|
1 | 1 | {% macro navbar(isHomePage = false) %}
|
| 2 | +{% set baseUrl = "/2025/" if env.baseUrl === "/2025/" else "/" %} |
2 | 3 | <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">
|
3 | 4 | <div class="w-full max-w-5xl mx-auto px-6 hidden md:block py-3">
|
4 | 5 | <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"> |
| 6 | + <a href="{{ baseUrl }}" class="absolute left-0"> |
| 7 | + <img src="{{ baseUrl }}img/logo.png" alt="PyCon India 2025" class="h-10 w-auto"> |
7 | 8 | </a>
|
8 | 9 | <ul class="flex items-center justify-center w-full gap-8 relative">
|
9 | 10 | {% set menuItems = [
|
|
64 | 65 | <div class="w-full flex flex-col">
|
65 | 66 | {% for subitem in item.submenu %}
|
66 | 67 | <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"> |
| 68 | + <a href="{{ 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"> |
68 | 69 | {{ subitem.name }}
|
69 | 70 | </a>
|
70 | 71 | <div class="size-5 relative overflow-hidden">
|
|
77 | 78 | </div>
|
78 | 79 | {% else %}
|
79 | 80 | {# 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 %}" |
| 81 | + <a href="{% if item.isExternal %}{{ item.link }}{% elif item.link and item.link[0] == '#' and item.name != 'Sponsors' %}{{ item.link }}{% else %}{{ baseUrl }}{{ item.link }}{% endif %}" |
81 | 82 | {% if item.isExternal %}target="_blank" rel="noopener noreferrer"{% endif %}
|
82 | 83 | 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">
|
83 | 84 | {{ item.name }}
|
|
87 | 88 | {% endfor %}
|
88 | 89 | </ul>
|
89 | 90 | <div class="absolute right-0">
|
90 |
| - <a href="{{ '/tickets' | url }}" class="font-medium text-black bg-pycon-lime/90 hover:bg-pycon-lime text-sm py-2 px-4 rounded-full transition-all duration-200 no-underline nav-button"> |
| 91 | + <a href="{{ baseUrl }}tickets" class="font-medium text-black bg-pycon-lime/90 hover:bg-pycon-lime text-sm py-2 px-4 rounded-full transition-all duration-200 no-underline nav-button"> |
91 | 92 | Get Tickets
|
92 | 93 | </a>
|
93 | 94 | </div>
|
94 | 95 | </div>
|
95 | 96 | </div>
|
96 | 97 |
|
97 | 98 | <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"> |
| 99 | + <a href="{{ baseUrl }}" class="flex items-center z-20"> |
| 100 | + <img src="{{ baseUrl }}img/logo.png" alt="PyCon India 2025" class="h-8 w-auto"> |
100 | 101 | </a>
|
101 | 102 |
|
102 | 103 | <input type="checkbox" id="mobile-menu-checkbox" class="hidden">
|
|
111 | 112 |
|
112 | 113 | <div id="mobile-menu" class="fixed inset-0 bg-pycon-blue/95 backdrop-blur-md z-[1000] hidden overflow-auto">
|
113 | 114 | <div class="text-center pt-6 pb-4">
|
114 |
| - <a href="{{ env.baseUrl | url }}" class="inline-block"> |
115 |
| - <img src="{{ env.baseUrl + 'img/logo.png' | url }}" alt="PyCon India 2025" class="h-12 w-auto"> |
| 115 | + <a href="{{ baseUrl }}" class="inline-block"> |
| 116 | + <img src="{{ baseUrl }}img/logo.png" alt="PyCon India 2025" class="h-12 w-auto"> |
116 | 117 | </a>
|
117 | 118 | </div>
|
118 | 119 |
|
|
129 | 130 | <div class="flex flex-col space-y-4">
|
130 | 131 | {% for item in menuItems %}
|
131 | 132 | {% 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 %}" |
| 133 | + <a href="{% if item.isExternal %}{{ item.link }}{% elif item.link and item.link[0] == '#' %}{{ item.link }}{% else %}{{ baseUrl }}{{ item.link }}{% endif %}" |
133 | 134 | {% if item.isExternal %}target="_blank" rel="noopener noreferrer"{% endif %}
|
134 | 135 | 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">
|
135 | 136 | {{ item.name }}
|
|
154 | 155 | <div class="hidden mt-2 mobile-submenu">
|
155 | 156 | <div class="bg-pycon-lime/90 backdrop-blur-sm border border-black/10 rounded-lg p-3 flex flex-col gap-2">
|
156 | 157 | {% 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"> |
| 158 | + <a href="{{ baseUrl }}{{ subitem.link }}" class="p-2 text-gray-800 text-sm font-medium hover:text-[#4E62F5] transition-colors duration-200 no-underline"> |
158 | 159 | {{ subitem.name }}
|
159 | 160 | </a>
|
160 | 161 | {% endfor %}
|
|
165 | 166 | {% endfor %}
|
166 | 167 |
|
167 | 168 | <div class="mt-6">
|
168 |
| - <a href="{{ '/tickets' | url }}" class="flex justify-center items-center bg-pycon-lime text-black font-medium rounded-lg p-4 text-center w-full no-underline text-base transition-all duration-200 hover:bg-pycon-lime/80"> |
| 169 | + <a href="{{ baseUrl }}tickets" class="flex justify-center items-center bg-pycon-lime text-black font-medium rounded-lg p-4 text-center w-full no-underline text-base transition-all duration-200 hover:bg-pycon-lime/80"> |
169 | 170 | Get Tickets
|
170 | 171 | </a>
|
171 | 172 | </div>
|
|
0 commit comments