layouts.jade 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. html(lang="{{TAPi18n.getLanguage()}}")
  2. head
  3. title
  4. meta(name="viewport" content="width=device-width, initial-scale=1")
  5. meta(http-equiv="X-UA-Compatible" content="IE=edge")
  6. //- XXX We should use pathFor in the following `href` to support the case
  7. where the application is deployed with a path prefix, but it seems to be
  8. difficult to do that cleanly with Blaze -- at least without adding extra
  9. packages.
  10. link(rel="shortcut icon" type="image/x-icon" href="/favicon.ico")
  11. link(rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png")
  12. link(rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png")
  13. link(rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png")
  14. link(rel="manifest" crossOrigin="use-credentials" href="/site.webmanifest")
  15. link(rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5")
  16. meta(name="apple-mobile-web-app-title" content="Wekan")
  17. meta(name="application-name" content="Wekan")
  18. meta(name="msapplication-TileColor" content="#00aba9")
  19. meta(name="theme-color" content="#ffffff")
  20. //link(rel="stylesheet" type="text/css" class="__meteor-css__" href="css/html5-default-theme.css")
  21. template(name="userFormsLayout")
  22. section.auth-layout
  23. if currentSetting.hideLogo
  24. h1.at-form-landing-logo
  25. br
  26. br
  27. unless currentSetting.hideLogo
  28. h1.at-form-landing-logo
  29. if currentSetting.customLoginLogoImageUrl
  30. if currentSetting.customLoginLogoLinkUrl
  31. a(href="{{currentSetting.customLoginLogoLinkUrl}}")
  32. img(src="{{currentSetting.customLoginLogoImageUrl}}" width="300" height="auto")
  33. br
  34. unless currentSetting.customLoginLogoLinkUrl
  35. img(src="{{currentSetting.customLoginLogoImageUrl}}" width="300" height="auto")
  36. br
  37. else
  38. img(src="{{pathFor '/wekan-logo.svg'}}" alt="" width="300" height="auto")
  39. br
  40. if currentSetting.textBelowCustomLoginLogo
  41. hr
  42. section.textBelowCustomLoginLogo
  43. +viewer
  44. | {{currentSetting.textBelowCustomLoginLogo}}
  45. hr
  46. section.auth-layout
  47. section.auth-dialog
  48. if isLoading
  49. +loader
  50. else
  51. // ARIA live region for error messages
  52. div#login-error-message(role="alert" aria-live="assertive" style="color: #d32f2f; margin-bottom: 1em;")
  53. // Add autocomplete attribute to login input for WCAG compliance
  54. script.
  55. document.addEventListener('DOMContentLoaded', function() {
  56. var loginInput = document.querySelector('input[type="text"], input[type="email"]');
  57. if (loginInput && loginInput.name && (loginInput.name.toLowerCase().includes('user') || loginInput.name.toLowerCase().includes('email'))) {
  58. loginInput.setAttribute('autocomplete', 'username email');
  59. }
  60. });
  61. +Template.dynamic(template=content)
  62. if currentSetting.displayAuthenticationMethod
  63. +connectionMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
  64. if isLegalNoticeLinkExist
  65. div#legalNoticeDiv
  66. span#legalNoticeSpan {{_ 'acceptance_of_our_legalNotice'}}
  67. a#legalNoticeAtLink.at-link(href="{{currentSetting.legalNotice}}", target="_blank", rel="noopener noreferrer")
  68. | {{_ 'legalNotice'}}
  69. if getLegalNoticeWithWritTraduction
  70. div
  71. div.at-form-lang
  72. label(for="userform-set-language-select") {{_ 'choose_language'}}
  73. select.select-lang.js-userform-set-language#userform-set-language-select(aria-label="{{_ 'choose_language'}}")
  74. each languages
  75. if isCurrentLanguage
  76. option(value="{{tag}}" selected="selected") {{name}}
  77. else
  78. option(value="{{tag}}") {{name}}
  79. template(name="defaultLayout")
  80. +header
  81. #content
  82. | {{{afterBodyStart}}}
  83. +Template.dynamic(template=content)
  84. | {{{beforeBodyEnd}}}
  85. if (Modal.isOpen)
  86. #modal
  87. .overlay
  88. if (Modal.isWide)
  89. .modal-content-wide.modal-container
  90. a.modal-close-btn.js-close-modal
  91. i.fa.fa-times-thin
  92. +Template.dynamic(template=Modal.getHeaderName)
  93. +Template.dynamic(template=Modal.getTemplateName)
  94. else
  95. .modal-content.modal-container
  96. a.modal-close-btn.js-close-modal
  97. i.fa.fa-times-thin
  98. +Template.dynamic(template=Modal.getHeaderName)
  99. +Template.dynamic(template=Modal.getTemplateName)
  100. template(name="notFound")
  101. +message(label='page-not-found')
  102. template(name="message")
  103. .big-message.quiet(class=color)
  104. h1 {{_ label}}
  105. unless currentUser
  106. with(pathFor route='atSignIn')
  107. p {{{_ 'page-maybe-private' this}}}
  108. template(name="loader")
  109. h1.loadingText {{_ 'loading'}}
  110. .lds-roller
  111. div
  112. div
  113. div
  114. div
  115. div
  116. div
  117. div