layout.pug 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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=settings.brandPrefix === 'ol-' ? "#4f9c45" : "#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}', '#{settings.cookieDomain.replace(/^\./, "")}');
  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"))
  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"))
  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. - if (settings.overleaf && settings.overleaf.useOLFreeTrial)
  78. script.
  79. window.useV2TrialUrl = true
  80. body
  81. if(settings.recaptcha)
  82. script(src="https://www.google.com/recaptcha/api.js?render=explicit")
  83. div(
  84. id="recaptcha"
  85. class="g-recaptcha"
  86. data-sitekey=settings.recaptcha.siteKey
  87. data-size="invisible"
  88. data-badge="inline"
  89. )
  90. - if(typeof(suppressNavbar) == "undefined")
  91. include layout/navbar
  92. block content
  93. div(ng-controller="AbTestController")
  94. - if(typeof(suppressFooter) == "undefined")
  95. include layout/footer
  96. - if (typeof(lookingForScribtex) != "undefined" && lookingForScribtex)
  97. span(ng-controller="ScribtexPopupController")
  98. include scribtex-modal
  99. block requirejs
  100. script(type='text/javascript').
  101. // minimal requirejs configuration (can be extended/overridden)
  102. window.requirejs = {
  103. "paths" : {
  104. "moment": "libs/#{lib('moment')}",
  105. "fineuploader": "libs/#{lib('fineuploader')}",
  106. "main": "#{buildJsPath('main.js', {hashedPath:settings.useMinifiedJs, removeExtension:true})}",
  107. "libraries": "#{buildJsPath('libraries.js', {hashedPath:settings.useMinifiedJs, removeExtension:true})}",
  108. },
  109. "config":{
  110. "moment":{
  111. "noGlobal": true
  112. }
  113. }
  114. };
  115. script(
  116. data-main=buildJsPath('main.js', {hashedPath:false}),
  117. baseurl=fullJsPath,
  118. src=buildJsPath('libs/require.js', {hashedPath:true})
  119. )
  120. != moduleIncludes("contactModal", locals)
  121. include v1-tooltip
  122. include sentry