editor.pug 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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(ng-bind-html="htmlContent")
  56. grammarly-warning(delay=10000)
  57. include ./editor/main
  58. script(type="text/ng-template", id="genericMessageModalTemplate")
  59. .modal-header
  60. button.close(
  61. type="button"
  62. data-dismiss="modal"
  63. ng-click="done()"
  64. aria-label="Close"
  65. )
  66. span(aria-hidden="true") ×
  67. h3 {{ title }}
  68. .modal-body(ng-bind-html="message")
  69. .modal-footer
  70. button.btn.btn-info(ng-click="done()") #{translate("ok")}
  71. script(type="text/ng-template", id="outOfSyncModalTemplate")
  72. .modal-header
  73. button.close(
  74. type="button"
  75. data-dismiss="modal"
  76. ng-click="done()"
  77. aria-label="Close"
  78. )
  79. span(aria-hidden="true") ×
  80. h3 {{ title }}
  81. .modal-body(ng-bind-html="message")
  82. .modal-body
  83. button.btn.btn-info(
  84. ng-init="showFileContents = false"
  85. ng-click="showFileContents = !showFileContents"
  86. )
  87. | {{showFileContents ? "Hide" : "Show"}} Local File Contents
  88. .text-preview(ng-show="showFileContents")
  89. textarea.scroll-container(readonly="readonly" rows="{{editorContentRows}}")
  90. | {{editorContent}}
  91. .modal-footer
  92. button.btn.btn-info(ng-click="done()") #{translate("reload_editor")}
  93. script(type="text/ng-template", id="lockEditorModalTemplate")
  94. .modal-header
  95. h3 {{ title }}
  96. .modal-body(ng-bind-html="message")
  97. block append meta
  98. include ./editor/meta
  99. block foot-scripts
  100. each file in (useOpenTelemetry ? entrypointScripts("tracing") : [])
  101. script(type="text/javascript", nonce=scriptNonce, src=file)
  102. script(type="text/javascript", nonce=scriptNonce, src=(wsUrl || '/socket.io') + '/socket.io.js')
  103. if (richTextVariant !== 'cm6')
  104. script(type="text/javascript", nonce=scriptNonce, src=mathJaxPath)
  105. each file in entrypointScripts("ide")
  106. script(type="text/javascript", nonce=scriptNonce, src=file)