Fix footer position bottom when page have a little content in Vartheme BS5

Created on 12 May 2022, over 2 years ago
Updated 30 May 2023, over 1 year ago

Problem/Motivation

When there are not enough content, the footer will rise to the top.

Steps to reproduce

Open any page, and make it with a little content [one paragraph as an example], and then look to the footer, it will rise to the top.

Proposed resolution

Have the following changes on both vartheme_bs5 and VARTHMEM_BS5_SUBTHEME template.

  • Change min-height: 100vh for the page
  • Change template page.html.twig to change footer margin top class from mt-5 to mt-auto
  • Add mb-5 on last div before the footer-wrapper in the page to add spacing before footer
{# Main #}
{% block main %}
  <div role="main" class="main-container {{ container }} js-quickedit-main-content mb-5">

      .....
      .....
      .....

  </div>
{% endblock %}

{% if page.footer %}
  {% block footer %}
    <footer class="site-footer text-center text-lg-start bg-light mt-auto" role="contentinfo">
        <div class="{{ container }}">
          {{ page.footer }}
        </div>
    </footer>
  {% endblock %}
{% endif %}

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ✅ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.0.0-alpha1 , vartheme_bs5-1.0.0-rc2

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

Before:

After [With less content]:

After [With large content]:

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇯🇴Jordan Abdullah Yassin

Live updates comments and jobs are added and updated live.
  • CSS

    It involves the content or handling of Cascading Style Sheets.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024