layout.jade 4.2 KB

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