Footer release

Instructions to include ANU Footer in your website

Effect

anu-footer-effect

Note

If your root element font size is NOT 16px, you can refer to this troubleshooting - "Meeting line is not consistent"

Steps

 

Step 1

Include the footer element in the appropriate place (complete version)
<footer class="anu-wf-footer" aria-label="Footer banner" role="contentinfo" data-tracker="anu" >
HTML element or attributesRequiredDescription
<footer></footer>YesFor the bundle.js to locate and populate the content.
Essential for rendering the footer.
class="anu-wf-footer"YesFor the bundle.js to locate and populate the content.
Essential for rendering the footer.
aria-label="Footer banner"YesFor Accessibility (AA) test.
role="contentinfo"YesFor Accessibility (AA) test.
data-tracker="anu"DependsFor Google Tag Manager(GTM)
For development/test websites, this attribute must NOT be included.
For production websites, this is REQUIRED.
data-env="dev"NoYou may find this in your rendered footer.
They are added automatically by the bundle.js to indicate which environment you are in, "dev" for development and "pro" for production.

Notes:

Yes means required to render the footer widget.

Yes means required to pass Accessibility Test (AA), but will NOT affect the rendering.

  means strictly prohibited.

No means NOT required. Users don't need to worry about this.

 

Step 2

Include the bundle.js BEHIND the footer element.
EnvironmentCode
Development/Test websites<script src="https://webstyle-dev.anu.edu.au/widgets/bundle.js">
Production websites<script src="https://webstyle.anu.edu.au/widgets/bundle.js">

Correctly assigning webstyle-dev or webstyle is important since it informs the bundle.js which environment (development/test/production) your websites are in, and relevant addresses (such as image src) will be switched accordingly.

Platforms

 

HTML skeleton

<!DOCTYPE html> 
                <html lang="en"> 
                    <head> <meta charset="UTF-8"> 
                        <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
                        <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
                        <title>ANU Footer</title> 
                    </head> 
                    <body> 
                     <footer class="anu-wf-footer" aria-label="Footer banner" role="contentinfo" data-tracker="anu"></footer> <script src="https://webstyle.anu.edu.au/widgets/bundle.js"></script>
                    </body> 
                </html>
                

Drupal / WordPress / Others

Please refer to HTML

Cheatsheet

 

Below are codes convenient for your different cases. You do NOT need to change anything, including attribute values and order.

CaseCode snippetSample
Development/Test websites
<footer class="anu-wf-footer" aria-label="Footer banner" role="contentinfo" ></footer>
<script src="https://webstyle-dev.anu.edu.au/widgets/bundle.js"></script> 
Sample
Production websites
<footer class="anu-wf-footer" aria-label="Footer banner" role="contentinfo" data-tracker="anu"></footer>
<script src="https://webstyle.anu.edu.au/widgets/bundle.js"></script> 
Sample

Trouble shooting

 
Footer is not rendered

Reason: The order of footer element and bundle.js may not be right.

Solution:

bundle.js should be behind <footer>

Meeting line is not consistent

Reason: For font-size, we are using rem unit, which would depend on your website root element's font size, namely html. Ours html font size is 16px. If you are using different size, this would be the problem.

Solution 1: Change your root element font size to 16px

Pro: Simple.

Con: If your other layouts are also using rem, their font-size will be affected as well.

Solution 2: Use em rather than rem and set the <footer> font size as 16px. em is relevant to parent element.

Pro: Dependent on your other layouts.

Con: May need a bit effort.