layout.jade 4.0 KB

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