layout.jade 4.2 KB

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