footer.html
Panoramica
Il footer di un sito è generalmente uguale in ogni pagina, in questi casi footer.html viene incluso in base.html. Questo file non è obbligatorio.
Nell'esempio abbiamo inserito la visualizzazione delle icone dei social network dalle impostazioni tema, l'inclusione del testo personalizzato da pannello del footer e i credits.
File di esempio
- footer.html
<div class="footer"> <div class="container"> {# -------------------------------------------------------- SOCIAL NETWORK ICONS -------------------------------------------------------- #} {% set social_links = theme.settings('social_links') %} {% if social_links|array_filter|length %} <ul class="social-list list-unstyled list-inline text-center"> {% if social_links.facebook %} <li><a href="{{ social_links.facebook }}" target="_blank" title="Facebook">{{ theme.image('img/social-obox/facebook.png') }}</a></li> {% endif %} {% if social_links.twitter %} <li><a href="{{ social_links.twitter }}" target="_blank" title="Twitter">{{ theme.image('img/social-obox/twitter.png') }}</a></li> {% endif %} {% if social_links.google_plus %} <li><a href="{{ social_links.google_plus }}" target="_blank" title="Google+">{{ theme.image('img/social-obox/google_plus.png') }}</a></li> {% endif %} {% if social_links.linkedin %} <li><a href="{{ social_links.linkedin }}" target="_blank" title="LinkedIn">{{ theme.image('img/social-obox/linkedin.png') }}</a></li> {% endif %} {% if social_links.vimeo %} <li><a href="{{ social_links.vimeo }}" target="_blank" title="Vimeo">{{ theme.image('img/social-obox/vimeo.png') }}</a></li> {% endif %} {% if social_links.youtube %} <li><a href="{{ social_links.youtube }}" target="_blank" title="Youtube">{{ theme.image('img/social-obox/youtube.png') }}</a></li> {% endif %} </ul> {% endif %} {# -------------------------------------------------------- WEBSITE FOOTER -------------------------------------------------------- #} <div class="text-center"> {{ get_footer() }} </div> {# -------------------------------------------------------- CREDITS -------------------------------------------------------- #} <div class="text-center"> {{ get_credits() }} </div> </div> </div>