Skip to content

Commit

Permalink
Dynamic logo url based on project name (#1192)
Browse files Browse the repository at this point in the history
* take logo from project name env

* added BLT logo

* added new BLT images
  • Loading branch information
AtmegaBuzz authored Apr 3, 2023
1 parent 415f087 commit 3bac767
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 3 deletions.
Binary file added website/static/img/BLT_RED_WHITE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/BLT_TRANSPARENT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/BLT_WHITE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/BUGHEIST_TRANSPARENT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
4 changes: 2 additions & 2 deletions website/templates/includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% load static %}
{% load i18n %}
{% load custom_tags %}

{% comment %} 'img/logo_white.png' {% endcomment %}
<footer class="bg-black text-white pt-12 pb-8 px-12 bottom-0 relative fixed t-0">
<div class="mx-auto px-4 !container overflow-hidden flex flex-col lg:flex-row justify-between">
<a href="/" class="block mr-4 w-1/2">
<img src="{% static 'img/logo_white.png' %}" class="w-[200px] ml-4 lg:ml-0" alt="footer logo">
<img src="{% logo 'WHITE' %}" class="w-[200px] ml-4 lg:ml-0" alt="footer logo">
</a>
<div class="w-2/3 block sm:flex text-2xl mt-6 lg:mt-0">
<ul class="text-gray-700 list-none p-0 font-thin flex flex-col text-left w-full">
Expand Down
2 changes: 1 addition & 1 deletion website/templates/includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</div>
<div class="flex flex-col items-center h-full">
<a class="" href="/">
<img src="{% static 'img/logo-large-transparent.png' %}" class="max-w-[200px]">
<img src="{% logo 'TRANSPARENT' %}" class="max-w-[200px]">
</a>
<p class="text-center nav-hidden sm:!inline">Report Issues, Win Prizes</p>
</div>
Expand Down
5 changes: 5 additions & 0 deletions website/templatetags/custom_tags.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django import template
from django.conf import settings
from django.templatetags.static import static

register = template.Library()

Expand All @@ -11,3 +12,7 @@ def define(the_string):
@register.simple_tag
def env(key):
return getattr(settings,key)

@register.simple_tag
def logo(logo_type):
return static(F"img/{settings.PROJECT_NAME}_{logo_type}.png")

0 comments on commit 3bac767

Please sign in to comment.