editor.pug 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. extends ../layout
  2. block vars
  3. - var suppressNavbar = true
  4. - var suppressFooter = true
  5. - var suppressSkipToContent = true
  6. - metadata.robotsNoindexNofollow = true
  7. block css
  8. each file in entrypointStyles('ide')
  9. link(rel='stylesheet', href=file)
  10. block content
  11. .editor(ng-controller="IdeController").full-size
  12. //- required by react2angular-shared-context, must be rendered as a top level component
  13. shared-context-react()
  14. .loading-screen(ng-if="state.loading")
  15. .loading-screen-brand-container
  16. .loading-screen-brand(
  17. style="height: 20%;"
  18. ng-style="{ 'height': state.load_progress + '%' }"
  19. )
  20. h3.loading-screen-label(ng-if="!state.error") #{translate("loading")}
  21. span.loading-screen-ellip .
  22. span.loading-screen-ellip .
  23. span.loading-screen-ellip .
  24. p.loading-screen-error(ng-if="state.error").ng-cloak
  25. span(ng-bind-html="state.error")
  26. .global-alerts(ng-cloak ng-hide="editor.error_state")
  27. .alert.alert-danger.small(ng-if="connection.forced_disconnect")
  28. strong #{translate("disconnected")}
  29. .alert.alert-warning.small(ng-if="connection.reconnection_countdown")
  30. strong #{translate("lost_connection")}.
  31. | #{translate("reconnecting_in_x_secs", {seconds:"{{ connection.reconnection_countdown }}"})}.
  32. a#try-reconnect-now-button.alert-link-as-btn.pull-right(href, ng-click="tryReconnectNow()") #{translate("try_now")}
  33. .alert.alert-warning.small(ng-if="connection.reconnecting && connection.stillReconnecting")
  34. strong #{translate("reconnecting")}…
  35. .alert.alert-warning.small(ng-if="sync_tex_error")
  36. strong #{translate("synctex_failed")}.
  37. a#synctex-more-info-button.alert-link-as-btn.pull-right(
  38. href="/learn/how-to/SyncTeX_Errors"
  39. target="_blank"
  40. ) #{translate("more_info")}
  41. .alert.alert-warning.small(ng-if="connection.inactive_disconnect")
  42. strong #{translate("editor_disconected_click_to_reconnect")}
  43. .alert.alert-warning.small(ng-if="connection.debug") {{ connection.state }}
  44. .div(ng-controller="SavingNotificationController")
  45. .alert.alert-warning.small(ng-repeat="(doc_id, state) in docSavingStatus" ng-if="state.unsavedSeconds > 8") #{translate("saving_notification_with_seconds", {docname:"{{ state.doc.name }}", seconds:"{{ state.unsavedSeconds }}"})}
  46. .div(ng-controller="SystemMessagesController")
  47. .alert.alert-warning.system-message(
  48. ng-repeat="message in messages"
  49. ng-controller="SystemMessageController"
  50. ng-hide="hidden"
  51. )
  52. button(ng-hide="protected",ng-click="hide()").close.pull-right
  53. span(aria-hidden="true") ×
  54. span.sr-only #{translate("close")}
  55. .system-message-content
  56. | {{htmlContent}}
  57. grammarly-warning(delay=10000)
  58. if hasFeature('saas')
  59. legacy-editor-warning(delay=10000)
  60. include ./editor/main
  61. script(type="text/ng-template", id="genericMessageModalTemplate")
  62. .modal-header
  63. button.close(
  64. type="button"
  65. data-dismiss="modal"
  66. ng-click="done()"
  67. aria-label="Close"
  68. )
  69. span(aria-hidden="true") ×
  70. h3 {{ title }}
  71. .modal-body(ng-bind-html="message")
  72. .modal-footer
  73. button.btn.btn-info(ng-click="done()") #{translate("ok")}
  74. script(type="text/ng-template", id="outOfSyncModalTemplate")
  75. .modal-header
  76. button.close(
  77. type="button"
  78. data-dismiss="modal"
  79. ng-click="done()"
  80. aria-label="Close"
  81. )
  82. span(aria-hidden="true") ×
  83. h3 {{ title }}
  84. .modal-body(ng-bind-html="message")
  85. .modal-body
  86. button.btn.btn-info(
  87. ng-init="showFileContents = false"
  88. ng-click="showFileContents = !showFileContents"
  89. )
  90. | {{showFileContents ? "Hide" : "Show"}} Local File Contents
  91. .text-preview(ng-show="showFileContents")
  92. textarea.scroll-container(readonly="readonly" rows="{{editorContentRows}}")
  93. | {{editorContent}}
  94. .modal-footer
  95. button.btn.btn-info(ng-click="done()") #{translate("reload_editor")}
  96. script(type="text/ng-template", id="lockEditorModalTemplate")
  97. .modal-header
  98. h3 {{ title }}
  99. .modal-body(ng-bind-html="message")
  100. block append meta
  101. include ./editor/meta
  102. block foot-scripts
  103. each file in (useOpenTelemetry ? entrypointScripts("tracing") : [])
  104. script(type="text/javascript", nonce=scriptNonce, src=file)
  105. script(type="text/javascript", nonce=scriptNonce, src=(wsUrl || '/socket.io') + '/socket.io.js')
  106. if (richTextVariant !== 'cm6')
  107. script(type="text/javascript", nonce=scriptNonce, src=mathJaxPath)
  108. each file in entrypointScripts("ide")
  109. script(type="text/javascript", nonce=scriptNonce, src=file)