Skip to content

Commit ab8f708

Browse files
authored
Merge pull request #152 from Jer-Pha/jer-pha
refactor: prevent logo click reloading homepage if already there
2 parents 050f9a5 + cf24ad9 commit ab8f708

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pythonsd/templates/pythonsd/base.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
<body>
2525
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
26-
<a class="navbar-brand" href="{% url 'index' %}">
26+
{% url 'index' as index_url %}
27+
<a class="navbar-brand" href="{% if request.path != index_url %}{{ index_url }}{% else %}#{% endif %}">
2728
<img src="{% static 'img/sandiegopython-logo.svg' %}" alt="San Diego Python Home">
2829
</a>
2930
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars-expand" aria-controls="navbars-expand" aria-expanded="false" aria-label="Toggle navigation">

0 commit comments

Comments
 (0)