layout.jade 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 ShareLaTeX, the Online LaTeX Editor
  13. -else
  14. title= translate(title) + ' - ShareLaTeX, '+translate("online_latex_editor")
  15. link(rel="icon", href="/favicon.ico")
  16. link(rel='stylesheet', href='/stylesheets/style.css?fingerprint='+fingerprint('/stylesheets/style.css'))
  17. link(href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css",rel="stylesheet")
  18. if settings.i18n.subdomainLang
  19. each subdomainDetails in settings.i18n.subdomainLang
  20. link(rel="alternate", href=subdomainDetails.url+currentUrl, hreflang=subdomainDetails.lngCode)
  21. meta(itemprop="name", content="ShareLaTeX, the Online LaTeX Editor")
  22. -if (typeof(meta) == "undefined")
  23. meta(itemprop="description", name="description", content="An online LaTeX editor that's easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more.")
  24. -else
  25. meta(itemprop="description", name="description" , content=meta)
  26. meta(itemprop="image", name="image", content="https://www.sharelatex.com/favicon.ico")
  27. - if (typeof(gaToken) != "undefined")
  28. script(type='text/javascript').
  29. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  30. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  31. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  32. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  33. ga('create', '#{gaToken}', 'sharelatex.com');
  34. ga('send', 'pageview');
  35. - else
  36. script(type='text/javascript').
  37. window.ga = function() { console.log("Sending to GA", arguments) };
  38. script(type="text/javascript").
  39. window.csrfToken = "#{csrfToken}";
  40. block scripts
  41. script(src="#{jsPath}libs/jquery-1.11.1.min.js")
  42. script(src="#{jsPath}libs/angular-1.3.15.min.js")
  43. include sentry
  44. script.
  45. window.sharelatex = {
  46. siteUrl: '#{settings.siteUrl}',
  47. jsPath: '#{jsPath}',
  48. sixpackDomain: '#{settings.sixpack.domain}'
  49. };
  50. window.systemMessages = !{JSON.stringify(systemMessages).replace(/\//g, '\\/')};
  51. window.ab = {}
  52. window.user_id = '#{getLoggedInUserId()}'
  53. - if (typeof(settings.algolia) != "undefined")
  54. script.
  55. window.sharelatex.algolia = {
  56. app_id:'#{settings.algolia.app_id}',
  57. api_key:'#{settings.algolia.read_only_api_key}',
  58. indexes:!{JSON.stringify(settings.algolia.indexes)}
  59. }
  60. - if (typeof(settings.templates) != "undefined")
  61. script.
  62. window.sharelatex.templates = {
  63. user_id : '!{settings.templates.user_id}',
  64. cdnDomain : '!{settings.templates.cdnDomain}',
  65. indexName : '!{settings.templates.indexName}'
  66. }
  67. body
  68. - if(typeof(suppressSystemMessages) == "undefined")
  69. .system-messages(
  70. ng-cloak
  71. ng-controller="SystemMessagesController"
  72. )
  73. .system-message(
  74. ng-repeat="message in messages"
  75. ng-controller="SystemMessageController"
  76. ng-hide="hidden"
  77. )
  78. a(href, ng-click="hide()").pull-right ×
  79. .system-message-content(ng-bind-html="htmlContent")
  80. include translations/translation_message
  81. - if(typeof(suppressNavbar) == "undefined")
  82. include layout/navbar
  83. block content
  84. div(ng-controller="AbTestController")
  85. - if(typeof(suppressFooter) == "undefined")
  86. include layout/footer
  87. - if (typeof(lookingForScribtex) != "undefined" && lookingForScribtex)
  88. span(ng-controller="ScribtexPopupController")
  89. include scribtex-modal
  90. - if(typeof(suppressFooter) == "undefined")
  91. script(type='text/javascript').
  92. window.requirejs = {
  93. "urlArgs" : "fingerprint=#{fingerprint(jsPath + 'main.js')}-#{fingerprint(jsPath + 'libs.js')}",
  94. "paths" : {
  95. "moment": "libs/moment-2.7.0"
  96. }
  97. };
  98. script(
  99. data-main=jsPath+'main.js',
  100. baseurl=jsPath,
  101. src=jsPath+'libs/require.js?fingerprint='+fingerprint(jsPath + 'libs/require.js')
  102. )
  103. - if (typeof(tenderUrl) != "undefined")
  104. script(src="https://#{tenderUrl}/tender_widget.js" )
  105. script(type="text/javascript").
  106. Tender = {
  107. hideToggle: true,
  108. widgetToggles: $(".js-tender-widget"),
  109. category: "questions"
  110. };