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 %}
|
||||
<footer class="fixed-bottom" role="contentinfo">
|
||||
<div class="container mt-0">
|
||||
© 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 %}
|
||||
{{ footer_contents }}
|
||||
</div>
|
||||
</footer>
|
||||
{% else %}
|
||||
@ -20,16 +24,7 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="container">
|
||||
© 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 %}
|
||||
{{ footer_contents }}
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user