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