layout.jade 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. // this is the new google analytics https://developers.google.com/analytics/devguides/collection/analyticsjs/
  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}', 'auto');
  30. ga('send', 'pageview');
  31. - if (typeof(mixpanelToken) != "undefined")
  32. script(type="text/javascript")
  33. (function(c,a){window.mixpanel=a;var b,d,h,e;b=c.createElement("script");
  34. b.type="text/javascript";b.async=!0;b.src=("https:"===c.location.protocol?"https:":"http:")+
  35. '//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';d=c.getElementsByTagName("script")[0];
  36. d.parentNode.insertBefore(b,d);a._i=[];a.init=function(b,c,f){function d(a,b){
  37. var c=b.split(".");2==c.length&&(a=a[c[0]],b=c[1]);a[b]=function(){a.push([b].concat(
  38. Array.prototype.slice.call(arguments,0)))}}var g=a;"undefined"!==typeof f?g=a[f]=[]:
  39. f="mixpanel";g.people=g.people||[];h=['disable','track','track_pageview','track_links',
  40. 'track_forms','register','register_once','unregister','identify','alias','name_tag',
  41. 'set_config','people.set','people.increment','people.track_charge','people.append'];
  42. for(e=0;e<h.length;e++)d(g,h[e]);a._i.push([b,c,f])};a.__SV=1.2;})(document,window.mixpanel||[]);
  43. mixpanel.init("#{mixpanelToken}");
  44. - if (typeof(justRegistered) != "undefined" && justRegistered)
  45. script(type="text/javascript")
  46. mixpanel.alias("#{mixpanelId}");
  47. mixpanel.track("registered");
  48. mixpanel.name_tag("#{user.email}");
  49. mixpanel.people.set({
  50. $email: "#{user.email}",
  51. $first_name: "#{user.first_name}",
  52. $last_name: "#{user.last_name}",
  53. $created: new Date(#{Date.now()})
  54. });
  55. - if (typeof(mixpanelId) != "undefined")
  56. script(type="text/javascript")
  57. mixpanel.identify("#{mixpanelId}");
  58. - if (typeof(justLoggedIn) != "undefined" && justLoggedIn)
  59. script(type="text/javascript")
  60. mixpanel.track("Logged in");
  61. script
  62. window.csrfToken = "#{csrfToken}";
  63. script(src=jsPath+'libs/jquery.js')
  64. - if (typeof(bodyClasses) == "undefined")
  65. bodyClasses = []
  66. body(class=bodyClasses)
  67. include menubar
  68. block content
  69. - if (typeof(lookingForScribtex) != "undefined" && lookingForScribtex)
  70. .modal.hide#scribtexModal
  71. .modal-header
  72. h3 Looking for ScribTeX?
  73. .modal-body
  74. p ScribTeX has moved to <strong>https://scribtex.sharelatex.com</strong>. Please update your bookmarks.
  75. p(style="text-align: center") You can find the page you were looking for here:
  76. p(style="text-align: center")
  77. a(href="https://scribtex.sharelatex.com#{scribtexPath}", style="font-size: 16px") https://scribtex.sharelatex.com#{scribtexPath}
  78. .modal-footer
  79. button(data-dismiss="modal").btn OK
  80. include modals
  81. if !locals.supressDefaultJs
  82. script(type='text/javascript')
  83. require = {
  84. "urlArgs" : "fingerprint=#{fingerprint(jsPath + 'main.js')}"
  85. }
  86. script(data-main=jsPath+'main.js', src=jsPath+'libs/require.js?fingerprint=' + fingerprint(jsPath + 'libs/require.js'), baseurl=jsPath)
  87. - if (typeof(tenderUrl) != "undefined")
  88. script(src="https://#{tenderUrl}/tender_widget.js" )
  89. script(type="text/javascript")
  90. Tender = {
  91. hideToggle: true,
  92. widgetToggles: $(".js-tender-widget"),
  93. category: "questions"
  94. };