layouts.jade 4.9 KB

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