diff --git a/pelicanconf.py b/pelicanconf.py index c5368d5b090559947edf109dfe1a8f90f9c61df9..cd81c5d25cc2152dd4444f1506e9ea873d42c914 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -1,5 +1,7 @@ from datetime import date +TODAY = date.today() + SPONSORS = [ ("SpeedPartner", "/images/sponsors/speedpartner.png", "https://www.speedpartner.de", date(2038, 12, 31)), ("Informatik aktuell", "/images/sponsors/informatik_aktuell.png", "https://www.informatik-aktuell.de/", date(2021, 12, 31)), diff --git a/templates/base.html b/templates/base.html index 3f8eff8582598a52a2cab4c020367c101e5dba78..5ddee2d5d3ab9686e7bc7881d5d2244d404c7e62 100644 --- a/templates/base.html +++ b/templates/base.html @@ -121,8 +121,10 @@ {{ SPONSORSTEXTS[DEFAULT_LANG] }} {% endif %} </p> - {% for image, url in SPONSOR_LOGOS %} - <a href="{{ url }}"><img src="{{ image }}" href="{{ url }}" alt="{{ url }}" class="sponsorslogo" /></a> + {% for alt, image, url, before in SPONSOR_LOGOS %} + {% if before >= TODAY %} + <a href="{{ url }}"><img src="{{ image }}" href="{{ url }}" alt="{{ alt }}" title="{{ alt }}" class="sponsorslogo" /></a> + {% endif %} {% endfor %} </div> </div>