Commit a9830dba authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

Populating upper nav_bar with pasteur link

Adding credits in footer
printing warnings only once
WIP #2
parent 9b8aab52
Pipeline #14191 passed with stage
in 1 minute and 47 seconds
......@@ -258,6 +258,8 @@ footer .inner-wrap {
display: inline-block;
vertical-align: middle;
flex: 0 0 auto;
display: flex;
flex-direction: column;
}
.footer__section:last-child{
flex: 0 1 auto;
......@@ -313,9 +315,7 @@ footer .inner-wrap {
.footer__section ul .nav-link {
padding:0px;
}
.footer__section:last-child nav+span{
position: absolute;
bottom: 0;
.footer__section:last-child span{
text-align: right;
font-size: initial;
}
......
......@@ -36,6 +36,7 @@
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto">
{% include_if_exists "upper_nav_bar.html"|localize_template "basetheme_bootstrap/upper_nav_bar.example.html" %}
</ul>
{% block form_in_nav_bar %}
<form class="form-inline mt-2 mt-md-0" action="search/" method="post">
......@@ -70,9 +71,7 @@
</nav>
<div class="header__middle">
<div class="header__logo-wrapper">
<a href="/" title="Accueil" rel="home">
<img src="https://www.pasteur.fr/sites/default/files/logo_institut_pasteur_noir.png" alt="Accueil">
</a>
</div>
<div class="header__nav">
<nav class="main-nav" role="navigation">
......@@ -145,27 +144,19 @@
</nav>
</div>
</div>
<div class="footer__section footer__menu-social">
<div class="footer__section">
<div class="block block-menu block-menu-menu-footer-menu-social">
<nav>
<ul>
<li>
<a class="suivre_pasteur_facebook" href="" target="_blank"></a>
</li>
<li>
<a class="suivre_pasteur_linkedin" href="" target="_blank"></a>
</li>
<li>
<a class="suivre_pasteur_twitter" href="" target="_blank"></a>
</li>
{% include_if_exists "credits.html"|localize_template "basetheme_bootstrap/credits.example.html" %}
</ul>
</nav>
</div>
<span class="text-muted float-right">
{% include_if_exists "last_update.html"|localize_template "basetheme_bootstrap/last_update.example.html" %}
</span>
</div>
</div>
</div>
</footer>
</body>
<script
......
{% load basetheme_bootstrap %}
{% load i18n %}
<li class="nav-item "><a href="https://www.pasteur.fr/" target="_blank" class="nav-link">{%trans "L'Institut Pasteur"%}</a></li>
<li class="nav-item "><a href="https://research.pasteur.fr/fr/team/bioinformatics-and-biostatistics-hub/" target="_blank" class="nav-link">{%trans "Bioinformatics and Biostatistics HUB"%}</a></li>
\ No newline at end of file
{% load i18n %}
<li class="nav-item "><a href="https://www.pasteur.fr/" target="_blank" class="nav-link">{%trans "L'Institut Pasteur"%}</a></li>
\ No newline at end of file
......@@ -2,6 +2,7 @@ import logging
from django import template
from django.conf import settings
from django.core.cache import cache
from django.template.base import Token
from django.template.loader import get_template
from django.template.loader_tags import do_include
......@@ -55,6 +56,7 @@ class IncludeIfExistsNode(template.Node):
self.template_node = do_include(parser, Token(token.token_type, 'do_include %s' % split_contents[1]))
self.default_template_name = None
self.default_template_node = None
self.__template_seen=set()
try:
self.default_template_name = split_contents[2]
self.default_template_node = do_include(parser,
......@@ -66,6 +68,11 @@ class IncludeIfExistsNode(template.Node):
try:
return self.template_node.render(context)
except template.TemplateDoesNotExist:
cache_key = 'Template_not_found_%s' % self.template_name
if cache.get(cache_key, None) is None:
cache.set(cache_key, '', None)
self.__template_seen.add(self.template_name)
print(self.__template_seen)
logger.warning(
'Template %s was not found and could not be included.' % self.template_name +
(
......
......@@ -7,7 +7,7 @@ readme = open('README.rst').read()
setup(
name='django-basetheme-bootstrap',
version='0.2.11',
version='0.2.12',
description='Django Basetheme Bootstrap',
long_description=readme,
author='Bryan Brancotte',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment