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

Created on 12 May 2022, about 2 years ago
Updated 30 May 2023, about 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.69.0 2024