layout.pug 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. doctype html
  2. html(itemscope, itemtype='http://schema.org/Product')
  3. block vars
  4. head
  5. script(type="text/javascript").
  6. // Stop superfish from loading
  7. window.similarproducts = true
  8. style [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {display: none !important; display: none; }
  9. -if (typeof(gaExperiments) != "undefined")
  10. |!{gaExperiments}
  11. -if (typeof(title) == "undefined")
  12. title= settings.appName + ', '+ translate("online_latex_editor")
  13. -else
  14. title= translate(title) + ' - ' + settings.appName + ', ' + translate("online_latex_editor")
  15. link(rel="icon", href="/" + settings.brandPrefix + "favicon.ico")
  16. link(rel="icon", sizes="192x192", href="/" + settings.brandPrefix + "touch-icon-192x192.png")
  17. link(rel="apple-touch-icon-precomposed", href="/" + settings.brandPrefix + "apple-touch-icon-precomposed.png")
  18. link(rel="mask-icon", href="/" + settings.brandPrefix + "mask-favicon.svg", color="#a93529")
  19. link(rel='stylesheet', href=buildCssPath("/" + settings.brandPrefix + "style.css", {hashedPath:true}))
  20. block _headLinks
  21. if settings.i18n.subdomainLang
  22. each subdomainDetails in settings.i18n.subdomainLang
  23. if !subdomainDetails.hide
  24. link(rel="alternate", href=subdomainDetails.url+currentUrl, hreflang=subdomainDetails.lngCode)
  25. meta(itemprop="name", content=settings.appName + ", the Online LaTeX Editor")
  26. -if (typeof(meta) == "undefined")
  27. meta(itemprop="description", name="description", content=translate("site_description"))
  28. -else
  29. meta(itemprop="description", name="description" , content=meta)
  30. meta(itemprop="image", name="image", content="/" + settings.brandPrefix + "favicon.ico")
  31. - if (typeof(gaToken) != "undefined")
  32. script(type='text/javascript').
  33. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  34. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  35. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  36. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  37. ga('create', '#{gaToken}', 'sharelatex.com');
  38. ga('send', 'pageview');
  39. - else
  40. script(type='text/javascript').
  41. window.ga = function() { console.log("would send to GA", arguments) };
  42. script(type="text/javascript").
  43. window.csrfToken = "#{csrfToken}";
  44. script(src=buildJsPath("libs/jquery-1.11.1.min.js", {fingerprint:false}))
  45. script(type="text/javascript").
  46. var noCdnKey = "nocdn=true"
  47. var cdnBlocked = typeof jQuery === 'undefined'
  48. var noCdnAlreadyInUrl = window.location.href.indexOf(noCdnKey) != -1 //prevent loops
  49. if (cdnBlocked && !noCdnAlreadyInUrl && navigator.userAgent.indexOf("Googlebot") == -1) {
  50. window.location.search += '&'+noCdnKey;
  51. }
  52. block scripts
  53. script(src=buildJsPath("libs/angular-1.6.4.min.js", {fingerprint:false}))
  54. script.
  55. window.sharelatex = {
  56. siteUrl: '#{settings.siteUrl}',
  57. jsPath: '#{jsPath}',
  58. sixpackDomain: '#{settings.sixpack.domain}'
  59. };
  60. window.systemMessages = !{JSON.stringify(systemMessages).replace(/\//g, '\\/')};
  61. window.ab = {};
  62. window.user_id = '#{getLoggedInUserId()}';
  63. - if (typeof(settings.algolia) != "undefined")
  64. script.
  65. window.sharelatex.algolia = {
  66. app_id:'#{settings.algolia.app_id}',
  67. api_key:'#{settings.algolia.read_only_api_key}',
  68. indexes:!{JSON.stringify(settings.algolia.indexes)}
  69. }
  70. - if (typeof(settings.templates) != "undefined")
  71. script.
  72. window.sharelatex.templates = {
  73. user_id : '!{settings.templates.user_id}',
  74. cdnDomain : '!{settings.templates.cdnDomain}',
  75. indexName : '!{settings.templates.indexName}'
  76. }
  77. body
  78. if(settings.recaptcha)
  79. script(src="https://www.google.com/recaptcha/api.js?render=explicit")
  80. div(
  81. id="recaptcha"
  82. class="g-recaptcha"
  83. data-sitekey=settings.recaptcha.siteKey
  84. data-size="invisible"
  85. data-badge="inline"
  86. )
  87. - if(typeof(suppressSystemMessages) == "undefined")
  88. .system-messages(
  89. ng-cloak
  90. ng-controller="SystemMessagesController"
  91. )
  92. .system-message(
  93. ng-repeat="message in messages"
  94. ng-controller="SystemMessageController"
  95. ng-hide="hidden"
  96. )
  97. a(href, ng-click="hide()").pull-right ×
  98. .system-message-content(ng-bind-html="htmlContent")
  99. include translations/translation_message
  100. - if(typeof(suppressNavbar) == "undefined")
  101. include layout/navbar
  102. block content
  103. div(ng-controller="AbTestController")
  104. - if(typeof(suppressFooter) == "undefined")
  105. include layout/footer
  106. - if (typeof(lookingForScribtex) != "undefined" && lookingForScribtex)
  107. span(ng-controller="ScribtexPopupController")
  108. include scribtex-modal
  109. block requirejs
  110. script(type='text/javascript').
  111. // minimal requirejs configuration (can be extended/overridden)
  112. window.requirejs = {
  113. "paths" : {
  114. "moment": "libs/#{lib('moment')}",
  115. "fineuploader": "libs/#{lib('fineuploader')}",
  116. "main": "#{buildJsPath('main.js', {hashedPath:settings.useMinifiedJs, fingerprint:false, removeExtension:true})}",
  117. "libraries": "#{buildJsPath('libraries.js', {hashedPath:settings.useMinifiedJs, fingerprint:false, removeExtension:true})}",
  118. },
  119. "config":{
  120. "moment":{
  121. "noGlobal": true
  122. }
  123. }
  124. };
  125. script(
  126. data-main=buildJsPath('main.js', {hashedPath:false, fingerprint:false}),
  127. baseurl=fullJsPath,
  128. src=buildJsPath('libs/require.js')
  129. )
  130. include contact-us-modal
  131. include v1-tooltip
  132. include sentry