layout.jade 4.3 KB

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