1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

feat(layout): center the footer

This commit is contained in:
Cotes Chung
2023-09-07 01:58:03 +08:00
parent 62bcd601fc
commit 41b8f9f519
9 changed files with 77 additions and 141 deletions

View File

@@ -9,21 +9,21 @@ layout: default
{% assign has_tail = true %}
{% endif %}
<div class="row{% unless has_tail %} mb-5{% endunless %}">
<div class="row">
<!-- core -->
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pe-xl-4">
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
{% capture padding %}
{% unless page.layout == 'home' %}px-1{% endunless %}
{% endcapture %}
<div class="post {{ padding | strip }} px-md-2">
<div class="post {{ padding | strip }} {% unless has_tail %} flex-grow-1 mb-5{% endunless %}">
{% capture _content %}
{% if layout.refactor or page.layout == 'page' %}
{% include refactor-content.html content=content lang=lang %}
{% else %}
{{ content }}
{% endif %}
{% endcapture %}
{% if layout.refactor or page.layout == 'page' %}
{% include refactor-content.html content=content lang=lang %}
{% else %}
{{ content }}
{% endif %}
{% endcapture %}
{% if page.layout == 'page' or page.collection == 'tabs' %}
{% assign tab_key = page.title | downcase %}
@@ -55,14 +55,16 @@ layout: default
</div>
</div>
<!-- tail -->
{% if has_tail %}
<div class="row">
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-3 pe-xl-4 mt-5">
<div class="row">
<!-- tail -->
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4{% if has_tail%} mt-5{% endif %}">
{% if has_tail %}
{% for _include in layout.tail_includes %}
{% assign _include_path = _include | append: '.html' %}
{% include {{ _include_path }} lang=lang %}
{% endfor %}
</div>
{% endif %}
{% include_cached footer.html lang=lang %}
</div>
{% endif %}
</div>