#86 Use a single footer block for all pages
Merged 5 years ago by adamwill. Opened 5 years ago by adamwill.
fedora-qa/ adamwill/blockerbugs universal-footer  into  develop

@@ -17,6 +17,3 @@ 

      </div>

  </div>

  {% endblock %}

- 

- {% block footer %}

- {% endblock %}

@@ -23,21 +23,3 @@ 

      </nav>

  </div>

  {% endblock %}

- 

- {% block footer %}

- <div class="footerspacer"></div>

- <footer class="footer">

-     <div class="container">

-         <span class="text-muted">

-             {% if info['last_updated'] %} Last synced with

-             <a href="https://bugzilla.redhat.com/"> Red Hat Bugzilla</a>

-             at {{ info['last_updated'] }}. {% else %} Not synced with

-             <a href="https://bugzilla.redhat.com/"> Red Hat Bugzilla</a>. {% endif %}

-             <br /> This application is open source! Visit its

-             <a href="https://pagure.io/fedora-qa/blockerbugs">project page</a>.

-             <br /> Version {{ g.version }}

-             <div class="fedora-footer"></div>

-         </span>

-     </div>

- </footer>

- {% endblock %} 

\ No newline at end of file

@@ -78,6 +78,3 @@ 

      </div>

  </div>

  {% endblock %}

- 

- {% block footer %}

- {% endblock %}

@@ -40,18 +40,3 @@ 

      </div>

  </div>

  {% endblock %}

- 

- {% block footer %}

- <footer class="footer">

- <div class="container">

-     <div class="fedora-prefooter">

-         <div class="col-md-12">

-             This application is open source! Visit its <a href="https://pagure.io/fedora-qa/blockerbugs">project page</a>.

-             <br />

-             Version {{ g.version }}

-             <div class="fedora-footer"></div>

-         </div>

-     </div>

- </div>

- </footer>

- {% endblock %}

@@ -127,6 +127,23 @@ 

  </div> <!-- end of main row -->

  

  {% block footer %}

+ <div class="footerspacer"></div>

+ <footer class="footer">

+     <div class="container">

+         <span class="text-white">

+             {% if 'last_updated' in info and info['last_updated'] %}

+             Last synced with <a class="text-white-50" href="https://bugzilla.redhat.com/">

+             Red Hat Bugzilla</a> at {{ info['last_updated'] }}.

+             {% elif 'last_updated' in info %}

+             Not synced with <a href="https://bugzilla.redhat.com/"> Red Hat Bugzilla</a>.

+             {% endif %}

+             <br /> This application is open source! Visit its

+             <a class="text-white-50" href="https://pagure.io/fedora-qa/blockerbugs">project page</a>.

+             <br /> Version {{ g.version }}

+             <div class="fedora-footer"></div>

+         </span>

+     </div>

+ </footer>

  {% endblock %}

  

  {% if config['FEDMENU_URL'] %}

@@ -105,7 +105,4 @@ 

  </form>

  

  

- {% endblock %} 

- 

- {% block footer %}

  {% endblock %}

@@ -34,6 +34,3 @@ 

  </div>

  

  {% endblock %}

- 

- {% block footer %}

- {% endblock %}

The footer situation is a bit of a mess. There is no footer
in layout.html. There is a footer block with a 'last updated'
note in base_nav.html, a footer block with no 'last updated'
note in index.html, and then various pages inherit from
base_nav.html but override the footer block to be empty.

I think this is partly because the 'last updated' stuff in the
base_nav footer isn't always working / relevant, but it's quite
easy to handle that. This commit puts a single footer block
which works correctly for all cases into layout.html and cleans
up all the other templates to just use it. This means we get a
consistent footer across all pages, with the 'last updated' info
included when it's available and not included when it isn't. It
also makes the templates cleaner overall.

I changed the text color to white because 'muted' is almost
impossible to read on my screen. Oddly, in Bodhi, 'text-muted'
is much more readable, but I think Bodhi is on an old version of
fedora-bootstrap. Pagure uses white text in the footer so I
think we can too!

Signed-off-by: Adam Williamson awilliam@redhat.com

I know that you just copy-pasted this, but when we're changing stuff around, could you re-format the weird in-line if-else-endif blocks to something "structured"? Whitespace does not matter in HTML anyway, and finding what text is a part of which logic block is daunting here...

Apart of the nitpick above/in the source, I like this way better than the state before.

rebased onto 41d90c1a1b44ea111f7efa4fac55a365817f7162

5 years ago

rebased onto d5772a9

5 years ago

Pull-Request has been merged by adamwill

5 years ago