44 < meta charset ="UTF-8 ">
55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
66 < title > {% block title %}FastAPI Admin{% endblock %}</ title >
7- < link rel ="icon " type ="image/png " href ="/{{ mount_path }}/static/favicon.png?v=1 ">
7+ < link rel ="icon " type ="image/png " href ="{% if mount_path %} /{{ mount_path }}{% endif % }/static/favicon.png?v=1 ">
88 < link href ="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap " rel ="stylesheet ">
9- < script src ="/{{ mount_path }}/static/htmx.min.js "> </ script >
9+ < script src ="{% if mount_path %} /{{ mount_path }}{% endif % }/static/htmx.min.js "> </ script >
1010 < style >
1111 /* Modern CSS Reset */
1212 * , * ::before , * ::after {
278278 < div class ="{% if include_sidebar_and_header %}admin-container{% endif %} ">
279279 {% if include_sidebar_and_header %}
280280 < header class ="admin-header ">
281- < a href ="/{{ mount_path }}/ " class ="brand ">
282- < img src ="/{{ mount_path }}/static/favicon.png " alt ="FastAPI Admin " class ="brand-icon ">
281+ < a href ="{% if mount_path %} /{{ mount_path }}{% endif % }/ " class ="brand ">
282+ < img src ="{% if mount_path %} /{{ mount_path }}{% endif % }/static/favicon.png " alt ="FastAPI Admin " class ="brand-icon ">
283283 FastAPI Admin
284284 </ a >
285285 < div class ="flex items-center gap-4 ">
286- < a href ="/{{ mount_path }}/logout " style ="color: white; text-decoration: none; font-weight: 500; transition: color 0.2s " onmouseover ="this.style.color='var(--primary-light)' " onmouseout ="this.style.color='white' ">
286+ < a href ="{% if mount_path %} /{{ mount_path }}{% endif % }/logout " style ="color: white; text-decoration: none; font-weight: 500; transition: color 0.2s " onmouseover ="this.style.color='var(--primary-light)' " onmouseout ="this.style.color='white' ">
287287 Logout
288288 </ a >
289289 </ div >
@@ -299,7 +299,7 @@ <h3 class="sidebar-section-title">Navigation</h3>
299299 </ div >
300300 < ul class ="sidebar-nav ">
301301 < li >
302- < a href ="/{{ mount_path }}/ " class ="sidebar-link active ">
302+ < a href ="{% if mount_path %} /{{ mount_path }}{% endif % }/ " class ="sidebar-link active ">
303303 Dashboard
304304 </ a >
305305 </ li >
@@ -314,14 +314,14 @@ <h3 class="sidebar-section-title">Management</h3>
314314 </ div >
315315 < ul class ="sidebar-nav ">
316316 < li >
317- < a href ="/{{ mount_path }}/management/health " class ="sidebar-link ">
317+ < a href ="{% if mount_path %} /{{ mount_path }}{% endif % }/management/health " class ="sidebar-link ">
318318 Health Checks
319319 < span class ="badge badge-primary "> System</ span >
320320 </ a >
321321 </ li >
322322 {% if track_events %}
323323 < li >
324- < a href ="/{{ mount_path }}/management/events " class ="sidebar-link ">
324+ < a href ="{% if mount_path %} /{{ mount_path }}{% endif % }/management/events " class ="sidebar-link ">
325325 Event Logs
326326 < span class ="badge badge-primary "> System</ span >
327327 </ a >
@@ -339,7 +339,7 @@ <h3 class="sidebar-section-title">Authentication</h3>
339339 < ul class ="sidebar-nav ">
340340 {% for auth_table_name in auth_table_names %}
341341 < li >
342- < a href ="/{{ mount_path }}/{{ auth_table_name }}/ " class ="sidebar-link ">
342+ < a href ="{% if mount_path %} /{{ mount_path }}{% endif % }/{{ auth_table_name }}/ " class ="sidebar-link ">
343343 {{ auth_table_name }}
344344 < span class ="model-count "> {{ auth_model_counts[auth_table_name]|default(0) }}</ span >
345345 </ a >
@@ -358,7 +358,7 @@ <h3 class="sidebar-section-title">Models</h3>
358358 < ul class ="sidebar-nav ">
359359 {% for table_name in table_names %}
360360 < li >
361- < a href ="/{{ mount_path }}/{{ table_name }}/ " class ="sidebar-link ">
361+ < a href ="{% if mount_path %} /{{ mount_path }}{% endif % }/{{ table_name }}/ " class ="sidebar-link ">
362362 {{ table_name }}
363363 < span class ="model-count "> {{ model_counts[table_name]|default(0) }}</ span >
364364 </ a >
0 commit comments