Skip to content

Commit 53e2e0f

Browse files
committed
Custom front page logo on makentnu.dev
This was a local change (by @elisakiv and/or @Gunvor4) live on the dev server for a few months, until I removed all local changes with the deployment of release `2025-10-26`. I think `logo_allblack_dev.svg` was made by either @elisakiv or @Gunvor4 (not entirely sure).
1 parent 6970ee5 commit 53e2e0f

File tree

5 files changed

+183
-3
lines changed

5 files changed

+183
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Lastly, a new [release](https://github.com/MAKENTNU/web/releases) must be create
2424

2525
### Other changes
2626

27+
- Added custom front page logo on [makentnu.dev](https://makentnu.dev/) (MAKENTNU/web#781)
2728

2829

2930
## 2025-10-26 (MAKENTNU/web#779)

src/web/context_processors.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
from django.conf import settings
22
from django.contrib.auth.views import LoginView
3+
from django.http import HttpRequest
34
from django.utils.translation import get_language
45
from django_hosts import reverse, reverse_host
56

67

7-
def common_context_variables(request):
8+
def common_context_variables(request: HttpRequest) -> dict:
89
return {
10+
# Language-related stuff
911
'DEFAULT_LANGUAGE_CODE': settings.LANGUAGE_CODE,
1012
'CURRENT_LANGUAGE_CODE': get_language(),
13+
# Misc. stuff
14+
'IS_DEV_ENV': settings.IS_DEV_ENV,
1115
}
1216

1317

14-
def login(request):
18+
def login(request: HttpRequest) -> dict:
1519
# The current `next` parameter
1620
current_redirect_url = LoginView(request=request).get_redirect_url()
1721

src/web/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
# For `django-hosts` to redirect correctly across subdomains, we have to specify the host we are running on.
7373
PARENT_HOST = env.PARENT_HOST
7474

75+
IS_DEV_ENV = PARENT_HOST == 'makentnu.dev' # (custom setting)
76+
7577
EVENT_TICKET_EMAIL = 'ticket@makentnu.no' # (custom setting)
7678

7779

Lines changed: 167 additions & 0 deletions
Loading

src/web/templates/web/index.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@
3636
<div class="banner-container">
3737
<div class="banner-img large parallax-window" data-parallax="scroll" data-image-src="{% static 'web/img/topimg_2.jpg' %}"></div>
3838
<img class="banner-img small" src="{% static 'web/img/topimg_small.jpg' %}" alt=""/>
39-
<img class="banner-logo" src="{% static 'web/img/logo_allblack.svg' %}" alt="{% translate "MAKE NTNU's logo" %}"/>
39+
<img class="banner-logo"
40+
{% if IS_DEV_ENV %}
41+
src="{% static 'web/img/logo_allblack_dev.svg' %}"
42+
{% else %}
43+
src="{% static 'web/img/logo_allblack.svg' %}"
44+
{% endif %}
45+
alt="{% translate "MAKE NTNU's logo" %}"/>
4046
</div>
4147

4248
<div class="make-content-padding">{# Empty div for spacing #}</div>

0 commit comments

Comments
 (0)