Refactor footer content (#3041)
Refactor footer content into a reusable variable for cleaner code
This commit is contained in:
parent
6625f2395a
commit
74beacb274
@ -1,16 +1,20 @@
|
|||||||
|
{% capture footer_contents %}
|
||||||
|
© Copyright {{ site.time | date: '%Y' }}
|
||||||
|
{{ site.first_name }}
|
||||||
|
{{ site.middle_name }}
|
||||||
|
{{ site.last_name }}. {{ site.footer_text }}
|
||||||
|
{% if site.impressum_path %}
|
||||||
|
<a href="{{ site.url }}{{ site.baseurl }}{{ site.impressum_path }}">Impressum</a>.
|
||||||
|
{% endif %}
|
||||||
|
{% if site.last_updated %}
|
||||||
|
Last updated: {{ 'now' | date: '%B %d, %Y' }}.
|
||||||
|
{% endif %}
|
||||||
|
{% endcapture %}
|
||||||
|
|
||||||
{% if site.footer_fixed %}
|
{% if site.footer_fixed %}
|
||||||
<footer class="fixed-bottom" role="contentinfo">
|
<footer class="fixed-bottom" role="contentinfo">
|
||||||
<div class="container mt-0">
|
<div class="container mt-0">
|
||||||
© Copyright {{ site.time | date: '%Y' }}
|
{{ footer_contents }}
|
||||||
{{ site.first_name }}
|
|
||||||
{{ site.middle_name }}
|
|
||||||
{{ site.last_name }}. {{ site.footer_text }}
|
|
||||||
{% if site.impressum_path %}
|
|
||||||
<a href="{{ site.url }}{{ site.baseurl }}{{ site.impressum_path }}">Impressum</a>.
|
|
||||||
{% endif %}
|
|
||||||
{% if site.last_updated %}
|
|
||||||
Last updated: {{ 'now' | date: '%B %d, %Y' }}.
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -20,16 +24,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
© Copyright {{ site.time | date: '%Y' }}
|
{{ footer_contents }}
|
||||||
{{ site.first_name }}
|
|
||||||
{{ site.middle_name }}
|
|
||||||
{{ site.last_name }}. {{ site.footer_text }}
|
|
||||||
{% if site.impressum_path %}
|
|
||||||
<a href="{{ site.url }}{{ site.baseurl }}{{ site.impressum_path }}">Impressum</a>.
|
|
||||||
{% endif %}
|
|
||||||
{% if site.last_updated %}
|
|
||||||
Last updated: {{ 'now' | date: '%B %d, %Y' }}.
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user