layout.jade 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. !!!
  2. html(itemscope, itemtype='http://schema.org/Product')
  3. head
  4. - if (typeof(priority_title) !== "undefined" && priority_title)
  5. title= title + ' - Online LaTeX Editor ShareLaTeX'
  6. - else
  7. title= 'Online LaTeX Editor ShareLaTeX - ' +title
  8. link(rel='stylesheet', href='/stylesheets/mainStyle.css?fingerprint='+fingerprint('/stylesheets/mainStyle.css'))
  9. meta(itemprop="name" ,content="ShareLaTeX - Real Time Online LaTeX Collaborative Editor in Your Browser")
  10. meta(itemprop="description", content="Online LaTeX editor for collaborative editing, great for Maths or Sciences. You don't need to install LaTeX so it's great for beginners too.")
  11. meta(itemprop="image", content="https://www.sharelatex.com/favicon.ico")
  12. meta(name="description", content="Online LaTeX editor for collaborative editing, great for Maths or Sciences. You don't need to install LaTeX so it's great for beginners too.")
  13. block scripts
  14. - if (typeof(gaToken) != "undefined")
  15. script(type='text/javascript')
  16. var _gaq = _gaq || [];
  17. _gaq.push(['_setAccount', '#{gaToken}']);
  18. _gaq.push(['_trackPageview']);
  19. (function() {
  20. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  21. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  22. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  23. })();
  24. - if (typeof(mixpanelToken) != "undefined")
  25. script(type="text/javascript")
  26. (function(c,a){window.mixpanel=a;var b,d,h,e;b=c.createElement("script");
  27. b.type="text/javascript";b.async=!0;b.src=("https:"===c.location.protocol?"https:":"http:")+
  28. '//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';d=c.getElementsByTagName("script")[0];
  29. d.parentNode.insertBefore(b,d);a._i=[];a.init=function(b,c,f){function d(a,b){
  30. var c=b.split(".");2==c.length&&(a=a[c[0]],b=c[1]);a[b]=function(){a.push([b].concat(
  31. Array.prototype.slice.call(arguments,0)))}}var g=a;"undefined"!==typeof f?g=a[f]=[]:
  32. f="mixpanel";g.people=g.people||[];h=['disable','track','track_pageview','track_links',
  33. 'track_forms','register','register_once','unregister','identify','alias','name_tag',
  34. 'set_config','people.set','people.increment','people.track_charge','people.append'];
  35. for(e=0;e<h.length;e++)d(g,h[e]);a._i.push([b,c,f])};a.__SV=1.2;})(document,window.mixpanel||[]);
  36. mixpanel.init("#{mixpanelToken}");
  37. - if (typeof(justRegistered) != "undefined" && justRegistered)
  38. script(type="text/javascript")
  39. mixpanel.alias("#{mixpanelId}");
  40. mixpanel.track("registered");
  41. mixpanel.name_tag("#{user.email}");
  42. mixpanel.people.set({
  43. $email: "#{user.email}",
  44. $first_name: "#{user.first_name}",
  45. $last_name: "#{user.last_name}",
  46. $created: new Date(#{Date.now()})
  47. });
  48. - if (typeof(mixpanelId) != "undefined")
  49. script(type="text/javascript")
  50. mixpanel.identify("#{mixpanelId}");
  51. - if (typeof(justLoggedIn) != "undefined" && justLoggedIn)
  52. script(type="text/javascript")
  53. mixpanel.track("Logged in");
  54. script
  55. window.csrfToken = "#{csrfToken}";
  56. script(src=jsPath+'libs/jquery.js')
  57. - if (typeof(bodyClasses) == "undefined")
  58. bodyClasses = []
  59. body(class=bodyClasses)
  60. include menubar
  61. block content
  62. - if (typeof(lookingForScribtex) != "undefined" && lookingForScribtex)
  63. .modal.hide#scribtexModal
  64. .modal-header
  65. h3 Looking for ScribTeX?
  66. .modal-body
  67. p ScribTeX has moved to <strong>https://scribtex.sharelatex.com</strong>. Please update your bookmarks.
  68. p(style="text-align: center") You can find the page you were looking for here:
  69. p(style="text-align: center")
  70. a(href="https://scribtex.sharelatex.com#{scribtexPath}", style="font-size: 16px") https://scribtex.sharelatex.com#{scribtexPath}
  71. .modal-footer
  72. button(data-dismiss="modal").btn OK
  73. include modals
  74. if !locals.supressDefaultJs
  75. script(type='text/javascript')
  76. require = {
  77. "urlArgs" : "fingerprint=#{fingerprint(jsPath + 'main.js')}"
  78. }
  79. script(data-main=jsPath+'main.js', src=jsPath+'libs/require.js?fingerprint=' + fingerprint(jsPath + 'libs/require.js'), baseurl=jsPath)
  80. - if (typeof(tenderUrl) != "undefined")
  81. script(src="https://#{tenderUrl}/tender_widget.js" )
  82. script(type="text/javascript")
  83. Tender = {
  84. hideToggle: true,
  85. widgetToggles: $(".js-tender-widget"),
  86. category: "questions"
  87. };
  88. - if (typeof(heapToken) != "undefined" && session && session.user)
  89. script(type="text/javascript")
  90. var heap=heap||[];heap.load=function(a){window._heapid=a;var b=document.createElement("script");b.type="text/javascript",b.async=!0,b.src=("https:"===document.location.protocol?"https:":"http:")+"//cdn.heapanalytics.com/js/heap.js";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c);var d=function(a){return function(){heap.push([a].concat(Array.prototype.slice.call(arguments,0)))}},e=["identify","track"];for(var f=0;f<e.length;f++)heap[e[f]]=d(e[f])};
  91. heap.load("#{heapToken}");