Custom Login Page

The default landing / login page for IRIDA can be replaced by an institution without modifying the existing one.

Create a html file called login.html on your files system, and save it to the path /etc/irida/templates/;

# Overwritten UI templates
ui.templates=/etc/irida/templates/

Use IRIDA base login form.

IRIDA uses a React component as its login form and can be added to any template by adding:

Adding custom resources

Images, CSS and JS files can be added into /etc/irida/static and then loaded onto the custom login page. Ensure that the Thymeleaf attributes are added, for example:

Examples:

* Image: `<img th:src="@{/static/myImage.png}" alt="A great picture or logo" >`
* JS: `<script th:src="@{/static/myFile.js}"></script>`
* CSS: `<link th:href="@{/static/myFile.css}" />`

Example

<!DOCTYPE html>
<html lang="en">
  <head>
    <webpacker:css entry="login" />
    <script th:inline="javascript">
      window.TL = {
        _BASE_URL: /*[[@{/}]]*/ "/",
        emailConfigured: /*[[${emailConfigured}]]*/ false
      };
    </script>
  </head>
  <body>
    <div id="login-root"></div>
    <webpacker:js entry="login" />
  </body>
</html>

Example of Custom login page

Code for a basic custom login page.

Custom Login Page

Code for a more involved login page with added CSS.

Custom Login Page