layout.jade 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. };
  49. window.systemMessages = !{JSON.stringify(systemMessages).replace(/\//g, '\\/')};
  50. window.ab = {}
  51. - if (typeof(settings.algolia) != "undefined")
  52. script.
  53. window.sharelatex.algolia = {
  54. app_id:'#{settings.algolia.app_id}',
  55. api_key:'#{settings.algolia.read_only_api_key}',
  56. indexes:!{JSON.stringify(settings.algolia.indexes)}
  57. }
  58. - if (typeof(settings.templates) != "undefined")
  59. script.
  60. window.sharelatex.templates = {
  61. user_id : '!{settings.templates.user_id}',
  62. cdnDomain : '!{settings.templates.cdnDomain}',
  63. indexName : '!{settings.templates.indexName}'
  64. }
  65. body
  66. - if(typeof(suppressSystemMessages) == "undefined")
  67. .system-messages(
  68. ng-cloak
  69. ng-controller="SystemMessagesController"
  70. )
  71. .system-message(
  72. ng-repeat="message in messages"
  73. ng-controller="SystemMessageController"
  74. ng-hide="hidden"
  75. )
  76. a(href, ng-click="hide()").pull-right ×
  77. .system-message-content(ng-bind-html="htmlContent")
  78. include translations/translation_message
  79. - if(typeof(suppressNavbar) == "undefined")
  80. include layout/navbar
  81. block content
  82. div(ng-controller="AbTestController")
  83. - if(typeof(suppressFooter) == "undefined")
  84. include layout/footer
  85. - if (typeof(lookingForScribtex) != "undefined" && lookingForScribtex)
  86. span(ng-controller="ScribtexPopupController")
  87. include scribtex-modal
  88. - if(typeof(suppressFooter) == "undefined")
  89. script(type='text/javascript').
  90. window.requirejs = {
  91. "urlArgs" : "fingerprint=#{fingerprint(jsPath + 'main.js')}-#{fingerprint(jsPath + 'libs.js')}",
  92. "paths" : {
  93. "moment": "libs/moment-2.7.0"
  94. }
  95. };
  96. script(
  97. data-main=jsPath+'main.js',
  98. baseurl=jsPath,
  99. src=jsPath+'libs/require.js?fingerprint='+fingerprint(jsPath + 'libs/require.js')
  100. )
  101. - if (typeof(tenderUrl) != "undefined")
  102. script(src="https://#{tenderUrl}/tender_widget.js" )
  103. script(type="text/javascript").
  104. Tender = {
  105. hideToggle: true,
  106. widgetToggles: $(".js-tender-widget"),
  107. category: "questions"
  108. };