PageRenderTime 52ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/webapp/resources/templates/fragments/loginProviders.html

https://github.com/frett/cas
HTML | 98 lines | 88 code | 10 blank | 0 comment | 0 complexity | 4ee2d7c4f8217d4d68645e54e59ad315 MD5 | raw file
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
  7. <title>loginProviders Fragment</title>
  8. <link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag" />
  9. </head>
  10. <body>
  11. <main role="main" class="container mt-3 mb-3">
  12. <div th:fragment="loginProviders" th:remove="tag">
  13. <div th:if="${delegatedAuthenticationProviderUrls}" id="list-providers"
  14. th:class="${delegatedAuthenticationProviderDominant == null ? 'card d-sm-none d-md-block bg-light' : ''}">
  15. <div class="card-body">
  16. <h3 class="card-title" th:utext="#{screen.welcome.label.loginwith}" th:if="${delegatedAuthenticationProviderDominant == null}">Login with:</h3>
  17. <div class="card-title" th:if="${delegatedAuthenticationProviderDominant != null}">
  18. <div class="alert alert-success" role="alert">
  19. <span th:utext="#{screen.welcome.label.navto}" />
  20. </div>
  21. </div>
  22. <div class="card-text" th:style="'display:' + ${delegatedAuthenticationProviderDominant != null ? 'none' : 'block'}">
  23. <ul>
  24. <li th:each="entry: ${delegatedAuthenticationProviderUrls}" th:switch="${entry.type}">
  25. <a class="btn btn-block btn-social"
  26. th:classappend="'btn-' + ${entry.type}"
  27. th:href="@{${entry.redirectUrl}}"
  28. th:attr="autoredirect=${entry.autoRedirect}"
  29. th:inline="text"
  30. th:title="${entry.name}">
  31. <span th:case="twitter" class="fab fa-twitter-square"></span>
  32. <span th:case="foursquare" class="fab fa-foursquare"></span>
  33. <span th:case="windowslive" class="fab fa-windows"></span>
  34. <span th:case="yahoo" class="fab fa-yahoo"></span>
  35. <span th:case="bitbucket" class="fab fa-bitbucket"></span>
  36. <span th:case="wordpress" class="fab fa-wordpress"></span>
  37. <span th:case="google2" class="fab fa-google-plus"></span>
  38. <span th:case="github" class="fab fa-github-alt"></span>
  39. <span th:case="dropbox" class="fab fa-dropbox"></span>
  40. <span th:case="linkedin" class="fab fa-linkedin"></span>
  41. <span th:case="facebook" class="fab fa-facebook-square"></span>
  42. <span th:case="oidc" class="fab fa-openid"></span>
  43. <span th:case="saml2" th:class="${entry.cssClass}"></span>
  44. <span th:case="*" class="fa fa-sign-in-alt"></span>
  45. [[${entry.name}]]
  46. </a>
  47. </li>
  48. </ul>
  49. </div>
  50. </div>
  51. </div>
  52. <div th:if="${wsfedUrls}" id="list-providers"
  53. th:class="${delegatedAuthenticationProviderDominant == null ? 'card d-sm-none d-md-block bg-light' : ''}">
  54. <div class="card-body">
  55. <h3 class="card-title" th:utext="#{screen.welcome.label.loginwith}" th:if="${delegatedAuthenticationProviderDominant == null}">Login with:</h3>
  56. <div class="card-title" th:if="${delegatedAuthenticationProviderDominant != null}">
  57. <div class="alert alert-info">
  58. <span th:utext="#{screen.welcome.label.navto}" />
  59. </div>
  60. </div>
  61. <div class="card-text" th:style="'display:' + ${delegatedAuthenticationProviderDominant != null ? 'none' : 'block'}">
  62. <ul>
  63. <li th:each="entry: ${wsfedUrls}">
  64. <a class="btn btn-block btn-social"
  65. th:classappend="btn-sm"
  66. th:href="@{${entry.redirectUrl}}"
  67. th:inline="text"
  68. onload=""
  69. th:attr="autoredirect=${entry.autoRedirect}"
  70. th:title="${entry.name}">
  71. <span class="fab fa-windows"></span>
  72. [[${entry.name}]]
  73. </a>
  74. </li>
  75. </ul>
  76. </div>
  77. </div>
  78. </div>
  79. <script>
  80. var redirectTo = $( "a[autoRedirect=true]" ).attr("href");
  81. if (redirectTo != null && redirectTo != undefined) {
  82. window.location.href = redirectTo;
  83. }
  84. </script>
  85. </div>
  86. </main>
  87. </body>
  88. </html>